-
Notifications
You must be signed in to change notification settings - Fork 17
/
Copy path美丽修行4.1.8.py
112 lines (86 loc) · 2.58 KB
/
美丽修行4.1.8.py
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
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
# !/usr/bin/env python
# -*- coding:utf-8 -*-
import hashlib
import requests
import warnings
warnings.filterwarnings("ignore")
def get_sorted_key(data):
data_sorted = sorted(data.items(), key=lambda d: d[0])
new_s = ''.join(['&{}={}'.format(k, v) for k, v in data_sorted])
return new_s
def get_md5_encrypt(data):
return hashlib.md5(data.encode("utf-8")).hexdigest()
def get_signature(data):
encryption_1_before = get_sorted_key(data)
# print("encryption_1_before : ", encryption_1_before)
encryption_1 = get_md5_encrypt(encryption_1_before)
# print("encryption_1 : ", encryption_1)
encryption_2_before = encryption_1 + "uAXDBeQs3Cl3"
encryption_2 = get_md5_encrypt(encryption_2_before)
print("signature : ", encryption_2)
return encryption_2
def mlxx_login():
url = "https://api.bevol.com/app/login3"
headers = {
'Accept': 'application/json;versions=1',
'Cache-Control': 'public, max-age=60',
'Cookie': '',
'Content-Type': 'application/x-www-form-urlencoded',
'Content-Length': '257',
'Host': 'api.bevol.com',
'Connection': 'Keep-Alive',
'Accept-Encoding': 'gzip',
'User-Agent': 'okhttp/3.10.0',
}
data = {
'uid': '',
'uuid': '863386747311479',
'imei': '3fb4c894d38e56ecdc442fe927ea98f6',
'model': 'VOG-AL00',
'sys_v': '7.1.2',
'v': '4.1.8',
'o': 'Android',
'channel': 'taobao',
'opentime': '1604411738',
'req_timestamp': '1604411757835',
'tel': '86',
'account': '手机号',
'password': '123456',
# 'signature': 'a12bd331d306781994d6ab2eb78580cd',
}
signature = get_signature(data)
data["signature"] = signature
response = requests.post(url, headers=headers, data=data, verify=False)
print(response.text)
if __name__ == '__main__':
mlxx_login()
"""
1、data
uid
uuid 863386747311479
imei 3fb4c894d38e56ecdc442fe927ea98f6
model VOG-AL00
sys_v 7.1.2
v 4.1.8
o Android
channel taobao
opentime 1604402733
req_timestamp 1604403501090
tel 86
account 手机号
password 123456
signature eb79ab78c65e9e21239cedc568e80e79
2、headers
POST /app/login3 HTTP/1.1
Accept: application/json;versions=1
Cache-Control: public, max-age=60
Cookie:
Content-Type: application/x-www-form-urlencoded
Content-Length: 257
Host: api.bevol.com
Connection: Keep-Alive
Accept-Encoding: gzip
User-Agent: okhttp/3.10.0
3、url
https://api.bevol.com/app/login3
"""