iPad上有一个功能,就是扫码登录,可以在不登陆QQ,微信的情况下,扫码登录腾讯游戏,包括,王者荣耀,和平精英,QQ飞车,LOL手游等腾讯游戏。
不巧的是在iPhone,安卓手机上则没有很方便的扫码登录游戏功能,今天,我们来简单剖析并在安卓和iPhone上实现。

iPad上扫码登录页面

王者荣耀、和平精英、腾讯手游扫码登录工具如何实现?

腾讯各游戏扫码登录地址

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
# 王者荣耀
https://open.weixin.qq.com/connect/app/qrconnect?appid=wx95a3a4d7c627e07d&bundleid=com.tencent.smoba&scope=snsapi_base%2Csnsapi_userinfo%2Csnsapi_friend%2Csnsapi_message&state=weixin

# 王者荣耀体验服
https://open.weixin.qq.com/connect/app/qrconnect?appid=wx71a79717188d990b&bundleid=com.tencent.smoba&scope=snsapi_base%2Csnsapi_userinfo%2Csnsapi_friend%2Csnsapi_message&state=weixin

# 和平精英
https://open.weixin.qq.com/connect/app/qrconnect?appid=wxc4c0253df149f02d&bundleid=com.tencent.smoba&scope=snsapi_base%2Csnsapi_userinfo%2Csnsapi_friend%2Csnsapi_message&state=weixin

# 金铲铲之战
https://open.weixin.qq.com/connect/app/qrconnect?appid=wxb23e82d26e8ab140&bundleid=com.tencent.smoba&scope=snsapi_base%2Csnsapi_userinfo%2Csnsapi_friend%2Csnsapi_message&state=weixin

# 英雄联盟手游
https://open.weixin.qq.com/connect/app/qrconnect?appid=wx5a611599efa17e78&bundleid=com.tencent.smoba&scope=snsapi_base%2Csnsapi_userinfo%2Csnsapi_friend%2Csnsapi_message&state=weixin

# 球球大作战
https://open.weixin.qq.com/connect/app/qrconnect?appid=wx78d3d4b3ffce4211&bundleid=com.tencent.smoba&scope=snsapi_base%2Csnsapi_userinfo%2Csnsapi_friend%2Csnsapi_message&state=weixin

# QQ飞车
https://open.weixin.qq.com/connect/app/qrconnect?appid=wx360b06d575d20cc3&bundleid=com.tencent.smoba&scope=snsapi_base%2Csnsapi_userinfo%2Csnsapi_friend%2Csnsapi_message&state=weixin

# 跑跑卡丁车
https://open.weixin.qq.com/connect/app/qrconnect?appid=wx095ef8ef7e64b291&bundleid=com.tencent.smoba&scope=snsapi_base%2Csnsapi_userinfo%2Csnsapi_friend%2Csnsapi_message&state=weixin

# 穿越火线-枪战王者
https://open.weixin.qq.com/connect/app/qrconnect?appid=wx58164a91f1821369&bundleid=com.tencent.smoba&scope=snsapi_base%2Csnsapi_userinfo%2Csnsapi_friend%2Csnsapi_message&state=weixin

# QQ炫舞手游
https://open.weixin.qq.com/connect/app/qrconnect?appid=wx9b2251fa995dcf56&bundleid=com.tencent.smoba&scope=snsapi_base%2Csnsapi_userinfo%2Csnsapi_friend%2Csnsapi_message&state=weixin

# 皇室战争
https://open.weixin.qq.com/connect/app/qrconnect?appid=wxc56ff65190e6db97&bundleid=com.tencent.smoba&scope=snsapi_base%2Csnsapi_userinfo%2Csnsapi_friend%2Csnsapi_message&state=weixin

# 部落冲突
https://open.weixin.qq.com/connect/app/qrconnect?appid=wxfa242abf8cdd841a&bundleid=com.tencent.smoba&scope=snsapi_base%2Csnsapi_userinfo%2Csnsapi_friend%2Csnsapi_message&state=weixin

# 完美世界
https://open.weixin.qq.com/connect/app/qrconnect?appid=wx7819539d83b9dc1e&bundleid=com.tencent.smoba&scope=snsapi_base%2Csnsapi_userinfo%2Csnsapi_friend%2Csnsapi_message&state=weixin

# 天天酷跑
https://open.weixin.qq.com/connect/app/qrconnect?appid=wx15f5f4874ca259f4&bundleid=com.tencent.smoba&scope=snsapi_base%2Csnsapi_userinfo%2Csnsapi_friend%2Csnsapi_message&state=weixin

# 我的世界
https://open.weixin.qq.com/connect/app/qrconnect?appid=wxc0ac304348b87997&bundleid=com.tencent.smoba&scope=snsapi_base%2Csnsapi_userinfo%2Csnsapi_friend%2Csnsapi_message&state=weixin

# 火影忍者-疾风传
https://open.weixin.qq.com/connect/app/qrconnect?appid=wx82dd7436af5db835&bundleid=com.tencent.smoba&scope=snsapi_base%2Csnsapi_userinfo%2Csnsapi_friend%2Csnsapi_message&state=weixin

# 火影忍者:忍者新世代
https://open.weixin.qq.com/connect/app/qrconnect?appid=wxbfb16a632cbdd710&bundleid=com.tencent.smoba&scope=snsapi_base%2Csnsapi_userinfo%2Csnsapi_friend%2Csnsapi_message&state=weixin

# FIFA足球世界
https://open.weixin.qq.com/connect/app/qrconnect?appid=wxfe6672d593719f37&bundleid=com.tencent.smoba&scope=snsapi_base%2Csnsapi_userinfo%2Csnsapi_friend%2Csnsapi_message&state=weixin

# 剑网3指尖江湖
https://open.weixin.qq.com/connect/app/qrconnect?appid=wxdd8ef1519da76755&bundleid=com.tencent.smoba&scope=snsapi_base%2Csnsapi_userinfo%2Csnsapi_friend%2Csnsapi_message&state=weixin

# 最强NBA
https://open.weixin.qq.com/connect/app/qrconnect?appid=wx1a6e7e59c7e5b31e&bundleid=com.tencent.smoba&scope=snsapi_base%2Csnsapi_userinfo%2Csnsapi_friend%2Csnsapi_message&state=weixin

# 魂斗罗:归来
https://open.weixin.qq.com/connect/app/qrconnect?appid=wx6ce9dd56690217fe&bundleid=com.tencent.smoba&scope=snsapi_base%2Csnsapi_userinfo%2Csnsapi_friend%2Csnsapi_message&state=weixin

# 香肠派对正式版
https://open.weixin.qq.com/connect/app/qrconnect?appid=wxc5a92b833419037b&bundleid=com.tencent.smoba&scope=snsapi_base%2Csnsapi_userinfo%2Csnsapi_friend%2Csnsapi_message&state=weixin

# 三生三世十里桃花
https://open.weixin.qq.com/connect/app/qrconnect?appid=wx48a3b2db49e29a1b&bundleid=com.tencent.smoba&scope=snsapi_base%2Csnsapi_userinfo%2Csnsapi_friend%2Csnsapi_message&state=weixin

# 食物语
https://open.weixin.qq.com/connect/app/qrconnect?appid=wx2282c66d8250ddf7&bundleid=com.tencent.smoba&scope=snsapi_base%2Csnsapi_userinfo%2Csnsapi_friend%2Csnsapi_message&state=weixin

# 妖精的尾巴
https://open.weixin.qq.com/connect/app/qrconnect?appid=wx1b4d03357ad23b00&bundleid=com.tencent.smoba&scope=snsapi_base%2Csnsapi_userinfo%2Csnsapi_friend%2Csnsapi_message&state=weixin

# 街头篮球
https://open.weixin.qq.com/connect/app/qrconnect?appid=wxbd9301b66287da6f&bundleid=com.tencent.smoba&scope=snsapi_base%2Csnsapi_userinfo%2Csnsapi_friend%2Csnsapi_message&state=weixin

经过抓包得到了扫码登录页的一些数据,页面地址是死的,经测试时间戳参数传当前时间戳或不传都可以。
appid 这个目测应该是微信开放平台的应用ID

使用方法

玩家:
复制这个链接在wx里面打开,长按或截图二维码发送给号主

号主:
收到二维码,可打开电脑微信查看,用手机扫码登录(不可长按扫码),登录后,玩家那边自动会跳转打开游戏

?这个链接只能在wx打开 在浏览器打不开

简单剖析

以王者荣耀举例

1
2
# 打开链接
https://open.weixin.qq.com/connect/app/qrconnect?appid=wx95a3a4d7c627e07d&bundleid=com.tencent.smoba&scope=snsapi_base%2Csnsapi_userinfo%2Csnsapi_friend%2Csnsapi_message&state=weixin

抓取页面源码及请求数据

1
2
3
4
5
6
# 心跳检测结果结果
window.wx_errcode=405;window.wx_redirecturl='wx95a3a4d7c627e07d://oauth?code=041*************rrol2mmoJE036gmD&state=weixin';window.wx_nickname='微信昵称';
# code码含义
#402:二维码过期
#405:扫码成功
#408:待扫码

结果=405时执行shell命令 携参跳转王者荣耀APP

1
am start -d wx95a3a4d7c627e07d://oauth?code=这里是返回的结果&state=weixin

总结

  1. 打开链接,取二维码唯一参数(取码)
  2. 携唯一标识进行心跳检测请求(请求校验判断结果)
  3. 状态码为405登录成功后,带返回数据跳转王者(携参跳转)