diff options
author | Aldo Cortesi <aldo@nullcube.com> | 2015-04-17 13:46:51 +1200 |
---|---|---|
committer | Aldo Cortesi <aldo@nullcube.com> | 2015-04-17 13:46:51 +1200 |
commit | 3bbafa24bd4b78452e72ae6cc2bb17521d3903fe (patch) | |
tree | 66c44cdefea4ce7e4c93197cbd23f67c11ea79b3 /netlib/utils.py | |
parent | c53d89fd7fad6c46458ab3d0140528e344de605f (diff) | |
parent | 2d72a1b6b56f1643cd1d8be59eee55aa7ca2f17f (diff) | |
download | mitmproxy-3bbafa24bd4b78452e72ae6cc2bb17521d3903fe.tar.gz mitmproxy-3bbafa24bd4b78452e72ae6cc2bb17521d3903fe.tar.bz2 mitmproxy-3bbafa24bd4b78452e72ae6cc2bb17521d3903fe.zip |
Merge pull request #54 from Chandler/websockets
Netlib WebSockets take 1
Diffstat (limited to 'netlib/utils.py')
-rw-r--r-- | netlib/utils.py | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/netlib/utils.py b/netlib/utils.py index 79077ac6..03a70977 100644 --- a/netlib/utils.py +++ b/netlib/utils.py @@ -8,6 +8,9 @@ def isascii(s): return False return True +# best way to do it in python 2.x +def bytes_to_int(i): + return int(i.encode('hex'), 16) def cleanBin(s, fixspacing=False): """ |