Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

错误108问题 #5

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
28 changes: 13 additions & 15 deletions main.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,6 @@
import base64
import json

r_h = b'''charset: utf-8
Accept-Encoding: gzip
referer: https://servicewechat.com/wx7c8d593b2c3a7703/3/page-frame.html
content-type: application/json
User-Agent: MicroMessenger/6.6.1.1220(0x26060133) NetType/WIFI Language/zh_CN
Content-Length: 431
Host: mp.weixin.qq.com
Connection: Keep-Alive
'''

headers = headers_raw_to_dict(r_h)


def run(session_id, score):
Expand All @@ -26,8 +15,7 @@ def run(session_id, score):
'''
action_data = {
"score": score,
"times": 123,
"game_data": "{}"
"times": 21
}
aes_key = session_id[0:16]
aes_iv = aes_key
Expand All @@ -47,7 +35,17 @@ def run(session_id, score):
},
"action_data": cipher_action_data
}
url = "https://mp.weixin.qq.com/wxagame/wxagame_settlement"
url = "https://mp.weixin.qq.com/wxagame/wxagame_settlement"
r_h = b'''charset: utf-8
Accept-Encoding: gzip
referer: https://servicewechat.com/wx7c8d593b2c3a7703/3/page-frame.html
content-type: application/json
User-Agent: MicroMessenger/6.6.1.1220(0x26060133) NetType/WIFI Language/zh_CN
Content-Length: %d
Host: mp.weixin.qq.com
Connection: Keep-Alive
''' % len(jsdata)
headers = headers_raw_to_dict(r_h)
z = requests.post(url, json=jsdata, headers=headers, verify=False)
if z.ok:
print(z.json())
Expand All @@ -58,5 +56,5 @@ def run(session_id, score):

if __name__ == '__main__':
session_id = ''
score = 66666
score = 9999
run(session_id, score)