mitmproxy/examples/complex
Aldo Cortesi e6eeab6094 Revamp how addons work
- Addons now nest, which means that addons can manage addons. This has a number
of salutary effects - the scripts addon no longer has to poke into the global
addons list, we no longer have to replace/remove/boot-outof parent addons when
we load scripts, and this paves the way for making our top-level tools into
addons themselves.
- All addon calls are now wrapped in a safe execution environment where
exceptions are caught, and output to stdout/stderr are intercepted and turned
into logs.
- We no longer support script arguments in sys.argv - creating an option
properly is the only way to pass arguments. This means that all scripts are
always directly controllable from interctive tooling, and that arguments are
type-checked.

For now, I've disabled testing of the har dump example - it needs to be moved
to the new argument handling, and become a class addon. I'll address that in a
separate patch.
2017-04-25 22:13:44 +12:00
..
change_upstream_proxy.py organize examples 2016-11-21 02:28:10 +01:00
dns_spoofing.py Revamp how addons work 2017-04-25 22:13:44 +12:00
dup_and_replay.py mitmweb: 100% app test coverage, numerous fixes 2016-11-23 22:35:07 +01:00
full_transparency_shim.c organize examples 2016-11-21 02:28:10 +01:00
har_dump.py addon loader: add boot_into, which replaces returning from start() 2017-03-25 10:48:12 +13:00
mitmproxywrapper.py organize examples 2016-11-21 02:28:10 +01:00
nonblocking.py organize examples 2016-11-21 02:28:10 +01:00
README.md update stream.py 2017-01-16 18:30:05 +08:00
remote_debug.py addon loader: add boot_into, which replaces returning from start() 2017-03-25 10:48:12 +13:00
sslstrip.py organize examples 2016-11-21 02:28:10 +01:00
stream_modify.py organize examples 2016-11-21 02:28:10 +01:00
stream.py organize examples 2016-11-21 02:28:10 +01:00
tcp_message.py organize examples 2016-11-21 02:28:10 +01:00
tls_passthrough.py addon loader: add boot_into, which replaces returning from start() 2017-03-25 10:48:12 +13:00
xss_scanner.py added XSS scanner example (#1907) 2017-02-27 18:22:39 +01:00

Complex Examples

Filename Description
change_upstream_proxy.py Dynamically change the upstream proxy.
dns_spoofing.py Use mitmproxy in a DNS spoofing scenario.
dup_and_replay.py Duplicates each request, changes it, and then replays the modified request.
flowbasic.py Basic use of mitmproxy's FlowMaster directly.
full_transparency_shim.c Setuid wrapper that can be used to run mitmproxy in full transparency mode, as a normal user.
har_dump.py Dump flows as HAR files.
mitmproxywrapper.py Bracket mitmproxy run with proxy enable/disable on OS X
nonblocking.py Demonstrate parallel processing with a blocking script
remote_debug.py This script enables remote debugging of the mitmproxy UI with PyCharm.
sslstrip.py sslstrip-like funtionality implemented with mitmproxy
stream.py Enable streaming for all responses.
stream_modify.py Modify a streamed response body.
tcp_message.py Modify a raw TCP connection
tls_passthrough.py Use conditional TLS interception based on a user-defined strategy.