Mitmproxy2swagger

Dev tools

api reverse engineering

SHOW HN2022

691points
85comments
#24of 2,570 in 2022
Top 1%of 2022 by points

How HN took it

LovedMost comments that take a side are positive

31 positive, 19 neutral or asking, 0 mixed, 1 critical, out of 51 comments about the project. Thread score +0.59.

Idea: 22 for, 0 againstExecution: 2 for, 1 againstDocs: 1 for, 0 against

The thread, comment by comment

Each row is a top-level comment and its replies, in HN's order. Select a cell to open that comment on HN.

positive neutral or mixed critical about another commenter or something else the maker

What HN said

What people liked

  • Clever, useful idea for documenting undocumented APIs

    From 3 comments
    • This is a really clever project. It seems like an obvious idea once you've seen it, but it clearly isn't. Thank you for sharing it.
      lancebeet on HN
    • What a fantastic idea! I have so many half baked things that some idiot (me) built without documenting the underlying API. This will make life so much easier
      anitil on HN
    • This is one of the most clever projects I've seen in a while. Nice work.
      thefilmore on HN
  • Useful for generating docs and clients from undocumented APIs

    From 2 comments
    • This is great work! This would come in very handy for codebases where an OpenAPI v3 spec would be welcome, but is too onerous to create by hand. Run this for a bit, have it spit…
      julianlam on HN
    • Really amazing. We're having hundreds of undocumented endpoints created over the years, and running this tool on our backends will create instantly good documentation Thanks for…
      eligro91 on HN

Objections

  • Cert pinning and native SSL code can block capture

    From 2 comments
    • That's interesting, but it won't work with native code that statically links a SSL implementation.
      andreidd on HN
    • For Android you'll probably need root access (unless the app developer has opted in to loading your user-imported certificate authorities). For iOS this should be easier.…
      jeroenhd on HN
  • Schema only generated for JSON endpoints; enums hard to detect

    From 2 comments
    • It does, but it will only generate schema descriptions for JSON endpoints. Whis means that the URL and method will appear in the spec, but not the response/request schema.
      alufers on HN
    • I thought about it, but it would be hard to distinguish between an enumerator and just static data. For example if you logged in with only one account it could classify the…
      alufers on HN

Requests

  • Support HAR file input

    From 2 comments
    • 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…
      Labo333 on HN
    • I've always wanted to build something similar to this, by reading HAR files captured right out of the devtools. Have you given any thought to that as an alternative input?
      andrewstuart2 on HN
  • Add auth detection (headers, cookies)

    From 1 comment
    • Very interesting! Would this also be able to determine what kind of auth (header tokens, cookies, etc) the APIs require or is that something you still need to detect manually?
      jeroenhd on HN
  • Option to omit OPTIONS methods

    From 1 comment
    • I gave this a try today. It was silky smooth! Is it possible to tell Swagger to omit OPTIONS methods?
      nattaylor on HN
  • Browser devtools integration

    From 1 comment
    • Can we have this as a browser dev tool please? F12 -> Tab REST -> Create spec from API
      POPOSYS on HN

Questions

  • Can it capture server-rendered pages?

    From 1 comment
  • Does it work with pcap captures?

    From 1 comment
    • Is it possible to do this on wireshark/tcpdump pcap dumps? Like for finding out hostnames, endpoints and request packets of HTTPS requests that an android app is making?
      ducktective on HN

Alternatives named

  • har2requests

    From 1 comment
    • 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…
      Labo333 on HN
  • apimatic transformer

    From 1 comment
    • OpenAPI is just the latest version of swagger. Should not be hard to change. I was able to translate HAR to OpenAPI with this web site's free preview:…
      efitz on HN
  • APIClarity

    From 1 comment
    • Hi, I would also like to add another tool I'm contributing to at work (cisco) called APIClarity [1]. It aims at reconstructing swagger specifications of REST microservices…
      klyr on HN
  • cats fuzzer

    From 1 comment
    • This is great :) You can then fuzz your APIs for issues using https://github.com/Endava/cats.
      ludovicianul on HN

Category, keywords, summaries and labels on this page were made by AI (Thread Reader v2) and not checked by hand. Each point links to the comments it came from.

Add a badge to your READMEShown on HackerShow
[![Shown on HackerShow](https://hackershow.org/badge.svg)](https://hackershow.org/show/31354130)