aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorThomas Kriechbaumer <Kriechi@users.noreply.github.com>2017-06-25 09:18:45 +0200
committerGitHub <noreply@github.com>2017-06-25 09:18:45 +0200
commit646f26b0e288109f0c975d616a242d17442792eb (patch)
tree7bddf87537e8ed974da066d193bd0479488fa973
parent13dac9f2129bc0b320d023f337aa3f2b47903be9 (diff)
parent3bccc2b8c6320606c2e49b1ccc6021af252638c6 (diff)
downloadmitmproxy-646f26b0e288109f0c975d616a242d17442792eb.tar.gz
mitmproxy-646f26b0e288109f0c975d616a242d17442792eb.tar.bz2
mitmproxy-646f26b0e288109f0c975d616a242d17442792eb.zip
Merge pull request #2412 from ujjwal96/ip-formatting
Few ip formatting fixes
-rw-r--r--mitmproxy/addons/dumper.py10
1 files changed, 5 insertions, 5 deletions
diff --git a/mitmproxy/addons/dumper.py b/mitmproxy/addons/dumper.py
index 3c3e1c65..54526d5b 100644
--- a/mitmproxy/addons/dumper.py
+++ b/mitmproxy/addons/dumper.py
@@ -174,7 +174,7 @@ class Dumper:
# This aligns the HTTP response code with the HTTP request method:
# 127.0.0.1:59519: GET http://example.com/
# << 304 Not Modified 0b
- arrows = " " * (len(repr(flow.client_conn.address)) - 2) + arrows
+ arrows = " " * (len(human.format_address(flow.client_conn.address)) - 2) + arrows
line = "{replay}{arrows} {code} {reason} {size}".format(
replay=replay,
@@ -224,7 +224,7 @@ class Dumper:
def websocket_error(self, f):
self.echo(
"Error in WebSocket connection to {}: {}".format(
- repr(f.server_conn.address), f.error
+ human.format_address(f.server_conn.address), f.error
),
fg="red"
)
@@ -247,7 +247,7 @@ class Dumper:
def tcp_error(self, f):
self.echo(
"Error in TCP connection to {}: {}".format(
- repr(f.server_conn.address), f.error
+ human.format_address(f.server_conn.address), f.error
),
fg="red"
)
@@ -257,8 +257,8 @@ class Dumper:
message = f.messages[-1]
direction = "->" if message.from_client else "<-"
self.echo("{client} {direction} tcp {direction} {server}".format(
- client=repr(f.client_conn.address),
- server=repr(f.server_conn.address),
+ client=human.format_address(f.client_conn.address),
+ server=human.format_address(f.server_conn.address),
direction=direction,
))
if ctx.options.flow_detail >= 3: