aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--mitmproxy/contentviews.py2
-rw-r--r--netlib/strutils.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/mitmproxy/contentviews.py b/mitmproxy/contentviews.py
index 706fa5ed..331a706f 100644
--- a/mitmproxy/contentviews.py
+++ b/mitmproxy/contentviews.py
@@ -172,7 +172,7 @@ class ViewHex(View):
def _format(data):
for offset, hexa, s in strutils.hexdump(data):
yield [
- ("offset", offset + b" "),
+ ("offset", offset + " "),
("text", hexa + " "),
("text", s)
]
diff --git a/netlib/strutils.py b/netlib/strutils.py
index 9208f954..a51df886 100644
--- a/netlib/strutils.py
+++ b/netlib/strutils.py
@@ -146,7 +146,7 @@ def hexdump(s):
A generator of (offset, hex, str) tuples
"""
for i in range(0, len(s), 16):
- offset = "{:0=10x}".format(i).encode()
+ offset = "{:0=10x}".format(i)
part = s[i:i + 16]
x = " ".join("{:0=2x}".format(i) for i in six.iterbytes(part))
x = x.ljust(47) # 16*2 + 15