Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jayus0821/swagger-hack
自动化爬取并自动测试所有swagger接口
https://github.com/jayus0821/swagger-hack
Last synced: 22 days ago
JSON representation
自动化爬取并自动测试所有swagger接口
- Host: GitHub
- URL: https://github.com/jayus0821/swagger-hack
- Owner: jayus0821
- Created: 2021-02-01T11:49:51.000Z (almost 4 years ago)
- Default Branch: main
- Last Pushed: 2022-07-17T19:44:48.000Z (over 2 years ago)
- Last Synced: 2024-08-05T17:45:16.596Z (4 months ago)
- Language: Python
- Homepage:
- Size: 4.83 MB
- Stars: 902
- Watchers: 13
- Forks: 99
- Open Issues: 12
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
- awesome-hacking-lists - jayus0821/swagger-hack - 自动化爬取并自动测试所有swagger接口 (Python)
README
# Swagger-hack 2.0
在测试中偶尔会碰到swagger泄露
常见的泄露如图:
![](https://github.com/jayus0821/swagger-hack/blob/main/images/image-20210201200842378.png)
有的泄露接口特别多,每一个都手动去试根本试不过来
于是用python写了个脚本自动爬取所有接口,配置好传参发包访问**第一个版本仅适配了一个版本的swagger,不同版本见差距比较大,后续又调查了很多版本的swagger,将脚本的适配性增强了很多**
优化:
* 适配多个版本swagger
* 添加多进程
* 增强了程序的健壮性
* 优化了控制台显示,生成日志文件单链接形式:
![](https://github.com/jayus0821/swagger-hack/blob/main/images/1.png)
文件形式:
![](https://github.com/jayus0821/swagger-hack/blob/main/images/2.png)最终结果:
![](https://github.com/jayus0821/swagger-hack/blob/main/images/image-20210201201527999.png)