Page 14 of 15

Re: Enviando mensajes de WhatsApp

PostPosted: Wed Nov 07, 2012 7:49 pm
by cnavarro
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

Re: Enviando mensajes de WhatsApp

PostPosted: Thu Nov 08, 2012 12:16 am
by FiveWiDi
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.

Re: Enviando mensajes de WhatsApp

PostPosted: Thu Nov 08, 2012 6:55 am
by cnavarro
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

Re: Enviando mensajes de WhatsApp

PostPosted: Thu Nov 08, 2012 8:03 am
by mastintin
¿ Porque cambias el string Iphone por el Samsung ? .
Dejalo como iphone y mira si funciona.

Re: Enviando mensajes de WhatsApp

PostPosted: Thu Nov 08, 2012 7:55 pm
by cnavarro
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

Re: Enviando mensajes de WhatsApp

PostPosted: Fri Nov 09, 2012 4:18 pm
by cnavarro
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

Re: Enviando mensajes de WhatsApp

PostPosted: Thu Nov 15, 2012 12:59 pm
by softruz
¿ Sabeis si ha cambiado algo en el protocolo de Login de Whatsapp para que no funcione nuestro código?

Un Saludo.

Re: Enviando mensajes de WhatsApp

PostPosted: Fri Nov 30, 2012 5:32 am
by AIDA
Hola y que codiguito es el bueno para usarlo en windows :mrgreen:

Saluditos :wink:

Re: Enviando mensajes de WhatsApp

PostPosted: Mon Feb 25, 2013 5:33 pm
by Antonio Linares
Esta versión en python por lo visto funciona bien y podriamos usarlo para ver que pueda faltar:

https://github.com/tgalal/yowsup

Re: Enviando mensajes de WhatsApp

PostPosted: Mon Mar 04, 2013 1:05 am
by Silvio.Falconi
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

Re: Enviando mensajes de WhatsApp

PostPosted: Mon Mar 04, 2013 3:02 am
by Antonio Linares
Silvio,

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

Re: Enviando mensajes de WhatsApp

PostPosted: Tue Aug 13, 2013 4:16 pm
by jnavas
Antonio
Recuerdo haber leido hace tiempo un programa ejemplo que envia mensajes con Whatapps desde Harbour

Re: Enviando mensajes de WhatsApp

PostPosted: Sat Nov 30, 2013 9:17 am
by Silvio.Falconi
please could pubblish here the final version of the whatsApp ? thanks

Re: Enviando mensajes de WhatsApp

PostPosted: Mon Mar 17, 2014 1:26 pm
by postinelli
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 )

Re: Enviando mensajes de WhatsApp

PostPosted: Mon Mar 17, 2014 5:44 pm
by mastintin
Hasta donde yo sé ya no funciona .