venomous0x / WhatsAPI

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

Unable to send messages using the -s command, able to do so with the -i one #172

Open Juliopp opened 11 years ago

Juliopp commented 11 years ago

Well, the title is quite self explaining :) I don´t know how to explain it any better. This is the output for the -s command:

C:\WINDOWS\system32>php C:\Users\Julio\Desktop\WhatsAPI-master\whatsapp.php -s 3
4644471009 OhGod
[] Logging in as 'N' (346688XXXXX)

tx  <stream:features>
tx    <receipt_acks></receipt_acks>
tx  </stream:features>

tx  <auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="WAUTH-1" user="346
68820483"></auth>

rx  <start from="s.whatsapp.net"></start>

rx  <stream:features>
rx    <receipt_acks></receipt_acks>
rx  </stream:features>

rx  <challenge xmlns="urn:ietf:params:xml:ns:xmpp-sasl">¬üu?â☻{↓'ÑÍ└┼┐ :ª↔VÄ</ch
allenge>

tx  <response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">*♣▒?Íz+\}║£ _îSçTTy→È©}Uz
─└¸├ûÙ☻mJªâ8¡P 0¢¤"↔</response>

rx  <success xmlns="urn:ietf:params:xml:ns:xmpp-sasl" status="active" kind="free
" creation="133279748X" expiration="136433348X">┴BC¨ÿ"Ù┐Æ▀'|ñQ1~▼Û[ó</success>

[] Request last seen 346444XXXXX:
tx  <iq to="@s.whatsapp.net" type="get" id="34644471009" from="346688XXXXX@s.wha
tsapp.net">
tx    <query xmlns="jabber:iq:last"></query>
tx  </iq>

[] Send message to 34644471009: OhGod

tx  <message to="346444XXXXX@s.whatsapp.net" type="chat" id="13531789XX-1">
tx    <x xmlns="jabber:x:event">
tx      <server></server>
tx    </x>
tx    <body>OhGod </body>
tx  </message>

Could you help me? Thanks :)

Netpolice commented 11 years ago

Update the line 108 as following

if ($_SERVER['argv'][1] == "-i") { echo "\n[] Request last seen $dst: "; $wa->RequestLastSeen(time()."-1","$dst"); }

guidomgs commented 11 years ago

that still not working for me...