工具与资源github.com
Mitmproxy2swagger:自动逆向 REST API
Show HN: Mitmproxy2swagger – Automagically reverse-engineer REST APIs
2022 — 2025,它一次次回到首页
黑点是上首页(≥ 50 分)的那次投稿,空心点是没冲上去的投稿,点越大分数越高。
导读
mitmproxy2swagger 是一个开源工具,能把 mitmproxy 抓取的 HTTP 流量自动转换成 OpenAPI 规范,从而逆向工程出应用使用的 REST API。作者称已在两个应用上使用,效果足以编写替代客户端或快速实现自动化。
为什么经久不衰:它把繁琐的 API 逆向工程自动化,配合抓包工具可以快速摸清任意应用的接口,对做自动化、写替代客户端或安全研究的人长期有用。
HN 评论精选
作者介绍项目用途和实际效果
想展示一下我的小项目,它帮助逆向工程各种应用使用的 API。它接收 mitmproxy 抓取的 HTTP 流量,为给定的 REST API 生成 OpenAPI 规范。我已经在两个应用上用过,结果足以编写替代客户端或快速自动化一些操作。
alufers查看英文原文
Wanted to show off my little project which helps whith reverse engneering APIs used by various apps. It takes HTTP traffic capturewd by mitmproxy and generates an OpenAPI specification for a given REST API. I have used it already on two apps and the results are good enough to write an alternative client or quickly automate some stuff.
配合 root 手机和其他工具可为任意应用搭建后端骨架
这真的很棒。用一台已 root 的安卓手机加上这些工具,再配合其他几个工具,你就能得到一个骨架,为任何你想要的应用实现后端。
nickysielicki查看英文原文
This is really incredible. With a rooted android phone and these tools, plus a couple others [1,2,3], you can get a skeleton to implement a backend for any app you want. [1]: https://github.com/koxudaxi/fastapi-code-generator [2]: https://github.com/ioxiocom/openapi-to-fastapi [3]: https://infosecwriteups.com/hail-frida-the-universal-ssl-pinning-bypass-for-android-e9e1d733d29?gi=c1ca9139c642
建议结合爬虫自动遍历界面来生成文档
能否通过与自己前端交互来生成 REST 文档?应该再加一个爬虫,递归点击每个可点击的元素。
SemanticStrengh查看英文原文
Can this be used to generate a REST documentation for your own frontend just by interacting with it? This should be augmented via a crawler, that click everyclickable element recursively.
对比 HAR 方案,并认可 mitmproxy 可抓手机流量的优势
很棒!类似地,我写了一个从 HAR 抓包生成 Python requests 代码的程序。我认为对最终用户来说 HAR 更简单,不需要安装,直接从浏览器开发者工具的网络面板导出。你为什么没用它?EDIT:我意识到 mitmproxy 还能抓手机等其他设备的流量,很酷的项目,我会考虑让我的工具支持 mitmproxy 抓包!
Labo333查看英文原文
Very nice! On the same note, I wrote a program to generate Python code (requests) from a HAR capture: https://github.com/louisabraham/har2requests I think using HAR captures is simpler for the end user than spawning mitmproxy as they don't require any installation and are extracted from the network tab of the browser devtools. Is there a reason why you didn't use them? EDIT: I realized that mitmproxy can also get traffic from other devices like phones. Very cool project, I will think about modifying mine to support mitmproxy captures!
历次讨论
同类还值得读
直接在浏览器中启动 Linux 内核
Boot a linux kernel right inside your browser.
Fabrice Bellard 的 JSLinux 页面,用 JavaScript 在浏览器里启动一个 Linux 内核,并提供一个可交互的终端环境。
工具与资源上首页 5 次 · 2011–2025bellard.orgHacker News 未公开功能与行为清单(2018)
A List of Hacker News's Undocumented Features and Behaviors (2018)
数据科学家 Max Woolf 整理的 Hacker News 未公开功能与行为清单,涵盖投票机制、排名算法、账号惩罚等社区运作细节。
工具与资源上首页 5 次 · 2019–2025github.comMapSCII:在终端中用盲文和 ASCII 渲染地图
MapSCII – Braille and ASCII map renderer for the console
MapSCII 是一个在命令行终端里渲染地图的开源工具,用盲文字符和 ASCII 字符把地理数据画成可交互浏览的字符地图。
工具与资源上首页 5 次 · 2017–2025github.com顶尖大学的免费在线课程
Free Online Courses from Top Universities
Open Culture 整理的一份免费在线课程合集,汇集了全球顶尖大学(如 MIT、斯坦福、耶鲁等)向公众开放的网络课程资源,涵盖音频、视频等多种形式。
工具与资源上首页 5 次 · 2010–2022openculture.com淘气字符串:容易引发用户输入问题的字符串清单
Naughty Strings: A list of strings likely to cause issues as user-input data
一个 GitHub 仓库,收录了大量容易让程序出问题的用户输入字符串,如特殊字符、emoji、SQL 注入片段、系统命令等,供开发者用于测试输入处理逻辑。
工具与资源上首页 4 次 · 2015–2020github.com