Skip to content

Commit ef03750

Browse files
authored
Merge pull request KathanP19#239 from offensive-droid/master-1
Create Reverse_Engineer_an_API.md
2 parents 119a3c6 + 30d2d1e commit ef03750

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed
+19
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Reverse Engineer an API
2+
<img src="https://pasteboard.co/n2094TfDB8qt.png">
3+
4+
## Tools to use
5+
1. FoxyProxy
6+
2. mitmweb
7+
3. mitmproxy2swagger
8+
4. https://editor.swagger.io/
9+
5. Postman
10+
11+
## Steps to Reproduce
12+
1. **Foxyproxy:** Turn on 8080 port using Foxy Proxy.(Label it anything you want)
13+
2. **mitmweb:** Run `sudo mitmweb` and then go to mitm.it and install & import the certificate.
14+
3. **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. <br>The mitmweb tool will capture it,
15+
afterwards you can download the captures as a flow file in mitmweb by clicking on file -> save all.
16+
4. **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
17+
`sudo mitmproxy2swagger -i flows -o spec.yml -p <website api> -f flow --examples`, --examples is added to enhance the documentation of the api endpoints.
18+
5. **https://editor.swagger.io/:** Now you can import the clean spec.yml file and visualize the different endpoints.
19+
6. **Postman:** You can also import the spec.yml in postman which will produce a well organized collection.

0 commit comments

Comments
 (0)