diff --git a/libmproxy/console/__init__.py b/libmproxy/console/__init__.py index 1096f04cb..bad73e91a 100644 --- a/libmproxy/console/__init__.py +++ b/libmproxy/console/__init__.py @@ -649,7 +649,7 @@ class ConsoleMaster(flow.FlowMaster): self.state.last_saveload = path path = os.path.expanduser(path) try: - f = file(path, "r") + f = file(path, "rb") fr = flow.FlowReader(f) except IOError, v: return v.strerror diff --git a/libmproxy/dump.py b/libmproxy/dump.py index 1f90184ba..9ad6c3272 100644 --- a/libmproxy/dump.py +++ b/libmproxy/dump.py @@ -121,7 +121,7 @@ class DumpMaster(flow.FlowMaster): if options.rfile: path = os.path.expanduser(options.rfile) try: - f = file(path, "r") + f = file(path, "rb") freader = flow.FlowReader(f) except IOError, v: raise DumpError(v.strerror)