Enviando mensajes de WhatsApp

Re: Enviando mensajes de WhatsApp

Postby cnavarro » Wed Nov 07, 2012 7:49 pm

Buenas noches
He intentado ejecutar la aplicación según el código que aparece en este hilo y el resultado de la ejecución da el siguiente error:

Application
===========
Path and name: C:\XVerce0311\Whatsapp\Whatsapp.Exe (32 bits)
Size: 619,008 bytes
Compiler version: Harbour 3.2.0dev (Rev. 17516)
FiveWin Version: FWH 12.02
Windows version: 6.1, Build 7601 Service Pack 1

Time from start: 0 hours 0 mins 11 secs
Error occurred at: 11/07/12, 20:34:06
Error description: Error BASE/1132 Bound error: array access
Args:
[ 1] = A { ... }
[ 2] = N 2

Stack Calls
===========
Called from: C:\XVERCE~1\Whatsapp\Prg\whatsapp.prg => HB_WHATSAPP:LOGIN( 134 )
Called from: C:\XVERCE~1\Whatsapp\Prg\whatsapp.prg => MAIN( 15 )

en el que la linea 134 es la siguiente:

::Send( "WA" + Chr( 0x01 ) + Chr( 0x01 ) + Chr( 0 ) + ;
Chr( 0x19 ) + Chr( 0xF8 ) + Chr( 0x05 ) + Chr( 0x01 ) + ;
Chr( 0xA0 ) + Chr( 0x8A ) + Chr( 0x84 ) + Chr( 0xFC ) + ;
Chr( 0x11 ) + "Samsung GT-I9100" + ; //"iPhone-2.6.9-5222" + ;
Chr( 0 ) + Chr( 0x08 ) + Chr( 0xF8 ) + Chr( 0x02 ) + ;
Chr( 0x96 ) + Chr( 0xF8 ) + Chr( 0x01 ) + Chr( 0xF8 ) + ;
Chr( 0x01 ) + Chr( 0x7E ) + Chr( 0 ) + Chr( 0x07 ) + Chr( 0xF8 ) + ;
Chr( 0x05 ) + Chr( 0x0F ) + Chr( 0x5A ) + Chr( 0x2A ) + ;
Chr( 0xBD ) + Chr( 0xA7 ) )

cBuffer = ::Read()
cResponse = hb_base64decode( SubStr( cBuffer, 27 ) )
aArrResponse = HB_ATokens( cResponse, "," )
hAuthData = {=>}

for each cValue in aArrResponse
aResData = hb_ATokens( cValue, "=" )
hAuthData[ aResData[ 1 ] ] = StrTran( aResData[ 2 ], '"', "" ) // esta es la linea 134
next

Alguien me indicar cual puede ser el motivo?

El móvil funciona en Android 4.0.4 y el ordenador Windows 7 64 bits

Gracias
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6500
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Enviando mensajes de WhatsApp

Postby FiveWiDi » Thu Nov 08, 2012 12:16 am

cnavarro wrote:Buenas noches
He intentado ejecutar la aplicación según el código que aparece en este hilo y el resultado de la ejecución da el siguiente error:

Application
===========
Path and name: C:\XVerce0311\Whatsapp\Whatsapp.Exe (32 bits)
Size: 619,008 bytes
Compiler version: Harbour 3.2.0dev (Rev. 17516)
FiveWin Version: FWH 12.02
Windows version: 6.1, Build 7601 Service Pack 1

Time from start: 0 hours 0 mins 11 secs
Error occurred at: 11/07/12, 20:34:06
Error description: Error BASE/1132 Bound error: array access
Args:
[ 1] = A { ... }
[ 2] = N 2

Stack Calls
===========
Called from: C:\XVERCE~1\Whatsapp\Prg\whatsapp.prg => HB_WHATSAPP:LOGIN( 134 )
Called from: C:\XVERCE~1\Whatsapp\Prg\whatsapp.prg => MAIN( 15 )

en el que la linea 134 es la siguiente:

::Send( "WA" + Chr( 0x01 ) + Chr( 0x01 ) + Chr( 0 ) + ;
Chr( 0x19 ) + Chr( 0xF8 ) + Chr( 0x05 ) + Chr( 0x01 ) + ;
Chr( 0xA0 ) + Chr( 0x8A ) + Chr( 0x84 ) + Chr( 0xFC ) + ;
Chr( 0x11 ) + "Samsung GT-I9100" + ; //"iPhone-2.6.9-5222" + ;
Chr( 0 ) + Chr( 0x08 ) + Chr( 0xF8 ) + Chr( 0x02 ) + ;
Chr( 0x96 ) + Chr( 0xF8 ) + Chr( 0x01 ) + Chr( 0xF8 ) + ;
Chr( 0x01 ) + Chr( 0x7E ) + Chr( 0 ) + Chr( 0x07 ) + Chr( 0xF8 ) + ;
Chr( 0x05 ) + Chr( 0x0F ) + Chr( 0x5A ) + Chr( 0x2A ) + ;
Chr( 0xBD ) + Chr( 0xA7 ) )

cBuffer = ::Read()
cResponse = hb_base64decode( SubStr( cBuffer, 27 ) )
aArrResponse = HB_ATokens( cResponse, "," )
hAuthData = {=>}

for each cValue in aArrResponse
aResData = hb_ATokens( cValue, "=" )
hAuthData[ aResData[ 1 ] ] = StrTran( aResData[ 2 ], '"', "" ) // esta es la linea 134
next

Alguien me indicar cual puede ser el motivo?

El móvil funciona en Android 4.0.4 y el ordenador Windows 7 64 bits

Gracias


Intenta substituir esta lina:
Chr( 0x11 ) + "Samsung GT-I9100"
por esta otra:
Chr( 0x10 ) + "Samsung GT-I9100"

A ver si hay suerte.
Un Saludo
Carlos G.

FiveWin 24.02 + Harbour 3.2.0dev (r2403071241), BCC 7.7 Windows 10
FiveWiDi
 
Posts: 1060
Joined: Mon Oct 10, 2005 2:38 pm

Re: Enviando mensajes de WhatsApp

Postby cnavarro » Thu Nov 08, 2012 6:55 am

Buenos dias
Gracias por tu interes
Sigue dando el mismo error.
No entiendo por qué, ni qué significa la cadena que se envía con el método ::Send(...
Un saludo
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6500
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Enviando mensajes de WhatsApp

Postby mastintin » Thu Nov 08, 2012 8:03 am

¿ Porque cambias el string Iphone por el Samsung ? .
Dejalo como iphone y mira si funciona.
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

Re: Enviando mensajes de WhatsApp

Postby cnavarro » Thu Nov 08, 2012 7:55 pm

Buenas noches
Las primeras ejecuciones las realicé con el código tal como estaba con el mismo error
El cambio fue para ver si el error cambiaba y me daba alguna pista.
Gracias
Cristobal Navarro
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6500
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Enviando mensajes de WhatsApp

Postby cnavarro » Fri Nov 09, 2012 4:18 pm

Buenas tardes
El método Send devuelve 50
La longitud de la cadena cBuffer del Read me da longitud 0
Si alguien puede decirme alguna pista del motivo
Gracias
Cristobal Navarro
Hay dos tipos de personas: las que te hacen perder el tiempo y las que te hacen perder la noción del tiempo
El secreto de la felicidad no está en hacer lo que te gusta, sino en que te guste lo que haces
User avatar
cnavarro
 
Posts: 6500
Joined: Wed Feb 15, 2012 8:25 pm
Location: España

Re: Enviando mensajes de WhatsApp

Postby softruz » Thu Nov 15, 2012 12:59 pm

¿ Sabeis si ha cambiado algo en el protocolo de Login de Whatsapp para que no funcione nuestro código?

Un Saludo.
softruz
 
Posts: 485
Joined: Fri Feb 09, 2007 10:34 am

Re: Enviando mensajes de WhatsApp

Postby AIDA » Fri Nov 30, 2012 5:32 am

Hola y que codiguito es el bueno para usarlo en windows :mrgreen:

Saluditos :wink:
Que es mejor que programar? creo que nada :)
Atropellada pero aqui ando :P

I love Fivewin

séʌǝɹ ןɐ ɐʇsǝ opunɯ ǝʇsǝ
User avatar
AIDA
 
Posts: 877
Joined: Fri Jan 12, 2007 8:35 pm

Re: Enviando mensajes de WhatsApp

Postby Antonio Linares » Mon Feb 25, 2013 5:33 pm

Esta versión en python por lo visto funciona bien y podriamos usarlo para ver que pueda faltar:

https://github.com/tgalal/yowsup
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Enviando mensajes de WhatsApp

Postby Silvio.Falconi » Mon Mar 04, 2013 1:05 am

Antonio,
can you post the final code for xharbour ?
because here not run ok ...


Project: test, Environment: xFive_Pelles:
[1]:Harbour.Exe final.prg /m /n0 /gc1 /es2 /iC:\Work\fwh\include /ic:\work\xHarbour\Include /jit_IT.hil /iinclude;c:\work\fwh\include;c:\work\xHarbour\include /oObj\final.c
xHarbour Compiler build 1.2.1 (SimpLex) (Rev. 6717)
Copyright 1999-2010, http://www.xharbour.org http://www.harbour-project.org/
Compiling 'final.prg'...
Generating international list to 'it_IT.hil'...
Lines 541, Functions/Procedures 26
Generating C source output to 'Obj\final.c'...
Done.
[1]:Bcc32.Exe -M -c -O2 -tW -v- -X -DHB_FM_STATISTICS_OFF -DHB_NO_DEFAULT_API_MACROS -DHB_NO_DEFAULT_STACK_MACROS -DHB_OS_WIN_32 -IC:\Work\fwh\include -IC:\Work\bcc582\Include;c:\work\xHarbour\Include -nObj Obj\final.c
Borland C++ 5.82 for Win32 Copyright (c) 1993, 2005 Borland
Obj\final.c:
[1]:iLink32.Exe -Gn -aa -Tpe -s @test.bcl
Turbo Incremental Link 5.69 Copyright (c) 1997-2005 Borland
Error: Unresolved external '_HB_FUN_HB_SOCKETGETHOSTS' referenced from C:\WORK\ERRORI\WHATSUP\OBJ\FINAL.OBJ
Error: Unresolved external '_HB_FUN_HB_SOCKETOPEN' referenced from C:\WORK\ERRORI\WHATSUP\OBJ\FINAL.OBJ
Error: Unresolved external '_HB_FUN_HB_SOCKETCONNECT' referenced from C:\WORK\ERRORI\WHATSUP\OBJ\FINAL.OBJ
Error: Unresolved external '_HB_FUN_STRFORMAT' referenced from C:\WORK\ERRORI\WHATSUP\OBJ\FINAL.OBJ
Error: Unresolved external '_HB_FUN_HB_BASE64DECODE' referenced from C:\WORK\ERRORI\WHATSUP\OBJ\FINAL.OBJ
Error: Unresolved external '_HB_FUN_HB_BASE64ENCODE' referenced from C:\WORK\ERRORI\WHATSUP\OBJ\FINAL.OBJ
Error: Unresolved external '_HB_FUN_HB_SOCKETRECV' referenced from C:\WORK\ERRORI\WHATSUP\OBJ\FINAL.OBJ
Error: Unresolved external '_HB_FUN_HB_SOCKETSEND' referenced from C:\WORK\ERRORI\WHATSUP\OBJ\FINAL.OBJ
Error: Unresolved external '_HB_FUN_HB_SOCKETSHUTDOWN' referenced from C:\WORK\ERRORI\WHATSUP\OBJ\FINAL.OBJ
Error: Unresolved external '_HB_FUN_HB_SOCKETCLOSE' referenced from C:\WORK\ERRORI\WHATSUP\OBJ\FINAL.OBJ
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 6768
Joined: Thu Oct 18, 2012 7:17 pm

Re: Enviando mensajes de WhatsApp

Postby Antonio Linares » Mon Mar 04, 2013 3:02 am

Silvio,

It only works with Harbour. We don't know why, but it is that way.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41314
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: Enviando mensajes de WhatsApp

Postby jnavas » Tue Aug 13, 2013 4:16 pm

Antonio
Recuerdo haber leido hace tiempo un programa ejemplo que envia mensajes con Whatapps desde Harbour
User avatar
jnavas
 
Posts: 472
Joined: Wed Nov 16, 2005 12:03 pm
Location: Caracas - Venezuela

Re: Enviando mensajes de WhatsApp

Postby Silvio.Falconi » Sat Nov 30, 2013 9:17 am

please could pubblish here the final version of the whatsApp ? thanks
Since from 1991/1992 ( fw for clipper Rel. 14.4 - Momos)
I use : FiveWin for Harbour November 2023 - January 2024 - Harbour 3.2.0dev (harbour_bcc770_32_20240309) - Bcc7.70 - xMate ver. 1.15.3 - PellesC - mail: silvio[dot]falconi[at]gmail[dot]com
User avatar
Silvio.Falconi
 
Posts: 6768
Joined: Thu Oct 18, 2012 7:17 pm

Re: Enviando mensajes de WhatsApp

Postby postinelli » Mon Mar 17, 2014 1:26 pm

pregunto, está funcionando el código que viene en \samples\whtasapp.prg?

lo compilo y al ejecutarlo da el siguiente error

Application
===========
Path and name: C:\Programacion\Whatsapp\whatsapp.exe (32 bits)
Size: 2,905,088 bytes
Compiler version: Harbour 3.2.0dev (Rev. 18881)
FiveWin Version: FWH 13.07
Windows version: 5.1, Build 2600 Service Pack 3

Time from start: 0 hours 0 mins 2 secs
Error occurred at: 03/17/14, 10:26:25
Error description: Error BASE/1132 Bound error: array access
Args:
[ 1] = A { ... }
[ 2] = N 2

Stack Calls
===========
Called from: whatsapp.prg => HB_WHATSAPP:LOGIN( 129 )
Called from: whatsapp.prg => MAIN( 11 )
postinelli
 
Posts: 147
Joined: Tue Jul 15, 2008 7:12 pm
Location: Argentina

Re: Enviando mensajes de WhatsApp

Postby mastintin » Mon Mar 17, 2014 5:44 pm

Hasta donde yo sé ya no funciona .
User avatar
mastintin
 
Posts: 1516
Joined: Thu May 27, 2010 2:06 pm

PreviousNext

Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 84 guests