diff options
author | Chris Czub <chris.czub@gmail.com> | 2015-11-16 11:53:08 -0500 |
---|---|---|
committer | Thomas Kriechbaumer <thomas@kriechbaumer.name> | 2016-01-10 11:57:37 +0100 |
commit | 493302d1805d49935d4ab9d2fad3311b4f3d3541 (patch) | |
tree | 31bb5cad15c54b214a399b25c071c38114d24f7c /libmproxy/web | |
parent | f07008b8a640fcece90199b1e5ed44e0126a5d58 (diff) | |
download | mitmproxy-493302d1805d49935d4ab9d2fad3311b4f3d3541.tar.gz mitmproxy-493302d1805d49935d4ab9d2fad3311b4f3d3541.tar.bz2 mitmproxy-493302d1805d49935d4ab9d2fad3311b4f3d3541.zip |
Support writing to outfile from mitmweb
Diffstat (limited to 'libmproxy/web')
-rw-r--r-- | libmproxy/web/__init__.py | 10 |
1 files changed, 10 insertions, 0 deletions
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) |