Files
mitmproxy/examples
Aldo Cortesi a388ddfd78 A new interface for reply
Reply is now explicit - it's no longer a callable itself. Instead, we have:

    reply.kill()            - kill the flow
    reply.ack()             - ack, but don't send anything
    reply.send(message)     - send a response

This is part of an incremental move to detach reply from our flow objects,
and unify the script and handler interfaces.
2016-06-08 10:44:20 +12:00
..
2016-05-29 01:23:39 -07:00
2016-02-18 09:27:08 +13:00
2016-05-29 01:23:39 -07:00
2016-05-29 01:23:39 -07:00
2016-02-18 09:27:08 +13:00
2016-05-29 13:01:45 -07:00
2016-02-18 09:27:08 +13:00
2016-05-29 01:23:39 -07:00
2016-05-29 11:55:12 +02:00
2016-05-18 18:46:42 -07:00
2016-02-18 09:27:08 +13:00
2016-02-18 09:27:08 +13:00
2016-06-08 10:44:20 +12:00
2016-05-29 01:23:39 -07:00
2016-05-29 12:54:52 +12:00
2016-02-18 09:27:08 +13:00
2016-02-18 09:27:08 +13:00
2016-06-08 10:44:20 +12:00
2016-03-20 19:40:03 +01:00

Some inline scripts may require additional dependencies, which can be installed using
`pip install mitmproxy[examples]`.


# inline script examples
add_header.py             Simple script that just adds a header to every request.
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.
fail_with_500.py          Turn every response into an Internal Server Error.
filt.py                   Use mitmproxy's filter expressions in your script.
flowwriter.py             Only write selected flows into a mitmproxy dumpfile.
iframe_injector.py        Inject configurable iframe into pages.
modify_form.py            Modify all form submissions to add a parameter.
modify_querystring.py     Modify all query strings to add a parameters.
modify_response_body.py   Replace arbitrary strings in all responses
nonblocking.py            Demonstrate parallel processing with a blocking script.
proxapp.py                How to embed a WSGI app in a mitmproxy server
redirect_requests.py      Redirect requests or directly reply to them.
stub.py                   Script stub with a method definition for every event.
upsidedownternet.py       Rewrites traffic to turn images upside down.


# mitmproxy examples
flowbasic                 Basic use of mitmproxy as a library.
stickycookies             An example of writing a custom proxy with mitmproxy.


# misc
read_dumpfile             Read a dumpfile generated by mitmproxy.
mitmproxywrapper.py       Bracket mitmproxy run with proxy enable/disable on OS X