diff --git a/libmproxy/dump.py b/libmproxy/dump.py index d3f8178043..0349a3b58e 100644 --- a/libmproxy/dump.py +++ b/libmproxy/dump.py @@ -197,7 +197,9 @@ def _process_flow(self, f): print >> self.outfile, str_request(f, self.showhost) print >> self.outfile, self.indent(4, f.request.headers) if utils.isBin(f.request.content): - print >> self.outfile, self.indent(4, netlib.utils.hexdump(f.request.content)) + d = netlib.utils.hexdump(f.request.content) + d = "\n".join("%s\t%s %s"%i for i in d) + print >> self.outfile, self.indent(4, d) elif f.request.content: print >> self.outfile, self.indent(4, f.request.content) print >> self.outfile diff --git a/libmproxy/platform/windows.py b/libmproxy/platform/windows.py index 5f08a9fcba..ddbbed5290 100644 --- a/libmproxy/platform/windows.py +++ b/libmproxy/platform/windows.py @@ -43,6 +43,9 @@ def original_addr(self, csock): addr = pickle.load(self.rfile) if addr is None: raise RuntimeError("Cannot resolve original destination.") + addr = list(addr) + addr[0] = str(addr[0]) + addr = tuple(addr) return addr except (EOFError, socket.error): self._connect()