https://github.com/0xnoid/postmancollector
Create a Postman Collection from an endpoint running Swagger UI
https://github.com/0xnoid/postmancollector
api api-pentest api-testing penetration-testing penetration-testing-tools postman postman-collection rest-api security security-tools swagger-ui
Last synced: about 1 year ago
JSON representation
Create a Postman Collection from an endpoint running Swagger UI
- Host: GitHub
- URL: https://github.com/0xnoid/postmancollector
- Owner: 0xnoid
- License: bsd-3-clause
- Created: 2025-01-23T18:54:41.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2025-01-23T20:14:05.000Z (about 1 year ago)
- Last Synced: 2025-01-23T20:31:06.808Z (about 1 year ago)
- Topics: api, api-pentest, api-testing, penetration-testing, penetration-testing-tools, postman, postman-collection, rest-api, security, security-tools, swagger-ui
- Language: Python
- Homepage: https://mimmikk.com/tools/postmancollector
- Size: 6.84 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# PostmanCollector
Found an API running on Swagger UI? Have they disabled the JSON collection?\
Well, we can still get one.
This tool was made for Penetration Testing, but can of course be useful for anyone working with APIs and needs a collection to use with Postman.\
The tool extracts data from Swagger UI itself, creating a collection that contains:
- Domain/baseUrl
- Endpoints
- Schema
- Documentation
## Usage
The script is made to be as simple as possible:
```sh
Generate Postman Collection from Swagger/OpenAPI documentation
By 0xnoid: github.com/0xnoid
options:
-h, --help show this help message and exit
-u URL, --url URL Base URL to API documentation
-o OUTPUT, --output OUTPUT
Output file name
-s JSPATH, --swagger JSPATH
Custom path to swagger JS file (default: swagger-
ui-init.js)
-v, --verbose Enable verbose output
Usage: postman.py [-h] -u URL [-o OUTPUT] [-s JSPATH] [-v]
```
Example:
```sh
python postman.py -u https://api.example.com/api -o SomeCollection.json
```
If the Swagger UI `init.js` does not have the default path:
```sh
python postman.py -u https://api.example.com -s swagger.js -o SomeCollection
```
## Installation:
#### Quick install:
```sh
curl -s https://raw.githubusercontent.com/0xnoid/PostmanCollector/refs/heads/master/install.sh | bash && cd PostmanCollector/ && source venv/bin/activate
```
#### Manually:
```sh
git clone https://github.com/0xnoid/PostmanCollector
cd PostmanCollector
python -m venv venv/
source venv/bin/activate
pip install -r requirements.txt
python PostmanCollector.py -h
```