我試圖使用WhatsAPI庫通過計算機向智能手機發送消息。我通過在Linux Ubuntu計算機上使用mitmproxy
獲得了憑證,然後爲iPhone安裝了證書,並將iPhone連接到了與我連接Linux計算機的相同Wi-Fi網絡(我設置了網絡以供使用我的代理)。WhatsAPI響應
所以我編輯與我在上一步中獲得的證書文件whatsapp.php
(包含在Github上封裝)和我開始在殼牌的服務將消息發送到我的手機以這樣的方式
./whatsapp.php -s dest phone prova
當我按下「確認」鍵就開始工作,我得到如下:
[] Logging in as 'WhatsAPI Test' (from phone)
tx <stream:features></stream:features>
tx <auth xmlns="urn:ietf:params:xml:ns:xmpp-sasl" mechanism="WAUTH-2" user="from phone">??lg
@*?*]?Z??ù?%??\?Z??Ǚ??R0??q??*???kX?L?Y%3????p>R-A_j'??ǯYN?1ƿ#t?$s?????ORLUG?dBvoI?</auth>
rx <start from="s.whatsapp.net"></start>
rx <stream:features></stream:features>
rx <challenge>??2?a?
?dxւ??㶄?</challenge>
tx <response xmlns="urn:ietf:params:xml:ns:xmpp-sasl">u^?
)???4!???N?$+?H5??????Da?P</response>
rx <success t="1396431143" kind="free" status="active" creation="1396347026" expiration="1427883026">???'17?,E??.??}??</success>
rx <message from="dest [email protected]" id="1396425196-49" retry="3" offline="3" type="text" t="1396431017" notify="Luca">
rx <body>Prova</body>
rx </message>
rx <ib from="s.whatsapp.net">
rx <offline count="1"></offline>
rx </ib>
tx <presence name="WhatsAPI Test"></presence>
[] Request last seen dest phone: tx <iq to="dest [email protected]" type="get" id="lastseen-1396431145-1" xmlns="jabber:iq:last">
tx <query></query>
tx </iq>
rx <stream:error>
rx <xml-not-well-formed></xml-not-well-formed>
rx </stream:error>
[] Send message to dest phone: prova
tx <message to="dest [email protected]" type="text" id="message-1396431150-2" t="1396431150">
tx <x xmlns="jabber:x:event">
tx <server></server>
tx </x>
tx <notify xmlns="urn:xmpp:whatsapp" name="WhatsAPI Test"></notify>
tx <request xmlns="urn:xmpp:receipts"></request>
tx <body>prova </body>
tx </message>
我不理解,如果服務器已經擬定好我的要求還是不行,現在我din't上收到任何消息的WhatsApp我的智能手機這裏有些不對勁?