From b886f808beaba097066a1b82fe560b1e70099df0 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Mon, 31 Jan 2011 13:26:56 +1300 Subject: 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. --- test/scripts/a | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100755 test/scripts/a (limited to 'test/scripts/a') diff --git a/test/scripts/a b/test/scripts/a new file mode 100755 index 00000000..6973a44f --- /dev/null +++ b/test/scripts/a @@ -0,0 +1,8 @@ +#!/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) -- cgit v1.2.3