mitmdump
$ mitmdump Community High Riskmitmdump is the non-interactive CLI companion to mitmproxy. It captures, inspects, replays (--server-replay), and exports HTTP/HTTPS traffic to .mitm or HAR files (--set hardump=...), or runs Python addon scripts (-s) for automated API debugging.
brew install mitmproxy Runs as a background local HTTP proxy or offline .mitm/.har analyzer; use -nr to read saved dumps without binding a port.
Agent-Readiness Checklist
Local Probe EvidenceCaptured --help excerpt
usage: mitmdump [options] [filter]
positional arguments:
filter_args Filter expression, equivalent to setting both the
view_filter and save_stream_filter options.
options:
-h, --help show this help message and exit
--version show version number and exit
--options Show all options and their default values
--commands Show all commands and their signatures
--set option[=value] Set an option. When the value is omitted, booleans are
set to true, strings and integers are set to None (if
permitted), and sequences are emptied. Boolean values
can be true, false or toggle. Sequences are set using
multiple invocations to set for the same option.
-q, --quiet Quiet.
-v, --verbose Increase log verbosity.
--mode, -m MODE The proxy server type(s) to spawn. Can be passed
multiple times. Mitmproxy supports "regular" (HTTP),
"local", "transparent", "socks5", "reverse:SPEC",
"upstream:SPEC", and "wireguard[:PATH]" proxy servers.
For reverse and upstream proxy modes, SPEC is host
specification in the form of "http[s]://host[:port]".
For WireGuard mode, PATH may point to a file
containing key material. If no such file exists, it
will be created on startup. You may append
`@listen_port` or `@listen_host:listen_port` to
override `listen_host` or `listen_port` for a specific
proxy mode. Features such as client playback will use
the first mode to determine which upstream server to
use. May be passed multiple times.
--no-anticache
--anticache Strip out request headers that might cause the server
to return 304-not-modified.
--no-showhost
--showhost Use the Host header to construct URLs for display.
This option is disabled by default because malicious
apps may send misleading host headers to evade your
analysis. If this is not a concern, enable this
options for better flow display.
--no-show-ignored-hosts
--show FCRS-1.0 6-Dimension Breakdown
Non-interactive CLI (mitmdump vs TUI mitmproxy) with -nr offline reading, -s Python scripts, and HAR export, though live mode blocks as a daemon.
- Non-interactive companion to
mitmproxy; supports-nr,-s, and--set hardump
Man-in-the-middle TLS decryption handles sensitive ~/.mitmproxy CA private keys and records full auth headers/tokens in captures.
- Generates local MITM CA private keys and logs unredacted HTTP credentials
Installed cleanly via brew, pip, uvx, or standalone binaries, though clients must trust the local CA for HTTPS.
- Available via Homebrew, PyPI, and official binaries
Unmatched for inspecting mobile/SDK HTTP traffic, server-replay mocks, and exporting HAR files.
- Native HAR export/import,
-sPython addons, and--server-replay
Actively maintained by the mitmproxy Project (mitmproxy/mitmproxy, MIT).
- Official
mitmproxy/mitmproxyrepository
Clear official documentation covering addons, HAR export, and replay modes.
- Official docs at docs.mitmproxy.org
Security, Auth & Guardrails
Generates and uses local interception CA keys under ~/.mitmproxy/ to decrypt HTTPS traffic when clients trust the CA.
Free, MIT open-source Python CLI.
# mitmdump Agent Rules - `mitmdump` runs as a persistent proxy daemon unless `-nr` (offline read) is passed; start with an explicit timeout or background task and clean up when done. - Captured `.mitm`/`.har` files contain full auth cookies and Bearer tokens—never commit or share raw captures.
Agent-Ready Command Recipes
Safe Read-Only Queries
mitmdump -nr capture.mitm --flow-detail 2
Reads capture.mitm offline (-nr, no proxy server) and prints summary headers/bodies.
Controlled Writes & Previews
mitmdump -p 8080 --set hardump=traffic.har -q
Listens on port 8080 quietly (-q) and writes captured flows to traffic.har on exit.
Strengths for Agents
- + Native HAR export (
--set hardump=...) and offline capture inspection (-nr). - + Powerful
-sPython addon API and--server-replaymocking.
Caveats & Pitfalls
- ! Live proxy mode stays running indefinitely until signaled.
- ! Captured
.mitm/.harfiles store plaintext auth tokens and cookies.