Author Topic: WhatsApp protocol  (Read 437534 times)

0 Members and 6 Guests are viewing this topic.

Offline Wishmaster

Re: WhatsApp protocol
« Reply #660 on: 13 09 2015, 14:34:14 »
Thanks, I changed some minor details and comitted it :) r15345
« Last Edit: 13 09 2015, 14:37:52 by Wishmaster »
 

Offline Cassio

Re: WhatsApp protocol
« Reply #661 on: 13 09 2015, 17:03:32 »
Okay there has been a small bug in my code.
Here is a fix.
It should also now display the following in the contact list:
"Last online TIMESTAMP"; When a user is online currently
"Denied: last online TIMESTAMP"; When the user is offline and has blocked "last seen". The time the user was last online simultaneously is used
"Last seen TIMESTAMP"; When a user is offline but "last seen" info is available.
 

Offline Wishmaster

Re: WhatsApp protocol
« Reply #662 on: 13 09 2015, 17:16:09 »
"Denied: last online TIMESTAMP"; When the user is offline and has blocked "last seen". The time the user was last online simultaneously is used
Why do you show a timestamp there? If it is denied, it will use outdated timestamp from database, and if a user denies it all the time, that timestamp will be old and outdated. I do not see much point in doing it like that.

BTW I noticed that "int lastSeen = getDword(hContact, WHATSAPP_KEY_LAST_SEEN, 0);" is quite a bad idea, should be DWORD to read a time correctly. Same for things like "atoi(lastSeen.c_str())" which returns an int, not a DWORD.
« Last Edit: 13 09 2015, 17:44:15 by Wishmaster »
 

Offline Dimsok

  • Sr. Member
  • ****
  • Posts: 282
  • Country: ru
Re: WhatsApp protocol
« Reply #663 on: 13 09 2015, 17:34:32 »
Can Miranda sends voice call with verification call during registration like WART does?
 

Offline Cassio

Odp: Re: WhatsApp protocol
« Reply #664 on: 13 09 2015, 19:07:17 »
Why do you show a timestamp there? If it is denied, it will use outdated timestamp from database, and if a user denies it all the time, that timestamp will be old and outdated. I do not see much point in doing it like that.
Yes it does read an old timestamp BUT it is updated when a user comes online so if miranda is running, users that go on/off are tracked, even though they blocked it by protocol. It's a workaround but I find it very useful. :)
The "Denied" is an additional info to know that the timestamp may not be totally up to date as the user blocked it.

Will you commit it? The behaviour is definitely better than showing time(NULL) whatever happend as it was before.

BTW I noticed that "int lastSeen = getDword(hContact, WHATSAPP_KEY_LAST_SEEN, 0);" is quite a bad idea, should be DWORD to read a time correctly. Same for things like "atoi(lastSeen.c_str())" which returns an int, not a DWORD.

Yes please fix such things. I have a hard time with these datatypes and C++ not being typesafe... ^^
I'll keep it in mind :)

@Dimsok
It is not implemented currently but I'll have a look at this.
« Last Edit: 14 09 2015, 08:05:46 by Cassio »
 

Offline Thug

Re:WhatsApp protocol
« Reply #665 on: 14 09 2015, 14:38:13 »
Cassio, Hi. Do you mean we are supposed to see every whatsapp user's online status in our contact list now? Seems like still only those whom I have wrote recently or whose personal info I have checked are tracked ???
 

Offline Wishmaster

Re: WhatsApp protocol
« Reply #666 on: 14 09 2015, 18:58:03 »
Yes it does read an old timestamp BUT it is updated when a user comes online so if miranda is running, users that go on/off are tracked, even though they blocked it by protocol. It's a workaround but I find it very useful. :) The "Denied" is an additional info to know that the timestamp may not be totally up to date as the user blocked it. Will you commit it? The behaviour is definitely better than showing time(NULL) whatever happend as it was before.
Okay, comitted.
 

Offline Dimsok

  • Sr. Member
  • ****
  • Posts: 282
  • Country: ru
Re: WhatsApp protocol
« Reply #667 on: 15 09 2015, 11:50:49 »
Hm, i try to check how to pay it in emulator, but in bluestacks it says that my phone number is blocked. No paying options. Could it be possible that they block users who often use miranda plug or other not native clients?
 

Offline Dimsok

  • Sr. Member
  • ****
  • Posts: 282
  • Country: ru
Re: WhatsApp protocol
« Reply #668 on: 15 09 2015, 12:44:46 »
In terms of use at least i've found that they can block numbers which use to send messages with unofficial client's So using it is should be dangerous
 

Offline Corak

Re: WhatsApp protocol
« Reply #669 on: 16 09 2015, 13:28:45 »
When I press ask for code on this button, it sends code in SMS to my mobile.
I enter the code in two fields and press ENTER button.. And nothing - It just exits from account manager window/menu and I have to enter it again and press this "ask for code" again AFTER 30 min (because it have just ONE TRY and blocks text field)...
Could you make this text field enabled ALWAYS, so IF i mistakely press Enter or exit from Account manager I wouldnt have to ask for code again and again, I could just enter code I ALREADY have...
Also if it's possible to change "Enter" button event pressing to "Registration Code" button.. Because now those menu buttons and text field almost useless.
« Last Edit: 16 09 2015, 21:05:17 by Corak »
 

Offline Wishmaster

Re: WhatsApp protocol
« Reply #670 on: 16 09 2015, 19:49:36 »
I slightly changed it: After pressing "Request Code", both fields will be enabled forever, after pressing "Register Code" they will be disabled forever.
 

Offline Corak

Re: WhatsApp protocol
« Reply #671 on: 16 09 2015, 20:38:28 »
That's good! Better then was before! Thanks!
 

Offline Cassio

Re:WhatsApp protocol
« Reply #672 on: 20 09 2015, 21:18:30 »
Cassio, Hi. Do you mean we are supposed to see every whatsapp user's online status in our contact list now? Seems like still only those whom I have wrote recently or whose personal info I have checked are tracked ???

No, I'm not sure when exactly those presence respones are sent by the WA server or if/how it would be possible to get them all the time.

Dimsok,
Unofficial clients may get banned, that's correct. Switching between clients may increase your chances of this happening. That's why you shouldn't do that.
Use this plugin at your own risk.

---

I've implemented voice code requests by adding another button to the options/account dialog.
Also some clean up is done and reasons for failed registrations are shown now.
I cannot currently test the registration process but I don't see why anything could have become broken.

Btw: Is there a way to manually add a text message originating from the current user to the history/message window? Like the description sent with a file transfer.
« Last Edit: 20 09 2015, 21:35:46 by Cassio »
 

Offline Corak

Re: WhatsApp protocol
« Reply #673 on: 21 09 2015, 06:04:27 »
WhatsApp protocol on miranda is not receiving text messages from android / ios apps - they crypted messages.

Also Someone also metioned about "lack of axolotl encryption support" on forum:
​http://forum.miranda-ng.org/index.php?topic=56.630

Code: [Select]
[20:45:48 0B58] [WhatsApp_1] XML received
<message from="972547562463@s.whatsapp.net" id="wH5bpH1UjR9w1" notify="Vadim Dashevsky" of
fline="3" t="1442770518" type="text">
<enc type="pkmsg" v="1">
3жЪб!Д¤k@б NNхPiт>ФтTҐ3L}Ь\(x¶z!—Ёш бFbeQEc/[JGкJзjЖИ(фМ”Ш—жr"R3
!B°~ШGьпТ яЉ‘у ЈНkЦhхwЯ76fу|ЌВ

Ticked created here
http://trac.miranda-ng.org/ticket/1050

Netlog:
http://trac.miranda-ng.org/attachment/ticket/1050/netlog_whatsapp_crypted_messages.txt

Is there any way to fix it/uncrypt them?
 

Offline Wishmaster

Re: WhatsApp protocol
« Reply #674 on: 21 09 2015, 19:32:49 »
Cassio: I comitted that patch, thanks again :)