diff options
author | Maximilian Hils <git@maximilianhils.com> | 2016-02-15 14:58:46 +0100 |
---|---|---|
committer | Maximilian Hils <git@maximilianhils.com> | 2016-02-15 14:58:46 +0100 |
commit | 33fa49277a821b9d38e8c9bf0bcf2adcfa2f6f04 (patch) | |
tree | 31914a601302579ff817504019296fd7e9e46765 /libmproxy/contrib/tls/utils.py | |
parent | 36f34f701991b5d474c005ec45e3b66e20f326a8 (diff) | |
download | mitmproxy-33fa49277a821b9d38e8c9bf0bcf2adcfa2f6f04.tar.gz mitmproxy-33fa49277a821b9d38e8c9bf0bcf2adcfa2f6f04.tar.bz2 mitmproxy-33fa49277a821b9d38e8c9bf0bcf2adcfa2f6f04.zip |
move mitmproxy
Diffstat (limited to 'libmproxy/contrib/tls/utils.py')
-rw-r--r-- | libmproxy/contrib/tls/utils.py | 26 |
1 files changed, 0 insertions, 26 deletions
diff --git a/libmproxy/contrib/tls/utils.py b/libmproxy/contrib/tls/utils.py deleted file mode 100644 index 4c917303..00000000 --- a/libmproxy/contrib/tls/utils.py +++ /dev/null @@ -1,26 +0,0 @@ -# This file is dual licensed under the terms of the Apache License, Version -# 2.0, and the BSD License. See the LICENSE file in the root of this repository -# for complete details. - -from __future__ import absolute_import, division, print_function - -import construct - -import six - - -class _UBInt24(construct.Adapter): - def _encode(self, obj, context): - return ( - six.int2byte((obj & 0xFF0000) >> 16) + - six.int2byte((obj & 0x00FF00) >> 8) + - six.int2byte(obj & 0x0000FF) - ) - - def _decode(self, obj, context): - obj = bytearray(obj) - return (obj[0] << 16 | obj[1] << 8 | obj[2]) - - -def UBInt24(name): # noqa - return _UBInt24(construct.Bytes(name, 3)) |