PYLINUXQQ implementation of the Linux platform using QQ

Source: Internet
Author: User

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.

    1. 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.

    2. 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

    3. 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

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.