aboutsummaryrefslogtreecommitdiffstats
path: root/examples
diff options
context:
space:
mode:
authorAldo Cortesi <aldo@nullcube.com>2016-06-02 12:31:41 +1200
committerAldo Cortesi <aldo@nullcube.com>2016-06-02 12:31:41 +1200
commitcccdc9842648518de7ee48ce461801954fc334c8 (patch)
tree288941673dc0db7ffe96be55ae2c34a1ce5db916 /examples
parenteaa3b308f7bb48256ccf56ea07d008fa5f9dd6ad (diff)
downloadmitmproxy-cccdc9842648518de7ee48ce461801954fc334c8.tar.gz
mitmproxy-cccdc9842648518de7ee48ce461801954fc334c8.tar.bz2
mitmproxy-cccdc9842648518de7ee48ce461801954fc334c8.zip
Utils reorganisation: add netlib.strutils
Extract a number of string and format-related functions to netlib.strutils.
Diffstat (limited to 'examples')
-rw-r--r--examples/tcp_message.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/examples/tcp_message.py b/examples/tcp_message.py
index 52471ae9..2c210618 100644
--- a/examples/tcp_message.py
+++ b/examples/tcp_message.py
@@ -8,7 +8,7 @@ tcp_message Inline Script Hook API Demonstration
example cmdline invocation:
mitmdump -T --host --tcp ".*" -q -s examples/tcp_message.py
'''
-from netlib.utils import clean_bin
+from netlib import strutils
def tcp_message(ctx, tcp_msg):
@@ -22,4 +22,4 @@ def tcp_message(ctx, tcp_msg):
"client" if tcp_msg.sender == tcp_msg.client_conn else "server",
tcp_msg.sender.address,
"server" if tcp_msg.receiver == tcp_msg.server_conn else "client",
- tcp_msg.receiver.address, clean_bin(tcp_msg.message)))
+ tcp_msg.receiver.address, strutils.clean_bin(tcp_msg.message)))