Skip to content

Commit

Permalink
Merge branch 'master' of ssh.github.com:mitmproxy/mitmproxy
Browse files Browse the repository at this point in the history
  • Loading branch information
cortesi committed Sep 15, 2014
2 parents 563078d + 5a59fef commit 9f8d2ee
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 3 additions & 1 deletion libmproxy/dump.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
3 changes: 3 additions & 0 deletions libmproxy/platform/windows.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down

0 comments on commit 9f8d2ee

Please sign in to comment.