登陆 connect.qq.com 获取 uin
和 skey
的 cookie 拷贝填充到代码
并运行可直接清除全部的 QQ 互联授权
#!/usr/bin/env python3
# License: Public Domain
import requests
session = requests.session()
session.cookies.set("uin", "your uin id from connect.qq.com cookie")
session.cookies.set("skey", "your skey from connect.qq.com cookie")
def fetch_auth_list(start, limit):
response = session.get(
"https://cgi.connect.qq.com/authmng/get_auth_app_list",
headers={
"Referer": "https://connect.qq.com/manage.html",
},
params={
"sort": "time",
"apptype": "all",
"token": 5381,
"order": "desc",
"start": start,
"limit": limit,
},
)
return response.json()
def delete_connect(app_id):
response = session.post(
"https://cgi.connect.qq.com/authmng/del_app_auth",
headers={
"Referer": "https://cgi.connect.qq.com/proxy.html?callback=1&id=1"
},
data={
"appid": app_id,
},
)
payload = response.json()
print("AppID: %s, Message: %s" % (app_id, payload["msg"]))
def main():
total = fetch_auth_list(0, 0)["result"]["total"]
app_ids = set()
for index in range(0, total, 20):
apps = fetch_auth_list(index, 20)["result"]["data"]
app_ids |= set(app["appid"] for app in apps)
for app_id in sorted(app_ids):
delete_connect(app_id)
if __name__ == "__main__":
main()
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.