This commit is contained in:
Maximilian Hils 2015-11-27 21:20:00 +01:00
parent 6b92497d4f
commit 43ed82062f
2 changed files with 3 additions and 3 deletions

View File

@ -5,7 +5,7 @@
from __future__ import absolute_import, division, print_function from __future__ import absolute_import, division, print_function
from construct import (Array, Bytes, Struct, UBInt16, UBInt32, UBInt8, PascalString, Embed, TunnelAdapter, GreedyRange, from construct import (Array, Bytes, Struct, UBInt16, UBInt32, UBInt8, PascalString, Embed, TunnelAdapter, GreedyRange,
Switch, OptionalGreedyRange) Switch, OptionalGreedyRange, Optional)
from .utils import UBInt24 from .utils import UBInt24
@ -112,7 +112,7 @@ Extension = Struct(
) )
extensions = TunnelAdapter( extensions = TunnelAdapter(
PascalString("extensions", length_field=UBInt16("extensions_length")), Optional(PascalString("extensions", length_field=UBInt16("extensions_length"))),
OptionalGreedyRange(Extension) OptionalGreedyRange(Extension)
) )

View File

@ -318,7 +318,7 @@ class TlsLayer(Layer):
client_hello = ClientHello.parse(raw_client_hello) client_hello = ClientHello.parse(raw_client_hello)
except ConstructError as e: except ConstructError as e:
self.log("Cannot parse Client Hello: %s" % repr(e), "error") self.log("Cannot parse Client Hello: %s" % repr(e), "error")
self.log("Raw Client Hello:\r\n:%s" % raw_client_hello.encode("hex"), "debug") self.log("Raw Client Hello: %s" % raw_client_hello.encode("hex"), "debug")
return return
self.client_ciphers = client_hello.cipher_suites.cipher_suites self.client_ciphers = client_hello.cipher_suites.cipher_suites