-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathskxw.py
89 lines (81 loc) · 3.2 KB
/
skxw.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
# coding:utf-8
"""
项目:时刻新闻APP
抓包a.rednet.cn里的userid,环境变量skxw,多账号换行分开
cron:43 */12 * * *
const $ = new Env('时刻新闻');
作者:cason
"""
import json
import os
import requests
def login():
url = 'https://a.rednet.cn/dispatch'
headers = {
'bizOp': 'userPassportLogin',
'userid': '1FASX0vdWIcLLCIp6InZlw==',
'bizType': 'user',
'version': '10.5',
'crc': '43bf0bbf36833f8b0becf6d91a292097',
'Content-Type': 'application/json',
'User-Agent': 'Dalvik/2.1.0 (Linux; U; Android 7.1.2; M2012K11AC Build/N6F26Q)'
}
data = json.dumps({
"password": "VdhrHCCNIEQuo58GUlKg3g==",
"imei": "816818250415626",
"userName": "cnTw5JsoaSnyxsOFXkd4ng==",
"siteId": 6,
})
r = requests.post(url, data=data, headers=headers)
print(r.text)
def get_point(userid):
url = 'https://a.rednet.cn/dispatch'
headers = {
"bizOp": "completeUserTask",
"userid": userid,
"bizType": "userPoint",
"version": "10.5",
'Content-Type': 'application/json',
'User-Agent': 'PostmanRuntime-ApipostRuntime/1.1.0'
}
for i in range(1, 8):
data = json.dumps({
"pointType": i, "serialVersionUID": -2274761546514303065, "siteId": 6
})
if i == 1 or i == 2:
r = requests.post(url, data=data, headers=headers)
if r.json().get('data').get('pointFlag') == 0:
print('今日次数已达上限')
else:
print(r.json().get('data').get('pointName'), '获得', r.json().get('data').get('pointNum'), '积分')
elif i == 3 or i == 6:
for j in range(5):
r = requests.post(url, data=data, headers=headers)
if r.json().get('data').get('pointFlag') == 0:
print('今日次数已达上限')
else:
print(r.json().get('data').get('pointName'), '获得', r.json().get('data').get('pointNum'), '积分')
elif i == 4 or i == 5:
for j in range(10):
r = requests.post(url, data=data, headers=headers)
if r.json().get('data').get('pointFlag') == 0:
print('今日次数已达上限')
else:
print(r.json().get('data').get('pointName'), '获得', r.json().get('data').get('pointNum'), '积分')
else:
for j in range(4):
r = requests.post(url, data=data, headers=headers)
if r.json().get('data').get('pointFlag') == 0:
print('今日次数已达上限')
else:
print(r.json().get('data').get('pointName'), '获得', r.json().get('data').get('pointNum'), '积分')
def main():
userid_list = os.getenv('skxw').split('\n')
print('=====检测到' + str(len(userid_list)) + '个账号======')
for num, userid in enumerate(userid_list):
num = num + 1
print(f'\n=======开始账号【{num}】========\n')
# login()
get_point(userid)
if __name__ == '__main__':
main()