From 3749d52b66d7db47188459c36d316136fee5f317 Mon Sep 17 00:00:00 2001 From: Aldo Cortesi Date: Mon, 9 Jul 2012 10:28:01 +1200 Subject: Make mitmproxy "W" over-write, not append. The -w options in mitmdump and mitproxy should do the same thing. Append can have unexpected consequences if the existing file is not a mitmdump. --- libmproxy/console/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/libmproxy/console/__init__.py b/libmproxy/console/__init__.py index f770531a..458f739b 100644 --- a/libmproxy/console/__init__.py +++ b/libmproxy/console/__init__.py @@ -411,7 +411,7 @@ class ConsoleMaster(flow.FlowMaster): def start_stream(self, path): path = os.path.expanduser(path) try: - f = file(path, "ab") + f = file(path, "wb") flow.FlowMaster.start_stream(self, f) except IOError, v: return str(v) -- cgit v1.2.3