mitmweb

Usage

# start proxy to intercept traffic
mitmproxy
Starting the mitmweb GUI and proxy.

Proxy the traffic from the browser.

Proxying the traffic from the browser with FoxyProxy.

Use the web application as intented and visit mitmweb server to export the file (flow).

Exporting the requests as a flow file.

Download mitmproxy2swagger's latest release, build with Docker, and convert flow file to spec.yml.

# convert flow file to swagger (from within the flow directory)
sudo docker run -it -v $PWD:/app mitmproxy2swagger -i flows -o spec.yml -p http://127.0.0.1 -f flow --examples
# remove the ignore tags
sudo nano spec.yml
# re-run the command
sudo docker run -it -v $PWD:/app mitmproxy2swagger -i flows -o spec.yml -p http://127.0.0.1 -f flow --examples
Converting the flow file to spec.yml.
Removing the ignore tags.

Import the spec.yml file to SwaggerEditor to visualize it and to Postman to work with.

Importing spec.yml to SwaggerEditor.
Importing spec.yml to Postman.

Resource

Last updated

Was this helpful?