[Switch] [completely open source] client. NET version, open source letter client. net
[Switch] [completely open source] client. NET version
Directory
- Description
- Function
- Procedure
- References
Description
Two days ago, I studied the web version. Because I have read a blog about web protocols before, and then I tried to analyze it. On the way, I found it meaningless, but I didn't want to give up halfway. So I finally made a demo like this. The number of features is relatively small, similar to the official client functions (in fact, the difference is somewhat :)). The general principle is to use WebRequest to request data. The code in the demo is messy, but there are comments in key areas. Let's take a look at it first:
The Code has been uploaded to github. If you need it, take a look:
Source code download
Function
Can do:
- QR code Logon;
- Load recent contacts;
- Load all friends;
- Chat;
- View friend information.
Cannot do:
- You cannot send and receive complex messages. (In fact, no strings are supported. I have not resolved the emoticon. If you send a [hug], others will still be able to receive the correct emoticon );
- You cannot view your moments;
- I am too lazy to write it. I cannot use other functions.
Procedure
Open wx.qq.com, press F12, and scan the QR code on your mobile phone to log on. You can see all the processes:
The process is as follows:
I will not detail the specific URLs required in each step. They are available online. I also have some code (just a little bad ).
References
Some open source code and some tools are used in the source code:
- Webkit. NET (used in chat boxes and the built-in Webbrowser is not compatible );
- Json.net (parses json data returned by the server)
- Chrome)
Note: A 1205 error occurs frequently in Data Synchronization some time after login, which leads to the failure to receive messages sent by others. This error is not resolved yet and will be updated again after the cause is found.
All source codes follow the MIT protocol. Open source is helpful. Thank you!