Ejemplo n.º 1
0
 def __init__(self, **kwargs):
     Protocol.__init__(self, **kwargs)
     self.fields = [
         UInt8EnumField(
             "type", None, {
                 0: "hello_request",
                 1: "client_hello",
                 2: "server_hello",
                 3: "hello_verify_request",
                 11: "certificate",
                 12: "server_key_exchange",
                 13: "certificate_request",
                 14: "server_hello_done",
                 15: "certificate_verify",
                 16: "client_key_exchange",
                 20: "finished",
                 255: None
             }),
         UInt24Field("length", 0),
         UInt16Field("message_seq", 0),
         UInt24Field("fragment_offset", 0),
         UInt24Field("fragment_length", 0)
     ]
     self.payload_identifier_field = "type"
     self.payload_length_field = "length"
     self.payload_fragment_length_field = "fragment_length"
     self.payload_fragment_offset_field = "fragment_offset"
Ejemplo n.º 2
0
 def __init__(self, **kwargs):
     Protocol.__init__(self, **kwargs)
     self.fields = [
         UInt8EnumField("type", None, {
             1: "change_cipher_spec",
             255: None
         }),
     ]
Ejemplo n.º 3
0
 def __init__(self, **kwargs):
     Protocol.__init__(self, **kwargs)
     self.fields = [
         UInt8EnumField(
             "level",
             None,
             {
                 1: "warning",
                 2: "fatal",
                 255: None
             }
         ),
         UInt8EnumField(
             "description",
             None,
             {
                 0: "close_notify",
                 10: "unexpected_message",
                 20: "bad_record_mac",
                 21: "decryption_failed_RESERVED",
                 22: "record_overflow",
                 30: "decompression_failure",
                 40: "handshake_failure",
                 41: "no_certificate_RESERVED",
                 42: "bad_certificate",
                 43: "unsupported_certificate",
                 44: "certificate_revoked",
                 45: "certificate_expired",
                 46: "certificate_unknown",
                 47: "illegal_parameter",
                 48: "unknown_ca",
                 49: "access_denied",
                 50: "decode_error",
                 51: "decrypt_error",
                 60: "export_restriction_RESERVED",
                 70: "protocol_version",
                 71: "insufficient_security",
                 80: "user_canceled",
                 90: "user_canceled",
                 100: "no_renegotiation",
                 110: "unsupported_extension",
                 255: None
             }
         ),
     ]
Ejemplo n.º 4
0
 def __init__(self, **kwargs):
     Protocol.__init__(self, **kwargs)
     self.fields = [
         UInt8EnumField(
             "mode",
             None,
             {
                 1: "peer_allowed_to_send",
                 2: "peer_not_allowed_to_send",
                 255: None
             }
         ),
     ]
Ejemplo n.º 5
0
 def __init__(self, **kwargs):
     Protocol.__init__(self, **kwargs)
     self.fields = [
         UInt8EnumField(
             "content_type", None, {
                 20: "change_cipher_spec",
                 21: "alert",
                 22: "handshake",
                 23: "application_data",
                 255: None
             }),
         VersionField("version"),
         UInt16Field("length", 0),
     ]
     self.payload_identifier_field = "content_type"
     self.payload_length_field = "length"
Ejemplo n.º 6
0
 def __init__(self, **kwargs):
     Protocol.__init__(self, **kwargs)
     self.fields = [
         UInt8EnumField(
             "type",
             None,
             {
                 1: "request",
                 2: "response",
                 255: None
             }
         ),
         UInt16Field("payload_length", 0)
     ]
     self.padding = b""
     self.payload_length_field = "payload_length"
     self.payload_identifier_field = False