From e1a8c01c6249ae266a1d61a4e65b253eb9dd4d69 Mon Sep 17 00:00:00 2001 From: AdminWhaleFall Date: Sat, 9 Apr 2022 14:45:05 +0800 Subject: [PATCH] =?UTF-8?q?=F0=9F=93=83=20docs:=20=E6=B7=BB=E5=8A=A0=20?= =?UTF-8?q?=E5=89=8D=E7=AB=AF=E8=B0=83=E8=AF=95=E8=BF=90=E8=A1=8C=E6=8C=87?= =?UTF-8?q?=E5=8D=97=E3=80=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Pipfile | 1 + Pipfile.lock | 10 +++++++++- README.md | 46 +++++++++++++++++++++++++++++++++++++++------- 3 files changed, 49 insertions(+), 8 deletions(-) diff --git a/Pipfile b/Pipfile index 56fc6e3..3f0d864 100644 --- a/Pipfile +++ b/Pipfile @@ -10,6 +10,7 @@ httpx = "*" pydantic = "*" click = "*" loguru = "*" +urllib3 = "*" [dev-packages] diff --git a/Pipfile.lock b/Pipfile.lock index 197d533..fec46f0 100644 --- a/Pipfile.lock +++ b/Pipfile.lock @@ -1,7 +1,7 @@ { "_meta": { "hash": { - "sha256": "8e0b0f93224633281d6352d9c86a1b0deb4c111bd8ae6a2d0f4133662f2fc628" + "sha256": "0e3935a9c84b29add380df7aa4a50beba5aa8f37fb68f21f896abb9706b35102" }, "pipfile-spec": 6, "requires": { @@ -255,6 +255,14 @@ "markers": "python_version >= '3.6'", "version": "==4.1.1" }, + "urllib3": { + "hashes": [ + "sha256:44ece4d53fb1706f667c9bd1c648f5469a2ec925fcf3a776667042d645472c14", + "sha256:aabaf16477806a5e1dd19aa41f8c2b7950dd3c746362d7e3223dbe6de6ac448e" + ], + "index": "pypi", + "version": "==1.26.9" + }, "werkzeug": { "hashes": [ "sha256:3c5493ece8268fecdcdc9c0b112211acd006354723b280d643ec732b6d4063d6", diff --git a/README.md b/README.md index ebca738..59b0462 100644 --- a/README.md +++ b/README.md @@ -11,7 +11,7 @@ ## Quick Start -1. **下载本项目** +### 下载本项目 - 方法一:使用Git: @@ -27,7 +27,7 @@ git clone https://github.com/AdminWhaleFall/SMSBoom.git/ - 方法二:点击下载[项目压缩包](https://github.com/AdminWhaleFall/SMSBoom/archive/refs/heads/master.zip)并解压. -2. **配置环境** +### 配置环境 > **请确保自己的电脑有 `python3.x` 的环境,推荐使用 `3.8` 及以上!** @@ -53,13 +53,12 @@ pipenv run python smsboom.py # windows 若无报错,输出帮助信息,则说明环境已经正确安装。 -1. **运行** +### 运行 -- 帮助信息 ```python +# 输出帮助信息 pipenv run python smsboom.py --help # windows pipenv run python3 smsboom.py --help # linux -# 输出 Usage: smsboom.py [OPTIONS] COMMAND [ARGS]... Options: @@ -89,7 +88,7 @@ Options: --help Show this message and exit. ``` -4. **命令示例** +### 命令示例 启动64个线程,轰炸一个人的手机号(198xxxxxxxx),只轰炸一波。 @@ -103,10 +102,43 @@ pipenv run python smsboom.py run -t 64 -p 198xxxxxxxxx pipenv run python smsboom.py run -t 64 -p 198xxxxxxxxx -s -i 60 ``` - 启动64个线程,轰炸多个人的手机号(138xxx,139xxxx),启动循环轰炸,每个循环间隔60秒。 ```python pipenv run python smsboom.py run -t 64 -p 138xxxxxxxx -p 139xxxxxxxx -s -i 60 ``` +## Development + +程序提供接口调试工具,但目前还不完善,欢迎前端大佬 PR。 +调试工具以 `Flask` 为后端,`vue` 为前端,实现前后端分离。 +目前只有测试接口,添加接口的功能。 + +### Flask 前端调试 + +> **前提是已经根据前文 Quick Start 的方式安装好 pipenv 环境** + +```shell +pipenv run python flask_app/app.py +# 输出 + Serving Flask app 'app' (lazy loading) + * Environment: production + WARNING: This is a development server. Do not use it in a production deployment. + Use a production WSGI server instead. + * Debug mode: on + * Running on all addresses (0.0.0.0) + WARNING: This is a development server. Do not use it in a production deployment. + * Running on http://127.0.0.1:10981 + * Running on http://192.168.5.202:10981 (访问链接)(Press CTRL+C to quit) +``` + +默认监听 *0.0.0.0:10981* 地址,浏览器访问[http://127.0.0.1:10981](http://127.0.0.1:10981)若无意外,就可以出现前端调试界面。 + +1. WebAPI +`/downloadapi/`:GET 出现当前 api.json 文件的内容。 +`/testapi/`:POST 给定抓取的api,测试请求。 +`/submitapi/`:POST 提交当前的api到 api.json 文件。 + + + +