Home  >  Article  >  Backend Development  >  Usage of WebQQ's latest login protocol, usage of webqq protocol_PHP tutorial

Usage of WebQQ's latest login protocol, usage of webqq protocol_PHP tutorial

WBOY
WBOYOriginal
2016-07-13 10:11:011411browse

Usage of WebQQ’s latest login protocol, usage of webqq protocol

The example in this article describes the usage of WebQQ’s latest login protocol. Share it with everyone for your reference. The specific analysis is as follows:

After the WebQQ protocol was updated, the original login algorithm and other information changed, causing many friends to be unable to log in normally. This site has published some articles related to the latest WebQQ login protocol. Because the demo has not been released, some friends will add Q to ask. Whether it is suitable for the latest WebQQ, this article will make a small demo for everyone to test.

Statement:

1. This demo is relatively simple. It does not verify the correctness of passwords and verification codes, but only does a login demonstration.

2. QQ is a relatively private thing, so please log in to this software with a test account, and be a villain first, then a gentleman.

This site is related to the latest WebQQ login protocol articles, WebQQ second login failed {"retcode":103,"errmsg":""}

Solution: I captured the package again and found that WebQQ now adds the login to the SSL layer, that is, when HTTPS logs in for the first time, the data returned is as follows:

Copy code The code is as follows:
ptuiCB('0','0','http://ptlogin4.web2.qq.com/check_sig ?pttype=1&uin=Your QQ number&service=login&nodirect=0&ptsig=A string of encrypted data s_url=http%3a%2f%2fweb2.qq.com%2floginproxy.html%3flogin2qq%3d1%26webqq%5ftype%3d10&f_url=&ptlang=2052&ptredirect =100&aid=1003903&daid=164&j_later=0&low_login_hour=0®master=0','0','Login successful! ', 'I');

The above data contains a callback address, the code is as follows:
Copy code The code is as follows:
http://ptlogin4.web2.qq.com/check_sig?pttype=1&uin=Your QQ number&service=login&nodirect=0&ptsig=A string of encrypted data s_url=http%3a%2f%2fweb2.qq. com%2floginproxy.html%3flogin2qq%3d1%26webqq%5ftype%3d10&f_url=&ptlang=2052&ptredirect=100&aid=1003903&daid=164&j_later=0&low_login_hour=0®master=0

Visit the above address (302 jump, pay attention to the cookie acquisition), and get a cookie named p_skey. When you log in for the second time, add this cookie to the cookie to achieve the second login.

WebQQ latest login agreement

1. Get verification code

Method: Get

Address, the code is as follows:

Copy code The code is as follows:
https://ssl.ptlogin2.qq.com:443/check?uin=958736715&appid=1003903&js_ver=10041&js_type= 0&login_sig=Mge3PexTk00li3ipMUlHCzouT0xU*8MU6YkkZsIUo8*zQKRTM2rwPUOFbhbGw1No&u1=http%3A%2F%2Fweb2.qq.com%2Floginproxy.html&r=0.9403657828909222

Cookie: Submit None, return ptvfsession or verifysession

2. First time login

Method: Get

Address, the code is as follows:

Copy code The code is as follows:
https://ssl.ptlogin2.qq.com:443/login?u=[QQ number]&p= [Encrypted password]&verifycode[Verification code]&webqq_type=40&remember_uin=1&login2qq=1&aid=1003903&u1=http%3A%2F%2Fweb2.qq.com%2Floginproxy.html%3Flogin2qq%3D1%26webqq_type%3D40&h=1&ptredirect=0&ptlang=205 2&did =164&from_ui=1&pttype=1&dumy=&fp=loginerroralert&action=3-12-12775&mibao_css=m_webqq&t=1&g=1&js_type=0&js_ver=10041&login_sig=Mge3PexTk00li3ipMUlHCzouT0xU*8MU6YkkZsIUo8 *zQKRTM2rwPUOFbhbGw1No

Cookie: Submit ptvfsession or verifysession, return pt2gguin, uin, skey, ETK, superuin, superkey, supertoken, ptisp, RK, ptuserinfo, ptcz, ptcz, airkey, ptwebqq.

3. Return the callback address after successful login for the first time

Method,Get

Address, the code is as follows:

Copy code The code is as follows:
http://ptlogin4.web2.qq.com/check_sig?pttype=1&uin=[QQ number]&service= login&nodirect=0&ptsig=tLfZcSFkHNP57Lg0tPtLM6XLh73XeghnEH3pTFyHCLY_&s_url=http%3A%2F%2Fweb2.qq.com%2Floginproxy.html%3Flogin2qq%3D1%26webqq_type%3D40&f_url=&ptlang=2052&ptredirect=1 00&aid=1003903&daid=164&j_later=0&low_login_hour=0®master=0

Cookie: Submit ptvfsession, verifysession, skey, ptcz:, ptwebqq, RK, superkey, supertoken. Return pt2gguin, uin, skey, p_uin, p_skey, pt4_token.

4. Second login

Method: Post

Address:

Copy code The code is as follows:
http://d.web2.qq.com/channel/login2

Cookie: Submit ptvfsession, verifysession, skey, ptcz:, ptwebqq, RK, superkey, supertoken, p_skey, pt4_token, uin, p_uin, ptui_loginuin.

Other details will not be described in this article. If you have other problems, please use packet capture software to capture packets for WebQQ login. There is not much technical content. You can try your best on your own. If you still can’t do it after following the above instructions. To solve your problem, the only way is to check other causes.

I hope this article will be helpful to everyone’s PHP programming design.

www.bkjia.comtruehttp: //www.bkjia.com/PHPjc/931545.htmlTechArticleUsage of the latest login protocol of WebQQ, usage of webqq protocol. This article describes the usage of the latest login protocol of WebQQ. Share it with everyone for your reference. The specific analysis is as follows: After the WebQQ protocol is updated...
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn