mitmproxy/test/scripts/a
Aldo Cortesi b886f808be Add an external script API.
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.
2011-01-31 13:26:56 +13:00

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)