企业项目管理、ORK、研发管理与敏捷开发工具平台

网站首页 > 精选文章 正文

一款免费的API接口测试工具

wudianyun 2025-08-03 08:52:59 精选文章 4 ℃

Autoswagger 是一个命令行工具,旨在使用 Swagger/OpenAPI 文档发现、分析和测试未经身份验证的端点。它有助于识别未受保护的 API 端点中的潜在安全问题,例如 PII 泄漏和常见机密泄露。

请注意,Autoswagger 的初始版本绝不是完整的,并且该工具目前无法处理某些类型的规范。请随意使用它,并扩展其检测功能或添加检测正则表达式以涵盖您的特定用例!

Introduction介绍

Autoswagger 可自动执行查找 OpenAPI/Swagger 规范、提取 API 端点以及系统测试它们的 PII 暴露、 机密以及大型或有趣响应的过程。它利用 Presidio 进行 PII 识别,利用正则表达式进行敏感密钥/令牌检测。

Key Features 主要特点

通过三种方式发现 OpenAPI 规范:

安装与使用

git clone

安装依赖项

pip install -r requirements.txt

检查安装,显示帮助:

python3 autoswagger.py -h








Find unauthenticated endpoints

usage: autoswagger.py [-h] [-v] [-risk] [-all] [-product] [-stats] [-rate RATE] [-b] [-json] [urls ...]

Autoswagger: Detect unauthenticated access control issues via Swagger/OpenAPI documentation.

positional arguments:
urls Base URL(s) or spec URL(s) of the target API(s)

options:
-h, --help show this help message and exit
-v, --verbose Enable verbose output
-risk Include non-GET requests in testing
-all Include all HTTP status codes in the results, excluding 401 and 403
-product Output all endpoints in JSON, flagging those that contain PII or have large responses.
-stats Display scan statistics. Included in JSON if -product or -json is used.
-rate RATE Set the rate limitin requests per second (default: 30). Use 0 to disable rate limiting.
-b, --brute Enable exhaustive testing of parameter values.
-json Output results in JSON format in default mode.

Example usage:
python autoswagger.py https://api.example.com -v

最近发表
标签列表