Reverse Engineer an API
Last updated
Last updated
FoxyProxy
mitmweb
mitmproxy2swagger
https://editor.swagger.io/
Postman
Foxyproxy: Turn on 8080 port using Foxy Proxy.(Label it anything you want)
mitmweb: Run sudo mitmweb
and then go to mitm.it and install & import the certificate.
Explore Website w/ API's functionalities: Go to the website w/ api that you want to gather the API endpoints from and explore it's functionalities. The mitmweb tool will capture it, afterwards you can download the captures as a flow file in mitmweb by clicking on file -> save all.
mitmproxy2swagger: Here we run sudo mitmproxy2swagger -i flows -o spec.yml -p <website api> -f flow
. This will turn flows file to a yml file. Afterwards you need to remove the ignore: in the spec.yml and run sudo mitmproxy2swagger -i flows -o spec.yml -p <website api> -f flow --examples
, --examples is added to enhance the documentation of the api endpoints.
https://editor.swagger.io/: Now you can import the clean spec.yml file and visualize the different endpoints.
Postman: You can also import the spec.yml in postman which will produce a well organized collection.