{"repo":"alufers/mitmproxy2swagger","free":true,"listed":false,"github":"https://github.com/alufers/mitmproxy2swagger","clone":"git clone https://github.com/alufers/mitmproxy2swagger.git","description":"Automagically reverse-engineer REST APIs via capturing traffic","language":"HTML","stars":9583,"topics":["mitmproxy","openapi","reverse-engineering","swagger"],"license":null,"category":"security-tools","readme_excerpt":"mitmproxy2swagger A tool for automatically converting mitmproxy captures to OpenAPI 3.0 specifications. This means that you can automatically reverse-engineer REST APIs by just running the apps and capturing the traffic. --- 🆕 NEW! Added support for processing HAR exported from the browser DevTools. See Usage - HAR for more details. --- Installation First you will need python3 and pip3. Then clone the repo and run mitmproxy2swagger as per examples below. Usage Mitmproxy To create a specification by inspecting HTTP traffic you will need to: 1. Capture the traffic by using the mitmproxy tool. I personally recommend using mitmweb, which is a web interface built-in to mitmproxy. IMPORTANT To configure your client to use the proxy exposed by mitm proxy, please consult the mitmproxy documentation for more information. 2. Save the traffic to a flow file. In mitmweb you can do this by using the \"File\" menu and selecting \"Save\": 3. Run the first pass of mitmproxy2swagger: Please note that you can use an existing schema, in which case the existing schema will be extended with the new data. You can also run it a few times with different flow captures, the captured data will be safely merged. is the base url of the API you wish to reverse-engineer. You will need to obtain it by observing the requests being made in mitmproxy. For example if an app has made requests like these: The likely prefix is https://api.example.com/v1 . 4. Running the first pass should have created a section in the","default_branch":null,"files":null,"tree":[],"storefront":"/r/alufers","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/alufers/mitmproxy2swagger/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}