mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-27 02:24:18 +00:00
b886f808be
External scripts can read a flow, modify it, and then return it to mitmproxy using a simple API. The "|" keyboard shortcut within mitmproxy prompts the user for a script.
9 lines
159 B
Python
Executable File
9 lines
159 B
Python
Executable File
#!/usr/bin/env python
|
|
import sys
|
|
sys.path.insert(0, "..")
|
|
from libmproxy import script
|
|
|
|
f = script.load_flow()
|
|
f.request.host = "TESTOK"
|
|
script.return_flow(f)
|