From 493302d1805d49935d4ab9d2fad3311b4f3d3541 Mon Sep 17 00:00:00 2001 From: Chris Czub Date: Mon, 16 Nov 2015 11:53:08 -0500 Subject: Support writing to outfile from mitmweb --- libmproxy/web/__init__.py | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'libmproxy/web') diff --git a/libmproxy/web/__init__.py b/libmproxy/web/__init__.py index a0af7315..90da6ffe 100644 --- a/libmproxy/web/__init__.py +++ b/libmproxy/web/__init__.py @@ -134,6 +134,16 @@ class WebMaster(flow.FlowMaster): "Could not read flow file: %s" % v, "error" ) + + if options.outfile: + err = self.start_stream_to_path( + options.outfile[0], + options.outfile[1] + ) + if err: + print >> sys.stderr, "Stream file error:", err + sys.exit(1) + if self.options.app: self.start_app(self.options.app_host, self.options.app_port) -- cgit v1.2.3