forked from KenForever1/Fuck_Qingjiao-2-Class.com-
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathmain.py
More file actions
374 lines (346 loc) · 23.4 KB
/
main.py
File metadata and controls
374 lines (346 loc) · 23.4 KB
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
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
# Author: Bilibili@JonyanDunh(1309634881@qq.com) && Hanbings(3219065882@qq.com)
# ___________ __ ________ .__ __.__
# \_ _____/_ __ ____ | | __ \_____ \ |__| ____ ____ |__|__|____ ____
# | __)| | \_/ ___\| |/ / / / \ \| |/ \ / ___\ | | \__ \ / _ \
# | \ | | /\ \___| < / \_/. \ | | \/ /_/ > | | |/ __ \( <_> )
# \___ / |____/ \___ >__|_ \ \_____\ \_/__|___| /\___ /\__| |__(____ /\____/
# \/ \/ \/ \__> \//_____/\______| \/
import http.client
import re
import xlrd # 导入库
import random
taskNum = 0
taskBigNum = 0
taskContestNum = 0
def Function(account, password):
reqtoken, sid = Get_Cookies()
Login(account, password, reqtoken, sid)
Start3(reqtoken, sid)
def Login(account, password, reqtoken, sid):
conn = http.client.HTTPSConnection("www.2-class.com")
payload = "{\"account\":\"" + account + "\",\"password\":\"" + password + "\",\"checkCode\":\"\"," \
"\"codeKey\":\"\",\"reqtoken\":\"" + \
reqtoken + "\"} "
headers = {
'Host': 'www.2-class.com',
'Connection': 'keep-alive',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) '
'Chrome/86.0.4240.75 Safari/537.36',
'Content-Type': 'application/json;charset=UTF-8',
'Accept': '*/*',
'Origin': 'https://www.2-class.com',
'Sec-Fetch-Site': 'same-origin',
'Sec-Fetch-Mode': 'cors',
'Sec-Fetch-Dest': 'empty',
'Referer': 'https://www.2-class.com/courses',
'Accept-Encoding': 'gzip, deflate, br',
'Accept-Language': 'zh-CN,zh;q=0.9',
'Cookie': 'sid=' + sid
}
conn.request("POST", "/api/user/login", payload, headers)
res = conn.getresponse()
data = res.read()
# print(data.decode("utf-8"))
def Get_Cookies():
conn = http.client.HTTPSConnection("www.2-class.com")
payload = ''
headers = {}
conn.request("GET", "/courses", payload, headers)
res = conn.getresponse()
data = res.read()
sid = re.findall(r"sid=(.+?);", res.getheader("Set-Cookie"))[0]
reqtoken = re.findall(r"reqtoken:\"(.+?)\"", data.decode("utf-8"))[0]
return reqtoken, sid
def Compelete_Task(payload, sid):
conn = http.client.HTTPSConnection("www.2-class.com")
payload = payload
headers = {
'Host': ' www.2-class.com',
'Connection': ' keep-alive',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) '
'Chrome/86.0.4240.75 Safari/537.36',
'Content-Type': ' application/json;charset=UTF-8',
'Accept': ' */*',
'Origin': ' https://www.2-class.com',
'Sec-Fetch-Site': ' same-origin',
'Sec-Fetch-Mode': ' cors',
'Sec-Fetch-Dest': ' empty',
'Accept-Encoding': ' gzip, deflate, br',
'Accept-Language': ' zh-CN,zh;q=0.9',
'Cookie': 'sid=' + sid
}
conn.request("POST", "/api/exam/commit", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
if "\"success\":true" in data.decode("utf-8"):
global taskNum
taskNum += 1
def Compelete_Final_Task(reqtoken, sid):
conn = http.client.HTTPSConnection("2-class.com")
payload = "{\"list\":[{\"questionId\":677,\"questionContent\":\"A\"},{\"questionId\":678," \
"\"questionContent\":\"A\"},{\"questionId\":679,\"questionContent\":\"B\"},{\"questionId\":680," \
"\"questionContent\":\"D\"},{\"questionId\":681,\"questionContent\":\"A\"},{\"questionId\":682," \
"\"questionContent\":\"B\"},{\"questionId\":683,\"questionContent\":\"A\"},{\"questionId\":684," \
"\"questionContent\":\"C\"},{\"questionId\":685,\"questionContent\":\"C\"},{\"questionId\":686," \
"\"questionContent\":\"A\"}],\"exam\":\"final\",\"reqtoken\":\"" + reqtoken + "\"} "
headers = {
'Host': ' 2-class.com',
'Connection': ' keep-alive',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) '
'Chrome/86.0.4240.75 Safari/537.36',
'Content-Type': ' application/json;charset=UTF-8',
'Accept': ' */*',
'Origin': ' https://2-class.com',
'Sec-Fetch-Site': ' same-origin',
'Sec-Fetch-Mode': ' cors',
'Sec-Fetch-Dest': ' empty',
'Accept-Encoding': ' gzip, deflate, br',
'Accept-Language': ' zh-CN,zh-HK;q=0.9,zh;q=0.8,en;q=0.7',
'Cookie': ' sid=' + sid + ';'
}
conn.request("POST", "/api/question/commit", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
if "\"success\":true" in data.decode("utf-8"):
global taskBigNum
taskBigNum += 1
def Compelete_Contest_Task(reqtoken, sid):
conn = http.client.HTTPSConnection("2-class.com")
Random = random.randint(0, 10)
if Random == 0: # 100分
payload = "{\"list\":[{\"questionId\":2744,\"questionContent\":\"B\"},{\"questionId\":2681," \
"\"questionContent\":\"C\"},{\"questionId\":2745,\"questionContent\":\"B\"},{\"questionId\":2682," \
"\"questionContent\":\"A\"},{\"questionId\":2685,\"questionContent\":\"A\"},{\"questionId\":2687," \
"\"questionContent\":\"D\"},{\"questionId\":2753,\"questionContent\":\"D\"},{\"questionId\":2755," \
"\"questionContent\":\"A\"},{\"questionId\":2692,\"questionContent\":\"B\"},{\"questionId\":2757," \
"\"questionContent\":\"A\"},{\"questionId\":2693,\"questionContent\":\"C\"},{\"questionId\":2760," \
"\"questionContent\":\"A\"},{\"questionId\":2761,\"questionContent\":\"A\"},{\"questionId\":2762," \
"\"questionContent\":\"B\"},{\"questionId\":2699,\"questionContent\":\"D\"},{\"questionId\":2700," \
"\"questionContent\":\"A\"},{\"questionId\":2705,\"questionContent\":\"D\"},{\"questionId\":2706," \
"\"questionContent\":\"A\"},{\"questionId\":2770,\"questionContent\":\"B\"},{\"questionId\":2771," \
"\"questionContent\":\"A\"}],\"time\":281,\"reqtoken\":\"" + reqtoken + "\"} "
elif Random == 1: # 95分
payload = "{\"list\":[{\"questionId\":2744,\"questionContent\":\"B\"},{\"questionId\":2681," \
"\"questionContent\":\"A\"},{\"questionId\":2745,\"questionContent\":\"B\"},{\"questionId\":2682," \
"\"questionContent\":\"A\"},{\"questionId\":2685,\"questionContent\":\"A\"},{\"questionId\":2687," \
"\"questionContent\":\"D\"},{\"questionId\":2753,\"questionContent\":\"D\"},{\"questionId\":2755," \
"\"questionContent\":\"A\"},{\"questionId\":2692,\"questionContent\":\"B\"},{\"questionId\":2757," \
"\"questionContent\":\"A\"},{\"questionId\":2693,\"questionContent\":\"C\"},{\"questionId\":2760," \
"\"questionContent\":\"A\"},{\"questionId\":2761,\"questionContent\":\"A\"},{\"questionId\":2762," \
"\"questionContent\":\"B\"},{\"questionId\":2699,\"questionContent\":\"D\"},{\"questionId\":2700," \
"\"questionContent\":\"A\"},{\"questionId\":2705,\"questionContent\":\"D\"},{\"questionId\":2706," \
"\"questionContent\":\"A\"},{\"questionId\":2770,\"questionContent\":\"B\"},{\"questionId\":2771," \
"\"questionContent\":\"A\"}],\"time\":281,\"reqtoken\":\"" + reqtoken + "\"} "
elif Random == 2: # 90分
payload = "{\"list\":[{\"questionId\":2744,\"questionContent\":\"B\"},{\"questionId\":2681," \
"\"questionContent\":\"A\"},{\"questionId\":2745,\"questionContent\":\"B\"},{\"questionId\":2682," \
"\"questionContent\":\"A\"},{\"questionId\":2685,\"questionContent\":\"A\"},{\"questionId\":2687," \
"\"questionContent\":\"A\"},{\"questionId\":2753,\"questionContent\":\"D\"},{\"questionId\":2755," \
"\"questionContent\":\"A\"},{\"questionId\":2692,\"questionContent\":\"B\"},{\"questionId\":2757," \
"\"questionContent\":\"A\"},{\"questionId\":2693,\"questionContent\":\"C\"},{\"questionId\":2760," \
"\"questionContent\":\"A\"},{\"questionId\":2761,\"questionContent\":\"A\"},{\"questionId\":2762," \
"\"questionContent\":\"B\"},{\"questionId\":2699,\"questionContent\":\"D\"},{\"questionId\":2700," \
"\"questionContent\":\"A\"},{\"questionId\":2705,\"questionContent\":\"D\"},{\"questionId\":2706," \
"\"questionContent\":\"A\"},{\"questionId\":2770,\"questionContent\":\"B\"},{\"questionId\":2771," \
"\"questionContent\":\"A\"}],\"time\":281,\"reqtoken\":\"" + reqtoken + "\"} "
elif Random == 3 or Random == 4 or Random == 7 or Random == 8: # 85分
payload = "{\"list\":[{\"questionId\":2744,\"questionContent\":\"B\"},{\"questionId\":2681," \
"\"questionContent\":\"A\"},{\"questionId\":2745,\"questionContent\":\"B\"},{\"questionId\":2682," \
"\"questionContent\":\"A\"},{\"questionId\":2685,\"questionContent\":\"A\"},{\"questionId\":2687," \
"\"questionContent\":\"A\"},{\"questionId\":2753,\"questionContent\":\"D\"},{\"questionId\":2755," \
"\"questionContent\":\"A\"},{\"questionId\":2692,\"questionContent\":\"B\"},{\"questionId\":2757," \
"\"questionContent\":\"A\"},{\"questionId\":2693,\"questionContent\":\"C\"},{\"questionId\":2760," \
"\"questionContent\":\"A\"},{\"questionId\":2761,\"questionContent\":\"A\"},{\"questionId\":2762," \
"\"questionContent\":\"A\"},{\"questionId\":2699,\"questionContent\":\"D\"},{\"questionId\":2700," \
"\"questionContent\":\"A\"},{\"questionId\":2705,\"questionContent\":\"D\"},{\"questionId\":2706," \
"\"questionContent\":\"A\"},{\"questionId\":2770,\"questionContent\":\"B\"},{\"questionId\":2771," \
"\"questionContent\":\"A\"}],\"time\":281,\"reqtoken\":\"" + reqtoken + "\"} "
elif Random == 5 or Random == 9 or Random == 10: # 80分
payload = "{\"list\":[{\"questionId\":2744,\"questionContent\":\"B\"},{\"questionId\":2681," \
"\"questionContent\":\"A\"},{\"questionId\":2745,\"questionContent\":\"A\"},{\"questionId\":2682," \
"\"questionContent\":\"A\"},{\"questionId\":2685,\"questionContent\":\"A\"},{\"questionId\":2687," \
"\"questionContent\":\"A\"},{\"questionId\":2753,\"questionContent\":\"D\"},{\"questionId\":2755," \
"\"questionContent\":\"A\"},{\"questionId\":2692,\"questionContent\":\"B\"},{\"questionId\":2757," \
"\"questionContent\":\"A\"},{\"questionId\":2693,\"questionContent\":\"C\"},{\"questionId\":2760," \
"\"questionContent\":\"A\"},{\"questionId\":2761,\"questionContent\":\"A\"},{\"questionId\":2762," \
"\"questionContent\":\"A\"},{\"questionId\":2699,\"questionContent\":\"D\"},{\"questionId\":2700," \
"\"questionContent\":\"A\"},{\"questionId\":2705,\"questionContent\":\"D\"},{\"questionId\":2706," \
"\"questionContent\":\"A\"},{\"questionId\":2770,\"questionContent\":\"B\"},{\"questionId\":2771," \
"\"questionContent\":\"A\"}],\"time\":281,\"reqtoken\":\"" + reqtoken + "\"} "
elif Random == 6: # 75分
payload = "{\"list\":[{\"questionId\":2744,\"questionContent\":\"B\"},{\"questionId\":2681," \
"\"questionContent\":\"A\"},{\"questionId\":2745,\"questionContent\":\"A\"},{\"questionId\":2682," \
"\"questionContent\":\"A\"},{\"questionId\":2685,\"questionContent\":\"A\"},{\"questionId\":2687," \
"\"questionContent\":\"A\"},{\"questionId\":2753,\"questionContent\":\"A\"},{\"questionId\":2755," \
"\"questionContent\":\"A\"},{\"questionId\":2692,\"questionContent\":\"B\"},{\"questionId\":2757," \
"\"questionContent\":\"A\"},{\"questionId\":2693,\"questionContent\":\"C\"},{\"questionId\":2760," \
"\"questionContent\":\"A\"},{\"questionId\":2761,\"questionContent\":\"A\"},{\"questionId\":2762," \
"\"questionContent\":\"A\"},{\"questionId\":2699,\"questionContent\":\"D\"},{\"questionId\":2700," \
"\"questionContent\":\"A\"},{\"questionId\":2705,\"questionContent\":\"D\"},{\"questionId\":2706," \
"\"questionContent\":\"A\"},{\"questionId\":2770,\"questionContent\":\"B\"},{\"questionId\":2771," \
"\"questionContent\":\"A\"}],\"time\":281,\"reqtoken\":\"" + reqtoken + "\"} "
headers = {
'Host': ' 2-class.com',
'Connection': ' keep-alive',
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) '
'Chrome/86.0.4240.75 Safari/537.36',
'Content-Type': ' application/json;charset=UTF-8',
'Accept': ' */*',
'Origin': ' https://2-class.com',
'Sec-Fetch-Site': ' same-origin',
'Sec-Fetch-Mode': ' cors',
'Sec-Fetch-Dest': ' empty',
'Accept-Encoding': ' gzip, deflate, br',
'Accept-Language': ' zh-CN,zh-HK;q=0.9,zh;q=0.8,en;q=0.7',
'Cookie': ' sid=' + sid + ';'
}
conn.request("POST", "/api/quiz/commit", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))
if "\"success\":true" in data.decode("utf-8"):
global taskContestNum
taskContestNum += 1
# 高一级
def Start(reqtoken, sid):
print(taskBigNum)
print(
"-----------------------------------------------------------" + sid + "-----------------------------------------------------------")
payload = "{\"courseId\":\"837\",\"examCommitReqDataList\":[{\"examId\":1,\"answer\":2},{\"examId\":2," \
"\"answer\":\"0,2\"}],\"exam\":\"course\",\"reqtoken\":\"" + reqtoken + "\"} "
Compelete_Task(payload, sid)
payload = "{\"courseId\":\"838\",\"examCommitReqDataList\":[{\"examId\":1,\"answer\":\"0,1,2\"},{\"examId\":2," \
"\"answer\":\"0,2\"}],\"exam\":\"course\",\"reqtoken\":\"" + reqtoken + "\"} "
Compelete_Task(payload, sid)
payload = "{\"courseId\":\"782\",\"examCommitReqDataList\":[{\"examId\":1,\"answer\":0},{\"examId\":2," \
"\"answer\":0},{\"examId\":3,\"answer\":2},{\"examId\":4,\"answer\":1},{\"examId\":5,\"answer\":0}]," \
"\"exam\":\"course\",\"reqtoken\":\"" + reqtoken + "\"} "
Compelete_Task(payload, sid)
payload = "{\"courseId\":\"779\",\"examCommitReqDataList\":[{\"examId\":1,\"answer\":2},{\"examId\":2," \
"\"answer\":1},{\"examId\":3,\"answer\":1},{\"examId\":4,\"answer\":3},{\"examId\":5,\"answer\":0}]," \
"\"exam\":\"course\",\"reqtoken\":\"" + reqtoken + "\"} "
Compelete_Task(payload, sid)
Compelete_Final_Task(reqtoken, sid)
# Compelete_Contest_Task(reqtoken, sid)
print("\n")
# 高二级
def Start2(reqtoken, sid):
print(
"-----------------------------------------------------------" + sid + "-----------------------------------------------------------")
payload = "{\"courseId\":\"781\",\"examCommitReqDataList\":[{\"examId\":1,\"answer\":2},{\"examId\":2," \
"\"answer\":2},{\"examId\":3,\"answer\":1},{\"examId\":4,\"answer\":2},{\"examId\":5,\"answer\":3}]," \
"\"exam\":\"course\",\"reqtoken\":\"" + reqtoken + "\"} "
Compelete_Task(payload, sid)
payload = "{\"courseId\":\"780\",\"examCommitReqDataList\":[{\"examId\":1,\"answer\":2},{\"examId\":2," \
"\"answer\":0},{\"examId\":3,\"answer\":1},{\"examId\":4,\"answer\":2},{\"examId\":5,\"answer\":\"0,1," \
"2\"}],\"exam\":\"course\",\"reqtoken\":\"" + reqtoken + "\"} "
Compelete_Task(payload, sid)
payload = "{\"courseId\":\"835\",\"examCommitReqDataList\":[{\"examId\":1,\"answer\":\"1,2\"},{\"examId\":2," \
"\"answer\":\"0,2,3\"}],\"exam\":\"course\",\"reqtoken\":\"" + reqtoken + "\"} "
Compelete_Task(payload, sid)
payload = "{\"courseId\":\"836\",\"examCommitReqDataList\":[{\"examId\":1,\"answer\":1},{\"examId\":2," \
"\"answer\":2}],\"exam\":\"course\",\"reqtoken\":\"" + reqtoken + "\"} "
Compelete_Task(payload, sid)
Compelete_Final_Task(reqtoken, sid)
Compelete_Contest_Task(reqtoken, sid)
print("\n")
# 五年级
def Start3(reqtoken, sid):
print(
"-----------------------------------------------------------" + sid + "-----------------------------------------------------------")
payload = "{\"courseId\":\"848\",\"examCommitReqDataList\":[{\"examId\":1,\"answer\":\"0,1,3\"},{\"examId\":2," \
"\"answer\":\"0,1,2,4\"}],\"exam\":\"course\",\"reqtoken\":\"" + reqtoken + "\"} "
Compelete_Task(payload, sid)
payload = "{\"courseId\":\"829\",\"examCommitReqDataList\":[{\"examId\":1,\"answer\":0},{\"examId\":2," \
"\"answer\":\"0,1,3\"},{\"examId\":3,\"answer\":\"0,1,2\"}],\"exam\":\"course\"," \
"\"reqtoken\":\"" + reqtoken + "\"} "
Compelete_Task(payload, sid)
payload = "{\"courseId\":\"825\",\"examCommitReqDataList\":[{\"examId\":1,\"answer\":0},{\"examId\":2," \
"\"answer\":2},{\"examId\":3,\"answer\":2},{\"examId\":4,\"answer\":3},{\"examId\":5,\"answer\":\"0,1," \
"2,3\"}],\"exam\":\"course\",\"reqtoken\":\"" + reqtoken + "\"} "
Compelete_Task(payload, sid)
payload = "{\"courseId\":\"826\",\"examCommitReqDataList\":[{\"examId\":1,\"answer\":2},{\"examId\":2," \
"\"answer\":3},{\"examId\":3,\"answer\":1},{\"examId\":4,\"answer\":1},{\"examId\":5,\"answer\":\"0," \
"2\"}],\"exam\":\"course\",\"reqtoken\":\"" + reqtoken + "\"} "
Compelete_Task(payload, sid)
payload = "{\"courseId\":\"773\",\"examCommitReqDataList\":[{\"examId\":1,\"answer\":2},{\"examId\":2," \
"\"answer\":2},{\"examId\":3,\"answer\":0},{\"examId\":4,\"answer\":2},{\"examId\":5,\"answer\":3}]," \
"\"exam\":\"course\",\"reqtoken\":\"" + reqtoken + "\"} "
Compelete_Task(payload, sid)
payload = "{\"courseId\":\"847\",\"examCommitReqDataList\":[{\"examId\":1,\"answer\":\"2,3\"},{\"examId\":2," \
"\"answer\":\"0,1,3\"},{\"examId\":3,\"answer\":\"0,1,2\"}],\"exam\":\"course\"," \
"\"reqtoken\":\"" + reqtoken + "\"} "
Compelete_Task(payload, sid)
Compelete_Final_Task(reqtoken, sid)
Compelete_Contest_Task(reqtoken, sid)
print("\n")
# 初一
def Start4(reqtoken, sid):
print(
"-----------------------------------------------------------" + sid + "-----------------------------------------------------------")
payload = "{\"courseId\":\"859\",\"examCommitReqDataList\":[{\"examId\":1,\"answer\":0},{\"examId\":2,\"answer\":\"0,1,2\"}],\"exam\":\"course\",\"reqtoken\":\"" + reqtoken + "\"}"
Compelete_Task(payload, sid)
payload = "{\"courseId\":\"844\",\"examCommitReqDataList\":[{\"examId\":1,\"answer\":\"0,2\"},{\"examId\":2,\"answer\":\"0,3\"}],\"exam\":\"course\",\"reqtoken\":\"" + reqtoken + "\"}"
Compelete_Task(payload, sid)
payload = "{\"courseId\":\"843\",\"examCommitReqDataList\":[{\"examId\":1,\"answer\":2},{\"examId\":2,\"answer\":\"0,1,2\"}],\"exam\":\"course\",\"reqtoken\":\"" + reqtoken + "\"}"
Compelete_Task(payload, sid)
payload = "{\"courseId\":\"771\",\"examCommitReqDataList\":[{\"examId\":1,\"answer\":3},{\"examId\":2,\"answer\":2},{\"examId\":3,\"answer\":1},{\"examId\":4,\"answer\":3},{\"examId\":5,\"answer\":1}],\"exam\":\"course\",\"reqtoken\":\"" + reqtoken + "\"}"
Compelete_Task(payload, sid)
payload = "{\"courseId\":\"772\",\"examCommitReqDataList\":[{\"examId\":1,\"answer\":2},{\"examId\":2,\"answer\":3},{\"examId\":3,\"answer\":0},{\"examId\":4,\"answer\":0},{\"examId\":5,\"answer\":\"0,1\"}],\"exam\":\"course\",\"reqtoken\":\"" + reqtoken + "\"}"
Compelete_Task(payload, sid)
#############################################
payload = "{\"courseId\":\"848\",\"examCommitReqDataList\":[{\"examId\":1,\"answer\":\"0,1,3\"},{\"examId\":2," \
"\"answer\":\"0,1,2,4\"}],\"exam\":\"course\",\"reqtoken\":\"" + reqtoken + "\"} "
Compelete_Task(payload, sid)
payload = "{\"courseId\":\"829\",\"examCommitReqDataList\":[{\"examId\":1,\"answer\":0},{\"examId\":2," \
"\"answer\":\"0,1,3\"},{\"examId\":3,\"answer\":\"0,1,2\"}],\"exam\":\"course\"," \
"\"reqtoken\":\"" + reqtoken + "\"} "
Compelete_Task(payload, sid)
payload = "{\"courseId\":\"825\",\"examCommitReqDataList\":[{\"examId\":1,\"answer\":0},{\"examId\":2," \
"\"answer\":2},{\"examId\":3,\"answer\":2},{\"examId\":4,\"answer\":3},{\"examId\":5,\"answer\":\"0,1," \
"2,3\"}],\"exam\":\"course\",\"reqtoken\":\"" + reqtoken + "\"} "
Compelete_Task(payload, sid)
payload = "{\"courseId\":\"826\",\"examCommitReqDataList\":[{\"examId\":1,\"answer\":2},{\"examId\":2," \
"\"answer\":3},{\"examId\":3,\"answer\":1},{\"examId\":4,\"answer\":1},{\"examId\":5,\"answer\":\"0," \
"2\"}],\"exam\":\"course\",\"reqtoken\":\"" + reqtoken + "\"} "
Compelete_Task(payload, sid)
payload = "{\"courseId\":\"773\",\"examCommitReqDataList\":[{\"examId\":1,\"answer\":2},{\"examId\":2," \
"\"answer\":2},{\"examId\":3,\"answer\":0},{\"examId\":4,\"answer\":2},{\"examId\":5,\"answer\":3}]," \
"\"exam\":\"course\",\"reqtoken\":\"" + reqtoken + "\"} "
Compelete_Task(payload, sid)
payload = "{\"courseId\":\"847\",\"examCommitReqDataList\":[{\"examId\":1,\"answer\":\"2,3\"},{\"examId\":2," \
"\"answer\":\"0,1,3\"},{\"examId\":3,\"answer\":\"0,1,2\"}],\"exam\":\"course\"," \
"\"reqtoken\":\"" + reqtoken + "\"} "
Compelete_Task(payload, sid)
Compelete_Final_Task(reqtoken, sid)
Compelete_Contest_Task(reqtoken, sid)
print("\n")
def B():
global taskNum
global taskBigNum
print("\033[34m")
print(" ___________ __ ________ .__ __.__")
print(" \\_ _____/_ __ ____ | | __ \\_____ \\ |__| ____ ____ |__|__|____ ____")
print(" | __)| | \\_/ ___\\| |/ / / / \\ \\| |/ \\ / ___\\ | | \\__ \\ / _ \\")
print("| \\ | | /\\ \\___| < / \\_/. \\ | | \\/ /_/ > | | |/ __ \\( <_> )")
print(" \\___ / |____/ \\___ >__|_ \\ \\_____\\ \\_/__|___| /\\___ /\\__| |__(____ /\\____/")
print(" \\/ \\/ \\/ \\__> \\//_____/\\______| \\/")
print("\033[33m")
print("共完成普通试题: " + str(taskNum) + "份 " + "共完成考试试题: " + str(taskBigNum) + "份")
print("顺利完成了" + str(taskContestNum) + "个账号的任务 \n")
print("作者: Bilibili@JonyanDunh(1309634881@qq.com) && Hanbings(3219065882@qq.com)")
print("Author: Bilibili@JonyanDunh(1309634881@qq.com) && Hanbings(3219065882@qq.com)\n")
print("如果被抓 务必铭记 不然网站管理员就不知道为什么全国的题都在一个IP做的了 :)")
print("\033[0m")
def Piliang():
xlsx = xlrd.open_workbook("./Student_Qingjiao_List.xlsx")
sheet1 = xlsx.sheets()[0]
i = 0
while i < sheet1.nrows:
# Random=random.randint(0,1900);
Function(sheet1.row_values(i)[0], str(sheet1.row_values(i)[1])[0:8])
i += 1
Piliang()
B()