The central orchestrator for the suite. Discovers and mounts other addon modules in the same directory at startup, so you run one command regardless of which combination of features you need.
On startup, script.py scans the current directory for .py files that expose a mitmproxy addons list. It imports each qualifying file as a module and registers its addons with the mitmproxy event loop. The set of modules to load can be restricted with the modules option.
| Option | Default | Description |
|---|---|---|
modules |
(all discovered) | Comma-separated list of module names (without .py) to load. If omitted, every discoverable addon in the directory is loaded. |
# Load all available modules
mitmdump -s script.py
# Load specific modules
mitmdump -s script.py --set modules="har_capture,token_extractor"
# Load a single module through the loader
mitmdump -s script.py --set modules=media_extractor
# Pass module-specific options alongside the loader
mitmdump -s script.py \
--set modules="media_extractor,token_extractor" \
--set media_types=pics \
--set media_domains="*.example.com"| Module | Purpose | Doc |
|---|---|---|
har_capture |
Save full request/response traffic as HAR files | docs/har_capture.md |
token_extractor |
Extract JWTs, session cookies, and API keys | docs/token_extractor.md |
media_extractor |
Download images and videos from responses | docs/media_extractor.md |
ip_blocker |
Auto-block IPs that hit auth failure thresholds | docs/ip_blocker.md |
- Module load order follows directory listing order. Modules that depend on each other should be loaded together; there is no explicit dependency resolution.
- Errors during a module's import are logged to
debug.logand that module is skipped; other modules continue loading normally. config.pyis not a loadable addon — it is a shared configuration file imported by other modules.