venomous0x / WhatsAPI

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

How to obtain a Whatsapp password? #403

Closed andonidiaz closed 11 years ago

andonidiaz commented 11 years ago

I've been reading since 2 days back and I don't understand if the api works now or not... I know that I need a password, my phone is android. How I can obtain it?

Regards

shirioko commented 11 years ago

Register phone number on WhatsAPI or use MissVenom on your smartphone

andonidiaz commented 11 years ago

And... how to register a number using the API? :p

shirioko commented 11 years ago

By reading the other issues or look in exampleRegister.php https://github.com/venomous0x/WhatsAPI/issues/401#issuecomment-20753350

rox85 commented 11 years ago

The function are changed from the #401 . The new working code that I tried few minutes ago searching by the other recent posts is the following:

Phase 1: request code

$username = "phone number with international prefix but without + and 00"; $identity = strtolower(urlencode(sha1($username, true))); $w = new WhatsProt($username, $identity, "Dani", true); $w->codeRequest();

Phase 2: retrieve password

$username = "phone number with international prefix but without + and 00"; $identity = strtolower(urlencode(sha1($username, true))); $w = new WhatsProt($username, $identity, "Dani", true); $password = $result->pw; echo "Password is $password";

Phase 3: send message

$username = "phone number with international prefix but without + and 00"; $identity = strtolower(urlencode(sha1($username, true))); $w = new WhatsProt($username, $identity, "Dani", true); $password = 'VoxXYMWJfLgp+Pl6GF9Al48LFcY='; $w->Connect(); $w->LoginWithPassword($password);

$dst = 'destination number with international prefix but without + and 00'; $msg = 'mymessage text'; $w->sendMessage($dst , $msg); $w->disconnect();

Thank you shirioko for the great work!!

shirioko commented 11 years ago

Not quite :) You forgot this line in phase 2:

$result = $w->codeRegister("your 6 digit SMS code");
wiitohzjeh commented 11 years ago

"no_routes", all the time.. with so many numbers (>10), in Bluestacks for example works fine but trying with WhatsAPI (last rev) return that error..

$username = "1206456xxxx";
$identity = strtolower(urlencode(sha1($username, true)));

$w = new WhatsProt($username, $identity, "CCC", true);
$w->codeRequest("voice");
shirioko commented 11 years ago

Are all the numbers you are trying to use land line numbers?

wiitohzjeh commented 11 years ago

@shirioko: IPKall numbers. But in Yowsup can register without problems.

PS: Obvious, is a SIP destination number so, only voice calls are allowed.

shirioko commented 11 years ago

I find that hard to believe.

The S40 client details currently used by yowsup have stopped working a long time ago and the WP7 client details that Jannik and I recovered here https://github.com/tgalal/yowsup/pull/133 are the same as used by WhatsApi

andonidiaz commented 11 years ago

Thanks! I've do it! Now I have a little doubt... Is it possible to spoof the headers (android model, whatsapp client version...) to steal an user without getting unautentificated from the first device?

wiitohzjeh commented 11 years ago

@shirioko: i try again with the Yowsup. you'r right, didnt work. sorry, my fault.

shirioko commented 11 years ago

@wiitohzjeh no probs :)

@Debci no. Each phone number has one valid password for logging in, requesting a new password will invalidate the old one. Logging in will also replace all existing connections.

There is one exception though. WP7 uses an audio stream hack to push messages to the phone in background. It's buggy as hell, but it might not affect your existing connection. This might allow you to receive messages for one phone number from two different places at the same time.

wiitohzjeh commented 11 years ago

@shirioko: the example:

c:\>c:/php/php.exe -q test.php
Array
(
    [cc] => 1
    [in] => 2064561511
    [to] => 12064561511
    [lg] => en
    [lc] => AI
    [method] => voice
    [mcc] => 204
    [mnc] => 008
    [token] => 3fe9a483d90af7940569ed969c3309c7
    [id] => m%ad%1f%22%3f%5e%e0%84%93%29%2c%2b%234%92%13v%0d%dd%5c
)
stdClass Object
(
    [status] => fail
    [reason] => no_routes
    [retry_after] => 3600
)
shirioko commented 11 years ago

try using these Android client details and see if it works: https://github.com/venomous0x/WhatsAPI/commit/b62464c7b43d9f6ece86c4c09ec22d4d589b382e

wiitohzjeh commented 11 years ago

@shirioko: see

[lc] => AI

and in countries.csv

"Anguilla",1,365,"AI","en"

This is a Washington number, http://www.areacodehelp.com/where/area_code_206.shtml. Maybe for that the "no_routes"?

shirioko commented 11 years ago

In that case you can manually specify the language code and location code

$w->codeRequest("voice", "US", "en");
wiitohzjeh commented 11 years ago

@shirioko: nothing, :(

Array ( [cc] => 1 [in] => 4256063303 [to] => 14256063303 [lg] => EN [lc] => US [method] => voice [mcc] => 204 [mnc] => 008 [token] => 973a642c588fa9b3553726a63cae2899 [id] => %21%131%86%94%b5%0fr%2c%9apyw%18%03%3b%08g%86%19 ) stdClass Object ( [status] => fail [reason] => no_routes [retry_after] => 3600 )
shirioko commented 11 years ago

Did this work before? I recall trying to register my home number a while back, which was actively refused by WhatsApp.

shirioko commented 11 years ago

BTW I found the bug which identified your number as Anguilla, fixing it in a few minutes

shirioko commented 11 years ago

Right, can you download the latest code and try it again without specifying the language or country code? It should be able to detect your numbers as U.S. now :)

wiitohzjeh commented 11 years ago

@shirioko now works! thanks :)

ghost commented 10 years ago

How can i get my identity?

vikrantchoudhary commented 10 years ago

Looks like many things has been changed in git code itself & whatapp is also upgraded. Does this still works. C:\SourceCode\WhatsAPI\src\php>php -q testMessage.php Array ( [cc] => 91 [in] => 99xxxxxxxx [to] => 9199xxxxxxxx [lg] => en [lc] => 91 [method] => 867471 [mcc] => 404 [mnc] => 001 [token] => tI%2B5QWOMfPgnFtKFWJnGG3t4LwQ%3D [id] => %fa%5c%ad%23%0d%16%c5%df%cf%f13%c7%bc%88%8d%11%c4%ae%99%95 ) PHP Fatal error: Call to undefined function curl_init() in C:\SourceCode\WhatsAPI\src\php\whatsprot.class.php on line 1765 PHP Stack trace: PHP 1. {main}() C:\SourceCode\WhatsAPI\src\php\testMessage.php:0 PHP 2. WhatsProt->codeRequest() C:\SourceCode\WhatsAPI\src\php\testMe ssage.php:16 PHP 3. WhatsProt->getResponse() C:\SourceCode\WhatsAPI\src\php\whatsp rot.class.php:317

Fatal error: Call to undefined function curl_init() in C:\SourceCode\Wh atsAPI\src\php\whatsprot.class.php on line 1765

Call Stack: 0.0003 127152 1. {main}() C:\SourceCode\WhatsAPI\src\php\test Message.php:0 0.0176 1255088 2. WhatsProt->codeRequest() C:\SourceCode\Whats API\src\php\testMessage.php:16 0.0247 1258032 3. WhatsProt->getResponse() C:\SourceCode\Whats API\src\php\whatsprot.class.php:317

shirioko commented 10 years ago

Fatal error: Call to undefined function curl_init()

You need to enable the php_curl extension

NakulSharmaIt commented 9 years ago

Dear @shirioko,

While i am registering my number using exampleRegister.php It is showing Array ( [method] => sms [in] => 8010201735 [cc] => 91 [id] => %d3%a6%5c3r%b1%e2%ee%1f%db%cb%17%c3rs%b0%1c%bc%11%d5 [lg] => hi [lc] => IN [token] => wa8F5qkL8bdGtxuuagmLDxf%2Bo2Y%3D [sim_mcc] => 000 [sim_mnc] => 000 ) stdClass Object ( [status] => fail [reason] => old_version )

And i didn't get any code to my mobile.

Please help me.

twixr commented 9 years ago

@NakulSharmaIt It's given a reason: 'old_version' so just grab the latest version of the code (update whatsapp version and user agent) That should work.

onlymaj commented 9 years ago

i still get no_route , whats the problem ?

twixr commented 9 years ago

That's a whole different issue, take a look at closed issues because you're not the only one ;)

— Sent from Mailbox

On Fri, Jan 9, 2015 at 11:09 AM, Mohammad Amin Jahany ( OnlyMAJ ) notifications@github.com wrote:

i still get no_route , whats the problem ?

Reply to this email directly or view it on GitHub: https://github.com/venomous0x/WhatsAPI/issues/403#issuecomment-69315506

onlymaj commented 9 years ago

@jessereitsma i have checked for 3 days the wikies and had headache . i dunno what to do . can you help me on that ?

twixr commented 9 years ago

Yes, I have found a workaround on iPhone, which probably also work on Android.If I have time today i'll post a little tutorial

— Sent from Mailbox

On Fri, Jan 9, 2015 at 1:40 PM, Mohammad Amin Jahany ( OnlyMAJ ) notifications@github.com wrote:

@jessereitsma i have checked for 3 days the wikies and had headache . i dunno what to do . can you help me on that ?

Reply to this email directly or view it on GitHub: https://github.com/venomous0x/WhatsAPI/issues/403#issuecomment-69329343

onlymaj commented 9 years ago

@jessereitsma Thanks , i'll wait for your magics :+1: )

NakulSharmaIt commented 9 years ago

@jessereitsma thanks. I got new api and that is working fine for me.

But while registering a number it depends on the mobile network because at one day i did register my number successfully but on next day i am not able to do so and it consistently showing no_routes.

TimoSmido commented 9 years ago

Please i need help i have been traying to get the code whatsapp in my site php but i just have this result [status] => fail [reason] => no_routes [retry_after] => 3600 need help

developez commented 9 years ago

Do this works?

$username = '34XXXXXXXXX';                                  
$identity = strtolower(urlencode(sha1($username, true)));   
$nickname = "FOO";
$w = new WhatsProt($username, $identity, $nickname, $debug);
$w->codeRequest('sms');

I get this:

Array ( [method] => sms [in] => XXXXXXXXX [cc] => 34 [id] => %fb%a2dt%24%c5%08%e3%7fm%c2x%e5%0b%5cc%e8%ae%21%9d [lg] => es [lc] => ES [token] => ioYXf48jFKbZ4bjc6I%2FqtXne9t0%3D [sim_mcc] => 000 [sim_mnc] => 000 ) stdClass Object ( [status] => fail [reason] => old_version )

twixr commented 9 years ago

The error says: 'status: fail, reason: old_version' Why do you ask it works? You post your own answer. No, it don't work, reason: you have an old version. Use the latest code from the original repo: https://github.com/mgp25/WhatsAPI-Official

developez commented 9 years ago

I obtained the last code from this repo today. I don't know if the issue is that I use this:

$identity = strtolower(urlencode(sha1($username, true)));   

Or that is not used in the code request and only for password request?

Now I am going to download the code from the mgp25's repo.

twixr commented 9 years ago

old_version is a check on version number and user agent in the whatsprot class. https://github.com/mgp25/WhatsAPI-Official/blob/master/src/whatsprot.class.php#L50-L51

developez commented 9 years ago

Thank you, I wonder if I can re-use the code received in my smarthphone 3 months ago? I have got the code saved in my sms inbox.

twixr commented 9 years ago

Nope, the code is valid once

DMido commented 9 years ago

i have a problem when checking if number is existed or not and get password hash when i use $identity = strtolower(urlencode(sha1($username, true))); the response invalid parameter id i get identity from WART and put it in .dat file and it worked fine and get the hash but it doesn't work i want to know how the system create the identity sent to whatsapp

jojoba2010 commented 9 years ago

I am .net one! can give me sample

abdulbasitnawab commented 9 years ago

Awesome, it is working example,

play2winclub commented 7 years ago

any one can share latest method how to get the whatapps password ?

Rhanzato commented 7 years ago

HI play2winclub , after included 'chat-API-master' directory in your project, you need 2 steps to obtain password: 1st: include 'src/requestCode.php'; use only this code 2nd: so delete code and replace with include 'src/getPassword.php'; Cheer

grifter-yo commented 7 years ago

Hi

I am new to all kinds of coding and trying to learn through examples.

I want to make a software where I can send Whatsapp messages through a user interface (so all those things like a textbox to write the messages, creating lists of contacts etc.)

Is there a way I can achieve that using this API and its php code?

Any help or advice would be appreciated, since I am at zero.

Thanks

twixr commented 7 years ago

@grifter-yo It's possible, yes. However, I would recommend start learning basic HTML / Javascript en after that the basics of PHP before you dive into this.

CanD62 commented 7 years ago

Array ( [cc] => 62 [in] => 8529xxxxxx [lg] => id [lc] => ID [id] => ��f��!wq�lo8u���� � [token] => 4X1dGhSYOl0p+Kgcyh8Cb4ZGimo= [mistyped] => 6 [network_radio_type] => 1 [simnum] => 1 [s] => [copiedrc] => 1 [hasinrc] => 1 [rcmatch] => 1 [pid] => 5827 [rchash] => acd3ea1562881e5c6302cdfd7ddd2a79e9667e6ec04206eb5b043b2e2e3cb057 [anhash] => 31f35e74305af723a3e0ba3ca4b3429e [extexist] => 1 [extstate] => 1 [mcc] => 510 [mnc] => 000 [sim_mcc] => 510 [sim_mnc] => 000 [method] => sms ) stdClass Object ( [login] => 628529xxxxx [status] => fail [reason] => old_version )

what old_version now ?

jfarissi commented 6 years ago

I use WART Ver: 1.8.2.2 and i receive this message {status:fail,reason:old_version} any idea ?

kevinpeters471 commented 5 years ago

hello everyone! I had seen so many recommendations on cyberhackingspecialist AT GMAIL DOT COM, so I contacted him to help me Check my wifes’s cell phone and WhatsApp to see if she was having an affair. Just like Magic, I got the files to get it done and I have access to my husbands phone. He was really efficient and I have access to everything including phone calls, logs,sms,surrounding and location. What I like about the job is that it cannot be traced back to me. I have this working for 3 months now. I am just another satisfied customer. Thanks to cyberhackingspecialist AT GMAIL DOT COM you can also text them at +15165312529 or on whatsapp +1-516-200-1939

Felipemendoza12093456 commented 5 years ago

With RUSSIANCYBERHACKERS@GMAIL.COM I had no problem in catching my spouse and getting into her phone without her knowing about the hack like I did. And this hacker and his term where helpful in 4 hours I got results of all my wife text messages, deleted text messages, facebook, whatsapp ICQ and viber. I read all her conversations with people right on my phone though I have never done this before. this is my first time of using RUSSIANCYBERHACKERS@GMAIL.COM services and they delivered 100%