FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour Enviando mensajes de WhatsApp
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Enviando mensajes de WhatsApp
Posted: Wed Nov 07, 2012 07: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
Posts: 1445
Joined: Mon Oct 10, 2005 02:38 PM
Re: Enviando mensajes de WhatsApp
Posted: 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 25.12 + Harbour 3.2.0dev (r2502110321), BCC 7.7 Windows 11 Home

Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Enviando mensajes de WhatsApp
Posted: Thu Nov 08, 2012 06: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
Posts: 1516
Joined: Thu May 27, 2010 02:06 PM
Re: Enviando mensajes de WhatsApp
Posted: Thu Nov 08, 2012 08:03 AM

驴 Porque cambias el string Iphone por el Samsung ? .
Dejalo como iphone y mira si funciona.

Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Enviando mensajes de WhatsApp
Posted: Thu Nov 08, 2012 07: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
Posts: 6755
Joined: Wed Feb 15, 2012 08:25 PM
Re: Enviando mensajes de WhatsApp
Posted: Fri Nov 09, 2012 04: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
Posts: 485
Joined: Fri Feb 09, 2007 10:34 AM
Re: Enviando mensajes de WhatsApp
Posted: 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.

Posts: 880
Joined: Fri Jan 12, 2007 08:35 PM
Re: Enviando mensajes de WhatsApp
Posted: Fri Nov 30, 2012 05: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菨
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Enviando mensajes de WhatsApp
Posted: Mon Feb 25, 2013 05: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
Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Enviando mensajes de WhatsApp
Posted: Mon Mar 04, 2013 01: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 March-April 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
Posts: 44158
Joined: Thu Oct 06, 2005 05:47 PM
Re: Enviando mensajes de WhatsApp
Posted: Mon Mar 04, 2013 03: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
Posts: 492
Joined: Wed Nov 16, 2005 12:03 PM
Re: Enviando mensajes de WhatsApp
Posted: Tue Aug 13, 2013 04:16 PM

Antonio
Recuerdo haber leido hace tiempo un programa ejemplo que envia mensajes con Whatapps desde Harbour

Posts: 7317
Joined: Thu Oct 18, 2012 07:17 PM
Re: Enviando mensajes de WhatsApp
Posted: Sat Nov 30, 2013 09: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 March-April 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
Posts: 150
Joined: Tue Jul 15, 2008 07:12 PM
Re: Enviando mensajes de WhatsApp
Posted: Mon Mar 17, 2014 01: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 )

Posts: 1516
Joined: Thu May 27, 2010 02:06 PM
Re: Enviando mensajes de WhatsApp
Posted: Mon Mar 17, 2014 05:44 PM

Hasta donde yo s茅 ya no funciona .