diff options
author | Chandler Abraham <cabraham@twitter.com> | 2015-04-09 19:35:40 -0700 |
---|---|---|
committer | Chandler Abraham <cabraham@twitter.com> | 2015-04-10 18:37:41 -0700 |
commit | e41e5cbfdd7b778e6f68e86658e95f9e413133cb (patch) | |
tree | d12b4e3c2e834f2d5efd0ec9c85dee159f508123 /netlib/utils.py | |
parent | e58f76aec1db9cc784a3b73c3050d010bb084968 (diff) | |
download | mitmproxy-e41e5cbfdd7b778e6f68e86658e95f9e413133cb.tar.gz mitmproxy-e41e5cbfdd7b778e6f68e86658e95f9e413133cb.tar.bz2 mitmproxy-e41e5cbfdd7b778e6f68e86658e95f9e413133cb.zip |
netlib websockets
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): """ |