2014-04-02 1 views
0

WhatsAPI 라이브러리를 사용하여 컴퓨터에서 스마트 폰으로 메시지를 보내려고합니다. Linux 우분투 컴퓨터에서 mitmproxy을 사용하여 자격 증명을 얻은 다음 iPhone 용 인증서를 설치하고 Linux 컴퓨터에 연결된 동일한 Wi-Fi 네트워크에 iPhone을 연결했습니다 (사용을 위해 네트워크를 설정했습니다. 내 프록시).WhatsAPI 응답

그래서 나는 이전 단계에서 얻은 자격 증명과 (Github의 패키지에 포함) 파일 whatsapp.php을 편집하고 나는 이런 식으로 내 휴대폰에 메시지를 보내기 위해 셸에서 서비스를 시작 :

./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> 

서버가 아니라 내 요청을 정교하거나하지 않은 경우 I가 지금 나는 아무 WhatsApp에 메시지가 나타납니다 din't, 이해하고 있지 않다 내 스마트 폰. 뭔가 잘못 됐어?

답변

0

나는 이것이 꽤 오래된 것을 알고 있지만, 대답하고 싶습니다.

은 아래 라인에서 만들 수 없습니다 :

<message from="dest [email protected]" id="1396425196-49" retry="3" offline="3" type="text" t="1396431017" notify="Luca"> 
rx <body>Prova</body> 
rx </message> 

는 = "의 최종 도착 전화 @s에서

메시지를 보여줍니다 왜 인 대상 전화 번호를 변경되지 않았습니다. whatsapp.net "

또한

요청이 마지막의 최종 도착 전화를 보았다 : 텍사스의 IQ = "의 최종 도착 전화 @ s.whatsapp.net"

그냥 입력 대상의 전화 번호와 코드가 작동해야 벌금.

P.S. WhatsApi는 스팸을 지원하지 않으므로 그렇게하면 번호가 차단됩니다.

희망이 도움이됩니다.