From 0a43cc88448e27b5e5fcf7f550d3618241820595 Mon Sep 17 00:00:00 2001 From: David Weinstein Date: Tue, 26 Jan 2016 09:33:03 -0500 Subject: add TlsClientHello repr --- libmproxy/protocol/tls.py | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'libmproxy/protocol') diff --git a/libmproxy/protocol/tls.py b/libmproxy/protocol/tls.py index 0955166f..07b9f353 100644 --- a/libmproxy/protocol/tls.py +++ b/libmproxy/protocol/tls.py @@ -291,6 +291,11 @@ class TlsClientHello(object): #self.log("Raw Client Hello: %s" % raw_client_hello.encode("hex"), "debug") raise TlsProtocolException('Cannot parse Client Hello: %s' % repr(e)) + def __repr__(self): + return "TlsClientHello( sni: %s alpn_protocols: %s, cipher_suites: %s)" % \ + (self.client_sni, self.client_alpn_protocols, self.client_cipher_suites) + + class TlsLayer(Layer): def __init__(self, ctx, client_tls, server_tls): self.client_sni = None -- cgit v1.2.3