Author Topic: WhatsApp protocol  (Read 460798 times)

0 Members and 2 Guests are viewing this topic.

Offline ghazan

Re: WhatsApp protocol
« Reply #675 on: 21 09 2015, 19:49:12 »
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.

typedef struct {
   DWORD dwFlags;          // PRFF_*
   DWORD timestamp;        // unix time
   MAllStrings descr;      // file description
   int fileCount;          // number of files being transferred
   MAllStringArray files;  // array of file names
   LPARAM lParam;          // extra space for the network level protocol module
} PROTORECVFILET;
ProtoChainRecvFile(MCONTACT hContact, PROTORECVFILET *pre);

   // Send chain event
   PROTORECVFILET prf;
   prf.dwFlags = PRFF_UNICODE;
   prf.timestamp = _time32(NULL);
   prf.descr.w = dat->pwszDescription;
   prf.fileCount = 1;
   prf.files.w = &dat->pwszFilesList;
   prf.lParam = dwIDRequest;
   ProtoChainRecvFile(hContact, &prf);
 

Offline Lutheren

  • Newbie
  • *
  • Posts: 1
Re: WhatsApp protocol
« Reply #676 on: 29 09 2015, 20:47:03 »
Hi,
first of all, sry for my bad english. I hope you understand me anyways.
I have a problem with my Whatsapp plugin.
I installed Miranda and the Whatsapp Plugin, got the password per sms and went online.
I added new contacts, but they are always offline and they don't recieve the messages i sent (and vice versa)
We spoke over teamspeak, so I know for sure, that they were online.
Can someone help me?
MfG Lutheren
 

Offline Dimsok

  • Sr. Member
  • ****
  • Posts: 282
  • Country: ru
Re: WhatsApp protocol
« Reply #677 on: 03 10 2015, 06:39:03 »
After a month of appealing and a bunch of mailings to whatsapp support, at last i have recieved that:

Peter (WhatsApp Support)

Oct 2, 18:09

Hi,

Thanks for your message. Your WhatsApp account was banned because you violated our Terms of Service.

Please review this FAQ article for more examples of actions that result in an account becoming banned.

At this time, your account has been unbanned. Please abide by the following:
- Only communicate with users you know and those who wish to receive messages from you.
- Ask your friends to save your phone number in their address book.
- Use the Broadcast feature if you want to send the same message to multiple contacts at once.

Should we determine that your actions continue to violate our Terms of Service, your account will be banned again. There will be no possibility of an appeal.

Best
-Peter

WhatsApp Support Team

Interested in translating for us? Please visit our website: http://translate.whatsapp.com

Take a look at our FAQ: http://www.whatsapp.com/faq

Nothing has said about using only native client. I have setted up whatsapp with autoconnecting plugin, and i often reconnect internet, so maybe the reason of banning in it? Should i turn of autoconnecting of whatsapp to low down the risk to be banned again?
 

Offline Thug

Re: WhatsApp protocol
« Reply #678 on: 05 10 2015, 15:47:48 »
 

Offline Corak

Re: WhatsApp protocol
« Reply #679 on: 07 10 2015, 06:15:50 »
Cannot reconnect after some disconnection:


Spoiler
Code: [Select]
[9:16:14 0998] [WhatsApp_1] >> <challenge>
Ѓж!а vаЗ.СљќЅ)BЕ/</challenge>

[9:16:14 0998] [WhatsApp_1] >> Send response
[9:16:16 0998] [WhatsApp_1] Exception: Login failure
[9:16:16 0998] [WhatsApp_1] (01414340:3316) Connection closed internal
[9:16:16 0998] [WhatsApp_1] (01414340:4294967295) Connection closed
[9:16:16 0998] [WhatsApp_1] Set status to offline
[9:16:16 0998] [WhatsApp_1] Break out from loop
[9:16:23 0E28] [WhatsApp_1] ===== Beginning SetStatus process
[9:16:23 15E4] [WhatsApp_1] Connecting...
[9:16:23 15E4] [WhatsApp_1] Connection request to c.whatsapp.net:5222 (Flags 4)....
[9:16:23 15E4] [WhatsApp_1] (01414340) Connecting to server c.whatsapp.net:5222....
[9:16:23 15E4] [WhatsApp_1] (01414340) Connecting to ip 173.192.222.170:5222 ....
[9:16:23 15E4] [WhatsApp_1] (3180) Connected to c.whatsapp.net:5222
[9:16:23 15E4] [WhatsApp_1] >> sent stream start
[9:16:23 15E4] [WhatsApp_1] >> sent features
[9:16:23 15E4] [WhatsApp_1] >> send auth, auth blob size 20
[9:16:24 15E4] [WhatsApp_1] >> read stream start
[9:16:24 15E4] [WhatsApp_1] >> <stream:features>
</stream:features>

[9:16:24 15E4] [WhatsApp_1] >> <challenge>
@e0ЪыjҐiОA,ъ‘Ђ
y+в</challenge>
[close]


Restored and connected normally only after full miranda restart.
« Last Edit: 07 10 2015, 06:33:06 by Corak »
 

Offline Corak

Re: WhatsApp protocol
« Reply #680 on: 11 10 2015, 12:34:54 »
Got crash on "waconnection.cpp: WAConnection::logData"
http://trac.miranda-ng.org/ticket/1063


waconnection.cpp: WAConnection::logData
Code: [Select]
Likely cause of the crash plugin: WhatsApp protocol

Exception: Access Violation at address 78ABF97B. Reading from address 1DB990AA.

Stack Trace:
---------------------------------------------------------------
78ABF97B (MSVCR100 78AA0000): (filename not available) (0): vsprintf_s_l
78ABF59B (MSVCR100 78AA0000): (filename not available) (0): wcsncat_s
78ABF5FF (MSVCR100 78AA0000): (filename not available) (0): vsprintf_s_l
78AC1B7E (MSVCR100 78AA0000): (filename not available) (0): vsprintf_s
177F1455 (WhatsApp 177E0000): e:\sources\miranda_ng_compilation\protocols\whatsapp\src\whatsapi++\waconnection.cpp (94): WAConnection::logData
177F93F4 (WhatsApp 177E0000): e:\sources\miranda_ng_compilation\protocols\whatsapp\src\whatsapi++\walogin.cpp (108): WALogin::readFeaturesUntilChallengeOrSuccess
177F8F79 (WhatsApp 177E0000): e:\sources\miranda_ng_compilation\protocols\whatsapp\src\whatsapi++\walogin.cpp (46): WALogin::login
177E4E6E (WhatsApp 177E0000): e:\sources\miranda_ng_compilation\protocols\whatsapp\src\connection.cpp (76): WhatsAppProto::stayConnectedLoop
1224C554 (mir_core 12240000): e:\sources\miranda_ng_compilation\src\mir_core\src\threads.cpp (154): forkthreadex_r
78AFC556 (MSVCR100 78AA0000): (filename not available) (0): endthreadex
78AFC600 (MSVCR100 78AA0000): (filename not available) (0): endthreadex
7C80B729 (kernel32 7C800000): (filename not available) (0): GetModuleFileNameA
[close]
 

Offline Cassio

Re: WhatsApp protocol
« Reply #681 on: 14 10 2015, 13:47:50 »
I've been working on an update for file transfers and need some help:

How can resizing an image and get it's bytes be done properly? My workaround is saving to disk and then load again:
Code: [Select]
ResizeBitmap resize = { 0 };
if ((resize.hBmp = Bitmap_Load(ppszFiles[0])) == NULL)
return 0;
resize.size = sizeof(resize);
resize.fit = RESIZEBITMAP_KEEP_PROPORTIONS;
resize.max_height = resize.max_width = 100;

HBITMAP hbmpPreview = (HBITMAP)CallService(MS_IMG_RESIZE, (LPARAM)&resize, 0);
if (hbmpPreview == NULL)
return 0;

tstring abc = _T("WaImgTemp.jpg"); // temp image path
TCHAR tszTempFile[MAX_PATH];
_tcsncpy_s(tszTempFile, abc.c_str(), _TRUNCATE);

IMGSRVC_INFO saveInfo = { sizeof(saveInfo), 0 };
saveInfo.hbm = hbmpPreview;
saveInfo.tszName = tszTempFile;
saveInfo.dwMask = IMGI_HBITMAP;
saveInfo.fif = FIF_JPEG;
CallService(MS_IMG_SAVE, (WPARAM)&saveInfo, IMGL_TCHAR); // save image

HANDLE hFile = CreateFile(tszTempFile, GENERIC_READ, FILE_SHARE_READ, NULL, OPEN_EXISTING, FILE_ATTRIBUTE_NORMAL, NULL);
if (hFile == INVALID_HANDLE_VALUE)
return NULL;

DWORD upperSize, lowerSize = GetFileSize(hFile, &upperSize);
std::vector<unsigned char> *result = new std::vector<unsigned char>(lowerSize);
ReadFile(hFile, (void*)result->data(), lowerSize, &upperSize, NULL);
CloseHandle(hFile);

fmsg->icondata = result;
 

Offline Wishmaster

Re: WhatsApp protocol
« Reply #682 on: 14 10 2015, 14:05:32 »
Forget it...You mean how to get its size in bytes?
« Last Edit: 14 10 2015, 14:17:48 by Wishmaster »
 

Offline Cassio

Re: WhatsApp protocol
« Reply #683 on: 14 10 2015, 14:23:19 »
No I need a byte representation of the resized image (=icon) to be put in a std::vector<unsigned char> *
 

Offline ghazan

Re: WhatsApp protocol
« Reply #684 on: 14 10 2015, 17:47:48 »
No I need a byte representation of the resized image (=icon) to be put in a std::vector<unsigned char> *
Look at GetBitmapInfo() win api function
 

Offline Corak

Re: WhatsApp protocol
« Reply #685 on: 18 10 2015, 15:49:05 »
Got some fresh crash on whatsapp:
+ This crash simply killed my profile database (zero all data).

http://trac.miranda-ng.org/ticket/1074

WASocketConnection::`scalar deleting destructor'
Code: [Select]
Likely cause of the crash plugin: WhatsApp protocol

Exception: Access Violation at address 7C9109DA. Reading from address 00050011.

Stack Trace:
---------------------------------------------------------------
7C9109DA (ntdll 7C900000): (filename not available) (0): wcsncpy
7C91080B (ntdll 7C900000): (filename not available) (0): wcsncpy
78AB016A (MSVCR100 78AA0000): (filename not available) (0): free
177ECC45 (WhatsApp 177E0000): (filename not available) (0): WASocketConnection::`scalar deleting destructor'
177E4CA9 (WhatsApp 177E0000): e:\sources\miranda_ng_compilation\protocols\whatsapp\src\connection.cpp (46): WhatsAppProto::stayConnectedLoop
1224C554 (mir_core 12240000): e:\sources\miranda_ng_compilation\src\mir_core\src\threads.cpp (154): forkthreadex_r
78AFC556 (MSVCR100 78AA0000): (filename not available) (0): endthreadex
78AFC600 (MSVCR100 78AA0000): (filename not available) (0): endthreadex
7C80B729 (kernel32 7C800000): (filename not available) (0): GetModuleFileNameA
[close]
« Last Edit: 18 10 2015, 15:53:10 by Corak »
 

Offline Wishmaster

Re: WhatsApp protocol
« Reply #686 on: 22 10 2015, 20:10:56 »
Some very rare crashes on relogin have been fixed. :)
 

Offline Ducados

Re: WhatsApp protocol
« Reply #687 on: 27 10 2015, 18:07:04 »
Today I had to log to WA on the phone and now WA refuses to send me a new registration code. It complains that WA version is too old:

Quote
[19:03:26 0EB0] [WhatsApp_1] (07EC93B8:672) Data received
HTTP/1.1 200 OK

[19:03:26 0EB0] [WhatsApp_1] (07EC93B8:672) Data received
Connection: close
Server: Yaws 2.0
Date: Tue, 27 Oct 2015 18:03:26 GMT
Content-Length: 41
Content-Type: text/json ; charset=utf-8


[19:03:26 0EB0] [WhatsApp_1] (07EC93B8:672) Data received
{"status":"fail","reason":"old_version"}

[19:03:26 0EB0] [WhatsApp_1] (07EC93B8:672) Connection closed internal
[19:03:26 0EB0] [WhatsApp_1] (07EC93B8:4294967295) Connection closed
[19:03:26 0EB0] [WhatsApp_1] Server response: {"status":"fail","reason":"old_version"}
 

Offline CleriC

Re: WhatsApp protocol
« Reply #688 on: 29 10 2015, 05:57:41 »
Today cannot connect WhatsApp. Last evening everything worked. Does anyone have this?
Miranda 95.5 alpha #15639.  WhatsApp plugin 0.1.3.2.
«События происходят, Дела делаются, Но нет индивидуального деятеля».
«Events happen, deeds are done, but there is no individual doer thereof».
 

Offline Thug

Re: WhatsApp protocol
« Reply #689 on: 29 10 2015, 06:45:50 »
Yeah, can't connect either. I have tried to reregister, and got this: