Skip to content

This script is to process Swagger 2.0 JSON files and convert them to curl requests proxied through BurpSuite for API Security Assessments.

License

Notifications You must be signed in to change notification settings

stolenusername/Swagger-to-Curl-Requests

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

This script is to process Swagger 2.0 JSON files and convert them to curl requests proxied through BurpSuite for API Security Assessments.

Usage: ./curl.sh <swagger_file> [<base_url>] [<x_api_key>] [<proxy>] [<output_file>]

As an example:

./curl.sh some-swagger.json https://api.domain.com/endpoint APIKEYAPIKEY 127.0.0.1:8080 myendpoint.txt

The end result is an output file called 'myendpoint.txt' containing curl requests for each of the API calls. From this point you can set the permissions of the output file to execute and run it from the CLI like this: sh myendpoint.txt.

The curl requests will then be processed through BurpSuite if you have it configured to listen on the port you passed off when you ran the script.

About

This script is to process Swagger 2.0 JSON files and convert them to curl requests proxied through BurpSuite for API Security Assessments.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages