10 Commits
Author SHA1 Message Date
Sheroy Cooper 8cf998ac0b Handle malformed base64 HAR content (#10) 2026-07-26 21:34:20 +05:30
Thejeshandthejesh23 847e54d922 fix(har): reconstruct form bodies from postData.params (#9)
HAR request bodies for application/x-www-form-urlencoded may be encoded
as postData.params (array of {name, value}) with no postData.text field
(e.g. Chrome DevTools export). _body_bytes read only text, so those
bodies were silently dropped and the generated client method lost its
request fields. Fall back to url-encoding params when text is absent,
matching the HAR spec.

Fixes #8

Co-authored-by: thejesh23 <thejesh23@users.noreply.github.com>
2026-07-25 15:12:59 +05:30
ZhYGuoL 027bc48698 feat: add HAR file import as a capture backend (#5)
The sources/__init__.py docstring promised "cURL/HAR paste" but HAR was
never implemented. This adds it, so mimic works with browser devtools
exports (Chrome, Firefox, Safari) and desktop proxies (Charles, Proxyman)
with no mitmproxy or iPhone setup.

- new mimic/sources/har.py parses HAR JSON into mimic's flow dicts, with
  inline request/response bodies (base64 decoded) for codegen
- Session.from_har(path, host) constructor; host defaults to the
  most-requested one
- --har flag on the hosts, learn, and gen commands
- tests/test_har.py with a small fixture

The HAR-to-flow conversion produces the same dict shape extract.py and
codegen.py already consume, so those modules are untouched.

Signed-off-by: ZhYGuoL <zguoliau@andrew.cmu.edu>
2026-07-15 09:44:38 +05:30
Sma Das 67441bfaba fix: harden HTTP error handling and auth retries (#1) 2026-07-14 09:18:23 +05:30
andrew 64f1f94af9 feat: Add opencode as an AI generator option (#2)
* Add opencode as an AI generator option

Support  to use OpenCode
(https://opencode.ai) instead of Claude Code for client generation.

- Adds --generator flag (claude|opencode, default: claude)
- OpenCode uses its own configured default model (--model is ignored)
- mimc doctor checks for either claude or opencode on PATH
- Minimal diff: one if/else branch in generate(), one new CLI flag

* docs: clean up comments

* Restore AI generator check in mimc doctor
2026-07-14 09:17:59 +05:30
Divy Srivastava 4889872b20 de-slop pinning/dpop docs 2026-07-13 17:58:58 +05:30
Divy Srivastava 37ff46811d add cert-pinning bypass (mimic unpin) + pinning/dpop docs
- mimic unpin <ipa|bundle-id>: orchestrates httptoolkit's Frida unpinning
  scripts, bakes the mitmproxy CA + proxy addr into config.js, emits the
  frida command; runs objection patchipa for the no-jailbreak gadget path
  and hands off signing/install
- doctor: optional git/frida/objection checks for the unpin path
- docs/pinning.md, docs/dpop.md: why pinning blocks capture (beatable) vs
  DPoP defeats replay (by design); README Limitations links both
2026-07-13 17:45:10 +05:30
Divy Srivastava f231086755 update README 2026-07-13 17:06:39 +05:30
Divy Srivastava 0a18773f07 Update README.md 2026-07-13 10:50:42 +05:30
Divy Srivastava 3361c2a1d4 mimic: intercept any iOS app, AI-generate a Python client
Capture your own session with mitmproxy, reuse your real auth, and let
claude -p write an ergonomic client from the captured endpoints.

- Session/App runtime with mitm + cURL sources and token auto-refresh
- CLI: record / doctor / hosts / learn / gen
- one-command install via uv; mitmproxy launched on demand via uvx
- MIT licensed, own-accounts-only framing
2026-07-13 10:42:59 +05:30