davidgfnet / whatsapp-purple

WhatsApp protocol implementation for libpurple (pidgin)
855 stars 211 forks source link

Can't receive messages from certain contacts (encryption?) #265

Closed Zap123 closed 5 years ago

Zap123 commented 9 years ago

Hi everyone, I'm having problem receiving messages from a contact.

 Tag: chatstate
at[from]=xxxxxxxxxxxxxxxx@s.whatsapp.net
Data:  ...
 Tag: composing
 Data:  ...

Tag: message
at[from]=xxxxxxxxxxxxxxxx@s.whatsapp.net
at[id]=1431374127-3
at[notify]=Jess ✨
at[t]=1431374844
at[type]=text
Data:  ...
 Tag: enc
 at[av]=Android/2.12.5
 at[type]=msg
 at[v]=1
 Data: 3
!�?�9� ...

Received message stanza...
Tag: receipt
at[id]=1431374127-3
at[t]=1
at[to]=xxxxxxxxxxxxxxxx@s.whatsapp.net
at[type]=read
Data:  ...

Tag: ack
at[class]=receipt
at[from]=xxxxxxxxxxxxxxxx@s.whatsapp.net
at[id]=1431374127-3
at[type]=read
Data:  ...

Tag: chatstate
at[from]=xxxxxxxxxxxxxxxx@s.whatsapp.net
Data:  ...
 Tag: paused
 Data:  ...

Tag: message
at[from]=xxxxxxxxxxxxxxxx@s.whatsapp.net
at[id]=1431374127-4
at[notify]=Jess ✨
at[t]=1431374845
at[type]=text
Data:  ...
 Tag: enc
 at[av]=Android/2.12.5
 at[type]=msg
 at[v]=1
 Data: 3
!�?�9� ...

Received message stanza...
Tag: receipt
at[id]=1431374127-4
at[t]=1
at[to]=xxxxxxxxxxxxxxxx@s.whatsapp.net
at[type]=read
Data:  ...
davidgfnet commented 9 years ago

Yes it seems your messages are being encrypted end to end. Go get a new password at davidgf.net/whatsapp/pwd.html. It will register you as S40 so no encryption again. Before you do that: could you gete a wireshark trace and send it to me (+password). Make sure to open pidgin After start capturing. Thanks

Zap123 commented 9 years ago

I sent you an email with the logs. I tried using your "davidgf.net/whatsapp/pwd.html", but when I entered my received code, I couldn't see the password. In the Firefox console I have: TypeError: elem is null classie.js:33:4 SyntaxError: JSON.parse: unexpected character at line 1 column 1 of the JSON data jquery.js:4:15731 SyntaxError: JSON.parse: unexpected non-whitespace character after JSON data at line 1 column 2 of the JSON data So I tried using the password I received spying the GET response, but I'm still having encrypted message from that contact.

dequis commented 9 years ago

Go get a new password at davidgf.net/whatsapp/pwd.html. It will register you as S40 so no encryption again.

Yowsup does the same thing, right? This line seems to indicate it does. And I guess the problem is WART?

Are you sure that the resource being set to Android doesn't affect this?

(asking for a user on irc with a very similar problem, if you don't mind the ticket hijack)

Zap123 commented 9 years ago

Changed the resource to "S60-2.12.21" and now I receive unencrypted messages, so I don't think it's something that has to do with the registration, unless the registration set the resource of the plugin.

styxtwo commented 9 years ago

Same thing happened to me (Changing the resource fixed it as well). Is there any way we can get notified when we recieve encrypted messages? Had some people get mad at me for not responding xD.

davidgfnet commented 9 years ago

Yep, there is one pull requests I might merge. I spent this afternoon trying to register an account using a real android phone, then extracted the password and finally used it with the plugin. I cannot manage to get encrypted messages... My two android phones talk on the plain, so I cannot reproduce the error... Weird.

styxtwo commented 9 years ago

For what it's worth the phones I couldn't receive messages from were both I-phone 5's.