mitmproxy/examples/complex
David Kremer e46e064df3 [examples/xss_scanner] replace relative import
test_xss_scanner.py was utterly failing because of a trouble (bug?)
with the `monkeypatch` fixture failing to replace `gethostbyname`
with the correct mock function.

Indeed, when stepping through the code, the `gethostbyname` presumably
mocked was reported as a builtin python function. The problem could
then come from the fact that it is hard to monkeypatch builtin function
in python.

Using absolute imports seems to resolve the problem.
2018-08-15 19:47:55 +02:00
..
change_upstream_proxy.py Extend mypy checking, fix #2194 (#2819) 2018-02-03 21:37:33 +01:00
dns_spoofing.py Update CLI usage instructions 2018-06-26 13:09:45 +02:00
dup_and_replay.py View API slightly extended; codebase cleaned in some points 2018-06-13 11:56:14 +02:00
full_transparency_shim.c organize examples 2016-11-21 02:28:10 +01:00
har_dump.py har_dump example cmdline invocation 2018-05-08 16:27:56 +08:00
mitmproxywrapper.py organize examples 2016-11-21 02:28:10 +01:00
nonblocking.py Ditch the addon stdout wrapper 2018-05-08 14:26:41 +12:00
README.md Misc. typos 2018-02-24 21:45:11 -05:00
remote_debug.py addon loader: add boot_into, which replaces returning from start() 2017-03-25 10:48:12 +13:00
sslstrip.py fix Python 3.6 variable type annotations #3053 2018-04-14 16:24:41 -07:00
stream_modify.py Misc. typos 2018-02-24 21:45:11 -05:00
stream.py update streaming docs 2017-07-04 10:53:23 +02:00
tcp_message.py fix tcp example 2018-05-11 11:58:01 +02:00
tls_passthrough.py Addons and addon testing 2017-04-26 19:56:33 +12:00
websocket_inject_message.py websocket: inject messages via flow 2018-05-16 21:50:15 +02:00
xss_scanner.py [examples/xss_scanner] replace relative import 2018-08-15 19:47:55 +02: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.
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 functionality 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.
xss_scanner.py Scan all visited webpages.