-
Notifications
You must be signed in to change notification settings - Fork 0
/
jcqd.py
225 lines (99 loc) · 3.8 KB
/
jcqd.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
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
'''
ikuuu + v2free + gw树洞
v2free注册地址: https://w1.v2free.top/auth/register?code=O9dv
ikuuu注册地址: https://ikuuu.art/auth/register?code=OlHp
gw树洞注册地址: https://kkone.io/auth/register?code=4fMxiN
两个的用户名和密码都请设置一致的 不一致的话请自行修改代码
变量配置:
export jcuname='username'
export jcpasswd='password'
需要安装 lxml 依赖:
1.进入容器pip install lxml
2.青龙面板 -> 依赖管理 -> python -> lxml
'''
import requests, json, os, random,urllib3
from lxml import etree
from notify import send
import urllib3
# 禁用 InsecureRequestWarning 警告
urllib3.disable_warnings(urllib3.exceptions.InsecureRequestWarning)
# 发起请求时忽略证书验证警告
requests.packages.urllib3.disable_warnings()
def v2checkin():
print('==========[当前正在进行v2free签到]==========')
url = 'https://w1.v2free.top'
login_url = '{}/auth/login'.format(url)
check_url = '{}/user/checkin'.format(url)
header = {
'origin': url,
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36'
}
data = {
'email': EMAIL,
'passwd': PASSWD
}
response = json.loads(session.post(url=login_url, headers=header, data=data, verify=False).text)
# 进行签到
result = json.loads(session.post(url=check_url, headers=header, verify=False).text)
content = result['msg']
print('v2free' + content)
send('v2free', content)
def get_ik_domain():
url = 'https://ikuuu.club/'
header = {
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36'
}
try:
res = requests.get(url, headers=header)
if res.status_code == 200:
textname = etree.HTML(res.text)
links = textname.xpath('//a/@href')
return links
else:
print('ikuuu获取签到域名失败!')
exit(1)
except Exception as e:
print(e)
def checkin():
print('==========[当前正在进行ikuuu签到]==========')
url = random.choice(get_ik_domain())
print('当前签到选择的域名是: ====> {}'.format(url))
login_url = '{}/auth/login'.format(url)
check_url = '{}/user/checkin'.format(url)
header = {
'origin': url,
'user-agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/109.0.0.0 Safari/537.36'
}
data = {
'email': EMAIL,
'passwd': PASSWD
}
response = json.loads(session.post(url=login_url, headers=header, data=data).text)
# 进行签到
result = json.loads(session.post(url=check_url, headers=header).text)
content = result['msg']
print('ikuuu' + content)
send('ikuuu', content)
def sign_in(email, passwd):
print('==========[当前正在进行gw树洞签到]==========')
body = {"email" : email,"passwd" : passwd,}
headers = {'user-agent':'Mozilla/5.0 (iPhone; CPU iPhone OS 13_2_3 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/13.0.3 Mobile/15E148 Safari/604.1'}
resp = requests.session()
resp.post(f'https://m.mmomm.io/auth/login', headers=headers, data=body, verify=False)
ss = resp.post(f'https://m.mmomm.io/user/checkin').json()
if 'msg' in ss:
print(ss['msg'])
print('gw树洞' + ss['msg'])
send('gw树洞', ss['msg'])
if __name__ == "__main__":
session = requests.session()
# ikuuu用户名
EMAIL = os.getenv('jcuname')
# ikuuu密码
PASSWD = os.getenv('jcpasswd')
# v2Free
v2checkin()
# ikuuu
checkin()
# gw树洞
sign_in(EMAIL, PASSWD)