From b39ea74bb6e0bf057c6bf6ac1b0beb3afa37e02b Mon Sep 17 00:00:00 2001 From: michaeljau Date: Wed, 7 Jan 2015 22:20:05 +0800 Subject: [PATCH 1/2] Update inlinescripts.html I updated the certutils.SSLCert reference from "libmproxy.certutils.SSLCert" to "netlib.certutils.SSLCert". --- doc-src/scripting/inlinescripts.html | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc-src/scripting/inlinescripts.html b/doc-src/scripting/inlinescripts.html index 2c3e0d6fd..7f05eedfe 100644 --- a/doc-src/scripting/inlinescripts.html +++ b/doc-src/scripting/inlinescripts.html @@ -130,7 +130,7 @@ The main classes you will deal with in writing mitmproxy scripts are: - libmproxy.certutils.SSLCert + netlib.certutils.SSLCert Exposes information SSL certificates. @@ -174,4 +174,4 @@ matching events will be skipped. ## Spaces in the script path By default, spaces are interpreted as separator between the inline script and its arguments (e.g. -s "foo.py 42"). Consequently, the script path needs to be wrapped in a separate pair of quotes if it contains spaces: --s "'./foo bar/baz.py' 42". \ No newline at end of file +-s "'./foo bar/baz.py' 42". From 3dcba41d6d1f9c2d4307978b1176fe990d10bc5a Mon Sep 17 00:00:00 2001 From: Nick HS Date: Thu, 8 Jan 2015 13:56:19 -0500 Subject: [PATCH 2/2] Error to stdout when loading bad replays from the command line --- libmproxy/console/__init__.py | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/libmproxy/console/__init__.py b/libmproxy/console/__init__.py index f5b6a2a60..1e7f8403d 100644 --- a/libmproxy/console/__init__.py +++ b/libmproxy/console/__init__.py @@ -508,14 +508,22 @@ class ConsoleMaster(flow.FlowMaster): def client_playback_path(self, path): err, ret = self._readflow(path) if err: - self.statusbar.message(ret) + if not self.statusbar: + print >> sys.stderr, ret + sys.exit(1) + else: + self.statusbar.message(ret) else: self.start_client_playback(ret, False) def server_playback_path(self, path): err, ret = self._readflow(path) if err: - self.statusbar.message(ret) + if not self.statusbar: + print >> sys.stderr, ret + sys.exit(1) + else: + self.statusbar.message(ret) else: self.start_server_playback( ret,