diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2016-06-02 12:31:41 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2016-06-02 12:31:41 +1200 |
commit | cccdc9842648518de7ee48ce461801954fc334c8 (patch) | |
tree | 288941673dc0db7ffe96be55ae2c34a1ce5db916 /examples | |
parent | eaa3b308f7bb48256ccf56ea07d008fa5f9dd6ad (diff) | |
download | mitmproxy-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.py | 4 |
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))) |