diff options
-rw-r--r-- | examples/README | 1 | ||||
-rw-r--r-- | examples/fail_with_500.py | 3 |
2 files changed, 4 insertions, 0 deletions
diff --git a/examples/README b/examples/README index cf5c4d7d..90edf468 100644 --- a/examples/README +++ b/examples/README @@ -7,6 +7,7 @@ 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. diff --git a/examples/fail_with_500.py b/examples/fail_with_500.py new file mode 100644 index 00000000..aec85b50 --- /dev/null +++ b/examples/fail_with_500.py @@ -0,0 +1,3 @@ +def response(context, flow): + flow.response.status_code = 500 + flow.response.content = b"" |