-
Notifications
You must be signed in to change notification settings - Fork 0
/
2.py
59 lines (46 loc) · 1.53 KB
/
2.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
from multiprocessing import *
import requests
import os
import json
def sign(e,p):
url = 'https://v2.bujidao.org/auth/login'
headers = {
'content-type': 'application/x-www-form-urlencoded; charset=UTF-8',
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 11_3_1) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1 Safari/605.1.15'
}
data = {
'email': ''+e,
'passwd': ''+p,
'code': ''
}
res = requests.post(url=url,headers=headers,data=data)
print(res.cookies)
return res.cookies['uid'],res.cookies['email'],res.cookies['key'],res.cookies['ip'],res.cookies['expire_in']
def parse():
u=sign()
for i in range(len(u)):
uid = u[0]
email = u[1]
key = u[2]
ip = u[3]
expire_in = u[4]
c='uid={};email={};key={};ip={};expire_in={}'.format(uid,email,key,ip,expire_in)
return c
def main():
url = 'https://v2.bujidao.org/user/checkin'
c=parse()
print(c)
headers = {
'content-type': 'application/x-www-form-urlencoded; charset=UTF-8',
'User-Agent': 'Mozilla/5.0 (Macintosh; Intel Mac OS X 11_3_1) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/14.1 Safari/605.1.15',
'Cookie':''+c
}
res = requests.post(url=url,headers=headers)
x = [os.environ['EMAIL1'],os.environ['EMAIL2']]
y = [os.environ['PASSWD1'],os.environ['PASSWD2']]
args = list(zip(x, y))
with Pool(5) as p:
p.starmap_async(sign,args).wait()
print(res.text)
if __name__ == '__main__':
main()