Collection of scripts related to mitmproxy.
Before starting, install dependencies with:
pip install -r requirements.txtPlain scripts are the Python files that don't start with addon_.
They can be run with:
python <script_file> [<parameters>]IMPORTANT: each script explains its own usage if run with -h or --help flag.
- extract_urls.py reads a mitmproxy dump file and prints all the requested urls. It supports mitmproxy filter expressions.
mitmproxy addons are the Python files that start with addon_.
They can be run with:
mitmproxy -s <addon_file> [<parameters>]IMPORTANT: each parameter is configured with --set, like --set dd_delay=2000
-
addons_delay_drop_fail.py delays, drop or fails certain connections.
- It supports several parameters:
dd_filter: mandatory filter expression to match requestsdd_delay: integer value that represents the delay in millisecondsdd_drop: boolean value (true/false) that tells the addon to drop connection. It has priority overdd_delayanddd_fail.dd_fail: boolean value (true/false) that tells the addon to fail connection with error 500. It can be combined withdd_delay.
- Example usage:
mitmweb -s addon_delay_drop.py --set dd_filter='~m POST ~u api.example.com' --set dd_delay=10000
- It supports several parameters:
-
addons_delay_drop_fail_file.py delays, drops or fails certain connections.
- It supports multiple rules that are loaded from a JSON file. An example file is provided.
- The file is dynamically reloaded if changed
- It requires a parameter:
dd_rules_file: path to file containing rules.
- Example usage:
mitmweb -s addon_delay_drop_fail_file.py --set dd_rules_file=$PWD/rules.json
- It supports multiple rules that are loaded from a JSON file. An example file is provided.