tgalal / yowsup

The WhatsApp lib
GNU General Public License v3.0
7.08k stars 2.23k forks source link

Registeration Error .... #311

Closed farid327 closed 10 years ago

farid327 commented 10 years ago

Hiii.

i can't register using yowsup-cli and i get error message as below ->

status: fail retry_after: 2524 reason: too_recent

i think this error is due to expired token and version is used in the code. how this problem can be resolved and new password or token info can be obtained ???

Forgive me for my poor language :)

mgp25 commented 10 years ago

Hi, that error is not because of the token, its because you tried to request the code many times, so it returns to you this:

status: fail
retry_after: 2524
reason: too_recent

that means you have to wait 2524 seconds to request code again

farid327 commented 10 years ago

Thanks. But, after one i try it again and get this error.

yowsup-cli.py -c config status: fail retry_after: 3600 reason: no_routes

Is the problem with the cellphone operator ?

mgp25 commented 10 years ago

Because WhatsApp has some issues with reaching certain cell networks to send SMS messages. Try WART instead

CODeRUS commented 10 years ago

@mgp25 most useless comment here

CODeRUS commented 10 years ago

@farid327 there are some issues with some operators in Europe, 3rd party clients can't request sms code, but official whatsapp application can. You can try to request voice call with some luck.

The only option is register with android whatsapp on rooted phone and extract password with following script: https://github.com/tgalal/yowsup/issues/234

mgp25 commented 10 years ago

@CODeRUS didnt know that. But is that really working? Because i tried this on php and the password it generates it wasn't valid.

$id = hex2bin($waString) . $country . $phone2;
$salt = substr(hex2bin($noMediaHash),2,4);
$key = pbkdf2('sha1', $id, $salt, 16, 16, true);
$iv = substr(hex2bin($noMediaHash),6,16);
$data = substr(hex2bin($noMediaHash),22);
$td = mcrypt_module_open(MCRYPT_RIJNDAEL_128, '', 'nofb', '');
mcrypt_generic_init($td, $key, $iv);
$aes_secret = mcrypt_generic($td, $data);
mcrypt_module_close($td);
CODeRUS commented 10 years ago

yes it's working for me and i'm using it in my c++ project

mgp25 commented 10 years ago

@CODeRUS I`ll try that later then... But i have one question because i tried this a long time ago. With this you actually could know everyone password as you only need to know basic information about the user. But this code does only generates 1 passwords, does it means that WhatsApp devices uses only one password? I dont know if noMediaHash is different in every Device, waString is the same for all, but im not sure with noMediaHash.

Thanks for the info ;)

CODeRUS commented 10 years ago

what is happening inside your mind if you allow the possibility of the existence of the same passwords? of course .nomedia are nor same on different devices :D

mgp25 commented 10 years ago

Yep, that confused me haha, this code always return the same password but if you try to request a password with the api you get always different ones, that because i get confused. I tried to do a PoC on this and didnt worked but what i successfully did is to spoof a number :_)

I`ll check that lately today, thanks ;)

farid327 commented 10 years ago

@CODeRUS Can you send your code in c++? the code in https://github.com/tgalal/yowsup/issues/234 is so vague. also thanks for your helps @mgp25 @CODeRUS

CODeRUS commented 10 years ago

@mgp25 new registration always returning new password, it was explained many times. @farid327 no, sorry. python script is ok for once. just call decode_pw(".me", ".pw"), no need for .nomedia for decrypting password. nomedia only contains next challenge data.

farid327 commented 10 years ago

@CODeRUS it's worked. tnx alot :)