From e285b17e3ff2e48455a5bc45b9a401b5b78b65cf Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Sun, 15 May 2011 11:54:12 +1200 Subject: Add -r option to mitmdump and mitmproxy. This option reads a set of flows from a file. I've also regularized the mitmdump and mitmproxy command-line signatures by removing mitmproxy's old way of specifying flow loads through naked arguments. --- libmproxy/flow.py | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'libmproxy/flow.py') diff --git a/libmproxy/flow.py b/libmproxy/flow.py index b53794c9..14f06241 100644 --- a/libmproxy/flow.py +++ b/libmproxy/flow.py @@ -548,13 +548,11 @@ class FlowMaster(controller.Master): """ for i in fr.stream(): if i.request: - f = self.state.add_request(i.request) - self.process_new_request(f) + self.handle_request(i.request) if i.response: - f = self.state.add_response(i.response) - self.process_new_response(f) + self.handle_response(i.response) if i.error: - f = self.state.add_error(i.error) + self.handle_error(i.error) def process_new_request(self, f): if self.stickycookie_state: -- cgit v1.2.3