Pylinuxqq is a blogger who uses WEBQQ or other third-party plugins under the Linux platform, or wine simulations, that are more or less flawed. And always want to exercise, write yourself a Linux platform under the QQ. PYLINUXQQ based on Python, the current blogger is still a side dish, is being developed. The following are some of the issues that are encountered in development:
Project Address: Https://github.com/younfor/PyLinuxQQ
Interested can fork a share to develop together
How to connect QQ
Combined with the online approach, it is found that the latest version of Webqq SMARTQQ is a relatively easy way. Python's request,urllib2 and other packages make it easy to implement Post,get to simulate its protocol.
Login QQ
The most difficult is this step, QQ used RSA,MD5 encryption also added a variety of rules. Fortunately, the web side is exposed to JS inside. The simplest way is to call JS directly inside Python. Of course, this is only an idea, because easy language, C language can be like this, so after consulting data found that Mozila,google have JS engine. And there are Python API versions. Then installed the Mozila SpiderMonkey, the speed is very fast. The main difficulty is in the analysis of the algorithm, and logic.
Use Ie,firefox,chrome's F12 function to intercept get,post requests for the entire login process
QQ needs to be logged 2 times, and it is the use of JS request. You cannot do this if you do not parse the JS file inside the source.
After analyzing the JS algorithm, use Debug to find out each parameter, as well as the situation of cookies. Detailed process in the project source code inside a glance
QQ protocol often change, it is recommended to write the core as a module and UI separation, later update directly download the PY module and JS file on the line.
Friends List
First get a copy of the Qqhash cipher, as a parameter to request a friend list, and then use PYQT to do the interface with the returned JSON.
Receive information
The main thing is to constantly submit a post called Poll2, if there is a value, it means that the message was received. Receive information with similar to QQ flashing avatar, chat dialog box merge.
Send Message
Groups, discussion groups, friends send messages are similar to a post, with the parameters on the line.
GUI of PYQT
The main interface uses Tabwidget+toolbox+listwidget to implement Friends lists and tabs
Here are some pieces:
This article originates from www.younfor.com
PYLINUXQQ implementation of the Linux platform using QQ