mitmproxy/examples/dup_and_replay.py

8 lines
193 B
Python
Raw Normal View History

2016-10-26 05:06:52 +00:00
from mitmproxy import ctx
2016-07-08 01:37:33 +00:00
def request(flow):
2016-10-26 05:06:52 +00:00
f = ctx.master.state.duplicate_flow(flow)
f.request.path = "/changed"
2016-10-26 05:06:52 +00:00
ctx.master.replay_request(f, block=True, run_scripthooks=False)