venomous0x / WhatsAPI

Interface to WhatsApp Messenger
2.59k stars 2.14k forks source link

There is a problem in requestCode which always return sent or fail #337

Closed ahmadabudawod closed 11 years ago

ahmadabudawod commented 11 years ago

I have try to request code many time but still get fail or sent as the following below ,is there any one face this problem in PHP API: [status] => fail [reason] => too_recent [retry_after] => 24936

shirioko commented 11 years ago

That's my old phone number which has been disconnected for years now ;)

Hmm I'm not sure if I'm able to read the memory directly though...

JayFoxRox commented 11 years ago

If the debugger won't do it, I'd probably write my own function to dump the token by modifying the DLL.

However, if your debugger / phone supports debugging native code you can read back the memory. I can also do it if your server is online (still offline for me - maybe DNS outdated?).

shirioko commented 11 years ago

My server should always be online, are you getting a login prompt?

shirioko commented 11 years ago

WE DID IT

JayFoxRox commented 11 years ago

"EUREKA"

I used Yowsup to verify but it should work with most other tools too: Add this in /Common/Http/warequest.py and set the self.uaIndex to this entry:

("WhatsApp/2.9.4 WP7/7.10.8858 Device/HTC-HTC-H0002", "Od52pFozHNWF9XbTN5lrqDtnsiZGL2G3l9yw1GiQ"+"21a31a2d9dbdc9a8ce324ef2df918064fd26e30a{phone}"),

I just received my WhatsApp code - Finally!

Credit where credit is due:


For those who are interested in the technical bits of the DLL (Original SHA1: 949e271646ec4d04707d52a3599521b398a82be6):

Changed code:

0x4d3c to 28 20 a0 e3 (Set GetToken to always return 40 bytes) 0x4d44 to 60 11 9f e5 (Set GetToken to always return the tokenPrefix)

Changed checksum:

0xd8 to 2B 16 08 00

shirioko commented 11 years ago

BOOM https://github.com/shirioko/WhatsAPI/commit/09499c8417765d92912bae072f5f2473d277f5df

Well that should leave a mark on our legacy haha :D

EDIT: Also added actual credits to my fork :) https://github.com/shirioko/WhatsAPI/blob/219d220f4d4e7bcd1693b1e6c5323b287f76f70c/README.md

ramonv commented 11 years ago

nice work guys!!! followed it the last few days..

Next stop: reverse engineer the algorithm so we can keep updating useragents ;) Anyhow, really nice job done!

ulihecht commented 11 years ago

Congratulations :D Great!!!

EDIT: Do we need to change constant "resource" in Yowsup\Common\constants.py from "S40-2.3.53" to something like "WP7-2.9.4"?

shirioko commented 11 years ago

Nope.

karan19901990 commented 9 years ago

unable to recieve sms code through whatsapi, youwsup and wart please help

mgp25 commented 9 years ago

This is fixed here: https://github.com/mgp25/WhatsAPI-Official

karan19901990 commented 9 years ago

even by this code i donot recieve sms msg..

On Thu, Nov 13, 2014 at 6:37 AM, mgp25 notifications@github.com wrote:

This is fixed here: https://github.com/mgp25/WhatsAPI-Official

— Reply to this email directly or view it on GitHub.

K@r@!!

darshanadhia1 commented 7 years ago

this doesnot work even by changing differnet user agents is this api still working?

anthonymcg22 commented 6 years ago

What is the most up to date useragent and token?

Subhajit321 commented 6 years ago

WART is not working image Please help me