mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2025-01-30 23:09:44 +00:00
Merge branch 'master' of ssh.github.com:mitmproxy/mitmproxy
This commit is contained in:
commit
9f8d2eea64
@ -197,7 +197,9 @@ class DumpMaster(flow.FlowMaster):
|
||||
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
|
||||
|
@ -43,6 +43,9 @@ class Resolver(object):
|
||||
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()
|
||||
|
Loading…
Reference in New Issue
Block a user