Get user information and user signature now
Note that the required cookies will not be mentioned later. You do not need to manually set cookies when using wininet. You can directly view the cookie data captured by packet capture when using socket communication.
1. Get user information
The command used to obtain user information is 5C.
Use post to send the following data to the http://web-proxy2.qq.com/conn_s (either of the three), and the server returns the user information data.
1030196367; 5C; 0; fb0146dd; 88;
The first is the QQ number, the second is the command, and the user information is obtained using 5C; the third is the message serial number, it is the number of the message sent by the client to the server (the first 10 in many articles are fixed and so on, in fact, they are incorrect. The correct data can be obtained every time 0 is sent ); the fourth is the so-called token, which is officially called web_session; the fifth is a sub-command, which means to get your own information.
The server returns the following data:
1030196367; 5C; 0; 88; 0; 1; 9; 0; 3;
The first is your QQ number, the second is the command, which means that this data is the user information, the third is the message serial number at the request, and the fourth is 88, it is the sub-Command sent. The fifth is 0. If it is not 0, it is wrong. Only 0 is used to process the subsequent data. The sixth is the level of the Account, for example, level 1 is a star, level 16 is a sun, Level 7 is the number of online days, Level 8 is the VIP level, and level 9 is the number of remaining upgrade days.
Send:
1030196367; 5C; 0; 5cb2aea5; 89; 2; xxxx;
The first one does not need to be said; the second is the command number, the third is the message number used by the system; the fourth is the login token (web_session); the fifth is 89, that is, sub-commands are used to obtain information about friends. The sixth value is 2, indicating that information about two accounts is to be obtained. The seventh value is two accounts.
Return Value:
1030196367; 5C; 0; 89; 0; xxxx; 32; 0; xxxx; 33; 0;
The first is your QQ number; the second is the command number; the third is the message number; the fourth is the sub-command number; the fifth is 0, which is the correct data; XXXX is the account, the last two data types are level and VIP level.
2. Obtain the personalized signature of a friend
Command: 67
Send:
1030196367; 67; 0; fb0146dd; 03; 3; xxxx;
The first four won't be mentioned. The fifth is subcommands, which can be 01, 02, 03, but 01 and 02 are meaningless. The sixth is the number of friend accounts; then the corresponding friend account will be created.
Return Value:
1030196367; 67; 0; 03; 0; xxxx ;......; xxxx ;......; the fourth is the corresponding sub-command number; the fifth is 0, which is the correct data; the sixth is meaningless; the seventh is 0, and the eighth is empty. The processing is complete, the seventh case is a friend account, followed by the individual signature of the friend. It is similar later. In this way, you can also obtain your own personalized signature, and add your QQ number as a friend number to the backend.
Author: yjh4866
Source Address: http://blog.csdn.net/yjh4866