From 9c5bebae9e7439186b97a23506e9a5dbb0c06628 Mon Sep 17 00:00:00 2001 From: Maximilian Hils Date: Sat, 25 Dec 2021 12:28:52 +0100 Subject: [PATCH] better expose raw ClientHello bytes, fix #4877 --- mitmproxy/tls.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/mitmproxy/tls.py b/mitmproxy/tls.py index 31b607107..168db6830 100644 --- a/mitmproxy/tls.py +++ b/mitmproxy/tls.py @@ -16,8 +16,12 @@ class ClientHello: A TLS ClientHello is the first message sent by the client when initiating TLS. """ + raw_bytes: bytes + """The raw ClientHello bytes as seen on the wire""" + def __init__(self, raw_client_hello: bytes): """Create a TLS ClientHello object from raw bytes.""" + self.raw_bytes = raw_client_hello self._client_hello = tls_client_hello.TlsClientHello( KaitaiStream(io.BytesIO(raw_client_hello)) )