mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-23 00:01:36 +00:00
Include raw client hello in exception
This commit is contained in:
parent
7d69c3480b
commit
8f8c2efccd
@ -283,13 +283,13 @@ class TlsClientHello(object):
|
||||
try:
|
||||
raw_client_hello = get_client_hello(client_conn)[4:] # exclude handshake header.
|
||||
except ProtocolException as e:
|
||||
raise TlsProtocolException('Cannot parse Client Hello: %s' % repr(e))
|
||||
raise TlsProtocolException('Cannot read raw Client Hello: %s' % repr(e))
|
||||
|
||||
try:
|
||||
return cls(raw_client_hello)
|
||||
except ConstructError as e:
|
||||
#self.log("Raw Client Hello: %s" % raw_client_hello.encode("hex"), "debug")
|
||||
raise TlsProtocolException('Cannot parse Client Hello: %s' % repr(e))
|
||||
raise TlsProtocolException('Cannot parse Client Hello: %s, Raw Client Hello: %s' % \
|
||||
(repr(e), raw_client_hello.encode("hex")))
|
||||
|
||||
def __repr__(self):
|
||||
return "TlsClientHello( sni: %s alpn_protocols: %s, cipher_suites: %s)" % \
|
||||
|
Loading…
Reference in New Issue
Block a user