scapy.layers.tls.extensions

TLS handshake extensions.

class scapy.layers.tls.extensions.OCSPStatusRequest(_pkt, /, *, respidlen=None, respid=[], reqextlen=None, reqext=b'')[源代码]

基类:Packet

This is the structure defined in RFC 6066, not in RFC 6960!

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           RESPIDLEN           |             RESPID            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           REQEXTLEN           |             REQEXT            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Fig. OCSPStatusRequest                      
OCSPStatusRequest fields

respidlen

FieldLenField

None

respid

PacketListField

[]

reqextlen

FieldLenField

None

reqext

PacketField

b''

guess_payload_class(p)[源代码]
class scapy.layers.tls.extensions.ProtocolListField(name: str, default: Optional[List[BasePacket]], pkt_cls: Optional[Union[Callable[[bytes], Packet], Type[Packet]]]  # noqa: E501 = None, count_from: Optional[Callable[[Packet], int]] = None, length_from: Optional[Callable[[Packet], int]] = None, next_cls_cb: Optional[Callable[[Packet, List[BasePacket], Optional[Packet], bytes], Type[Packet]]]  # noqa: E501 = None, max_count: Optional[int] = None)[源代码]

基类:PacketListField

i2repr(pkt, x)[源代码]
class scapy.layers.tls.extensions.ProtocolName(_pkt, /, *, len=None, protocol=b'')[源代码]

基类:Packet

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      LEN      |            PROTOCOL           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                        Fig. ProtocolName                         
ProtocolName fields

len

FieldLenField

None

protocol

StrLenField

b''

guess_payload_class(p)[源代码]
class scapy.layers.tls.extensions.ResponderID(_pkt, /, *, respidlen=None, respid=b'')[源代码]

基类:Packet

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           RESPIDLEN           |             RESPID            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                         Fig. ResponderID                         
ResponderID fields

respidlen

FieldLenField

None

respid

StrLenField

b''

guess_payload_class(p)[源代码]
class scapy.layers.tls.extensions.ServerLenField(name: str, default: Optional[Any], length_of: Optional[str] = None, fmt: str = 'H', count_of: Optional[str] = None, adjust: Callable[[Packet, int], int] = <function FieldLenField.<lambda>>)[源代码]

基类:FieldLenField

There is no length when there are no servernames (as in a ServerHello).

addfield(pkt, s, val)[源代码]
class scapy.layers.tls.extensions.ServerListField(name: str, default: Optional[List[BasePacket]], pkt_cls: Optional[Union[Callable[[bytes], Packet], Type[Packet]]]  # noqa: E501 = None, count_from: Optional[Callable[[Packet], int]] = None, length_from: Optional[Callable[[Packet], int]] = None, next_cls_cb: Optional[Callable[[Packet, List[BasePacket], Optional[Packet], bytes], Type[Packet]]]  # noqa: E501 = None, max_count: Optional[int] = None)[源代码]

基类:PacketListField

i2repr(pkt, x)[源代码]
class scapy.layers.tls.extensions.ServerName(_pkt, /, *, nametype=0, namelen=None, servername=b'')[源代码]

基类:Packet

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    NAMETYPE   |            NAMELEN            |   SERVERNAME  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |
+-+-+-+-+-+-+-+-+

                         Fig. ServerName                          
ServerName fields

nametype

ByteEnumField

0

namelen

FieldLenField

None

servername

StrLenField

b''

guess_payload_class(p)[源代码]
class scapy.layers.tls.extensions.TACertSHA1Hash(_pkt, /, *, idtype=3, id=None)[源代码]

基类:Packet

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     IDTYPE    |                       ID                      |
+-+-+-+-+-+-+-+-+                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |
+-+-+-+-+-+-+-+-+

                       Fig. TACertSHA1Hash                        
TACertSHA1Hash fields

idtype

ByteEnumField

3

id

StrFixedLenField

None

guess_payload_class(p)[源代码]
class scapy.layers.tls.extensions.TAKeySHA1Hash(_pkt, /, *, idtype=1, id=None)[源代码]

基类:Packet

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     IDTYPE    |                       ID                      |
+-+-+-+-+-+-+-+-+                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+               +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |
+-+-+-+-+-+-+-+-+

                        Fig. TAKeySHA1Hash                        
TAKeySHA1Hash fields

idtype

ByteEnumField

1

id

StrFixedLenField

None

guess_payload_class(p)[源代码]
class scapy.layers.tls.extensions.TAPreAgreed(_pkt, /, *, idtype=0)[源代码]

基类:Packet

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     IDTYPE    |
+-+-+-+-+-+-+-+-+

                         Fig. TAPreAgreed                         
TAPreAgreed fields

idtype

ByteEnumField

0

guess_payload_class(p)[源代码]
class scapy.layers.tls.extensions.TAX509Name(_pkt, /, *, idtype=2, dnlen=None, dn=b'')[源代码]

基类:Packet

XXX Section 3.4 of RFC 4366. Implement a more specific DNField rather than current StrLenField.

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     IDTYPE    |             DNLEN             |       DN      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |
+-+-+-+-+-+-+-+-+

                         Fig. TAX509Name                          
TAX509Name fields

idtype

ByteEnumField

2

dnlen

FieldLenField

None

dn

StrLenField

b''

guess_payload_class(p)[源代码]
class scapy.layers.tls.extensions.TLS_Ext_ALPN(_pkt, /, *, type=16, len=None, protocolslen=None, protocols=[])[源代码]

基类:TLS_Ext_PrettyPacketList

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              TYPE             |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          PROTOCOLSLEN         |           PROTOCOLS           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                        Fig. TLS_Ext_ALPN                         
TLS_Ext_ALPN fields

type

ShortEnumField

16

len

MayEnd

None

protocolslen

FieldLenField

None

protocols

ProtocolListField

[]

class scapy.layers.tls.extensions.TLS_Ext_CSR(_pkt, /, *, type=5, len=None, stype=None, req=[])[源代码]

基类:TLS_Ext_Unknown

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              TYPE             |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     STYPE     |              REQ              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                         Fig. TLS_Ext_CSR                         
TLS_Ext_CSR fields

type

ShortEnumField

5

len

MayEnd

None

stype

ByteEnumField

None

req

_StatusReqField

[]

class scapy.layers.tls.extensions.TLS_Ext_ClientAuthz(_pkt, /, *, type=7, len=None)[源代码]

基类:TLS_Ext_Unknown

XXX Unsupported

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              TYPE             |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                     Fig. TLS_Ext_ClientAuthz                     
TLS_Ext_ClientAuthz fields

type

ShortEnumField

7

len

MayEnd

None

class scapy.layers.tls.extensions.TLS_Ext_ClientCertType(_pkt, /, *, type=9, len=None, ctypeslen=None, ctypes=[0, 1])[源代码]

基类:TLS_Ext_Unknown

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              TYPE             |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           CTYPESLEN           |             CTYPES            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                   Fig. TLS_Ext_ClientCertType                    
TLS_Ext_ClientCertType fields

type

ShortEnumField

9

len

MayEnd

None

ctypeslen

FieldLenField

None

ctypes

FieldListField

[0, 1]

class scapy.layers.tls.extensions.TLS_Ext_ClientCertURL(_pkt, /, *, type=2, len=None)[源代码]

基类:TLS_Ext_Unknown

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              TYPE             |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                    Fig. TLS_Ext_ClientCertURL                    
TLS_Ext_ClientCertURL fields

type

ShortEnumField

2

len

MayEnd

None

基类:TLS_Ext_Unknown

aliastypes
build()[源代码]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              TYPE             |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           COOKIELEN           |             COOKIE            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                       Fig. TLS_Ext_Cookie                        
TLS_Ext_Cookie fields

type

ShortEnumField

44

len

MayEnd

None

cookielen

FieldLenField

None

cookie

XStrLenField

b''

class scapy.layers.tls.extensions.TLS_Ext_EarlyDataIndication(_pkt, /, *, type=42, len=None)[源代码]

基类:TLS_Ext_Unknown

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              TYPE             |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                 Fig. TLS_Ext_EarlyDataIndication                 
TLS_Ext_EarlyDataIndication fields

type

ShortEnumField

42

len

MayEnd

None

class scapy.layers.tls.extensions.TLS_Ext_EarlyDataIndicationTicket(_pkt, /, *, type=42, len=None, max_early_data_size=0)[源代码]

基类:TLS_Ext_Unknown

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              TYPE             |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                      MAX EARLY DATA SIZE                      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

              Fig. TLS_Ext_EarlyDataIndicationTicket              
TLS_Ext_EarlyDataIndicationTicket fields

type

ShortEnumField

42

len

MayEnd

None

max_early_data_size

IntField

0

class scapy.layers.tls.extensions.TLS_Ext_EncryptThenMAC(_pkt, /, *, type=22, len=None)[源代码]

基类:TLS_Ext_Unknown

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              TYPE             |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                   Fig. TLS_Ext_EncryptThenMAC                    
TLS_Ext_EncryptThenMAC fields

type

ShortEnumField

22

len

MayEnd

None

class scapy.layers.tls.extensions.TLS_Ext_EncryptedServerName(_pkt, /, *, type=65486, len=None, cipher=None, key_exchange_group=None, key_exchange_len=None, key_exchange=b'', record_digest_len=None, record_digest=b'', encrypted_sni_len=None, encrypted_sni=b'')[源代码]

基类:TLS_Ext_PrettyPacketList

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              TYPE             |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             CIPHER            |       KEY EXCHANGE GROUP      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|        KEY EXCHANGE LEN       |          KEY EXCHANGE         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       RECORD DIGEST LEN       |         RECORD DIGEST         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       ENCRYPTED SNI LEN       |         ENCRYPTED SNI         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                 Fig. TLS_Ext_EncryptedServerName                 
TLS_Ext_EncryptedServerName fields

type

ShortEnumField

65486

len

MayEnd

None

cipher

EnumField

None

key_exchange_group

ShortEnumField

None

key_exchange_len

FieldLenField

None

key_exchange

XStrLenField

b''

record_digest_len

FieldLenField

None

record_digest

XStrLenField

b''

encrypted_sni_len

FieldLenField

None

encrypted_sni

XStrLenField

b''

class scapy.layers.tls.extensions.TLS_Ext_ExtendedMasterSecret(_pkt, /, *, type=23, len=None)[源代码]

基类:TLS_Ext_Unknown

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              TYPE             |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                Fig. TLS_Ext_ExtendedMasterSecret                 
TLS_Ext_ExtendedMasterSecret fields

type

ShortEnumField

23

len

MayEnd

None

class scapy.layers.tls.extensions.TLS_Ext_Heartbeat(_pkt, /, *, type=15, len=None, heartbeat_mode=2)[源代码]

基类:TLS_Ext_Unknown

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              TYPE             |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| HEARTBEAT MODE|
+-+-+-+-+-+-+-+-+

                      Fig. TLS_Ext_Heartbeat                      
TLS_Ext_Heartbeat fields

type

ShortEnumField

15

len

MayEnd

None

heartbeat_mode

ByteEnumField

2

class scapy.layers.tls.extensions.TLS_Ext_KeyShare(_pkt, /, *, type=51, len=None)[源代码]

基类:TLS_Ext_Unknown

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              TYPE             |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Fig. TLS_Ext_KeyShare                       
TLS_Ext_KeyShare fields

type

ShortEnumField

51

len

MayEnd

None

class scapy.layers.tls.extensions.TLS_Ext_MaxFragLen(_pkt, /, *, type=1, len=None, maxfraglen=4)[源代码]

基类:TLS_Ext_Unknown

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              TYPE             |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   MAXFRAGLEN  |
+-+-+-+-+-+-+-+-+

                     Fig. TLS_Ext_MaxFragLen                      
TLS_Ext_MaxFragLen fields

type

ShortEnumField

1

len

MayEnd

None

maxfraglen

ByteEnumField

4

class scapy.layers.tls.extensions.TLS_Ext_NPN(_pkt, /, *, type=13172, len=None, protocols=[])[源代码]

基类:TLS_Ext_PrettyPacketList

Defined in RFC-draft-agl-tls-nextprotoneg-03. Deprecated in favour of ALPN.

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              TYPE             |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           PROTOCOLS           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                         Fig. TLS_Ext_NPN                         
TLS_Ext_NPN fields

type

ShortEnumField

13172

len

FieldLenField

None

protocols

ProtocolListField

[]

class scapy.layers.tls.extensions.TLS_Ext_PSKKeyExchangeModes(_pkt, /, *, type=45, len=None, kxmodeslen=None, kxmodes=[])[源代码]

基类:TLS_Ext_Unknown

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              TYPE             |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   KXMODESLEN  |            KXMODES            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                 Fig. TLS_Ext_PSKKeyExchangeModes                 
TLS_Ext_PSKKeyExchangeModes fields

type

ShortEnumField

45

len

MayEnd

None

kxmodeslen

FieldLenField

None

kxmodes

FieldListField

[]

class scapy.layers.tls.extensions.TLS_Ext_Padding(_pkt, /, *, type=21, len=None, padding=b'')[源代码]

基类:TLS_Ext_Unknown

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              TYPE             |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            PADDING            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                       Fig. TLS_Ext_Padding                       
TLS_Ext_Padding fields

type

ShortEnumField

21

len

FieldLenField

None

padding

StrLenField

b''

class scapy.layers.tls.extensions.TLS_Ext_PostHandshakeAuth(_pkt, /, *, type=49, len=None)[源代码]

基类:TLS_Ext_Unknown

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              TYPE             |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                  Fig. TLS_Ext_PostHandshakeAuth                  
TLS_Ext_PostHandshakeAuth fields

type

ShortEnumField

49

len

MayEnd

None

class scapy.layers.tls.extensions.TLS_Ext_PreSharedKey(_pkt, /, *, type=41, len=None)[源代码]

基类:TLS_Ext_Unknown

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              TYPE             |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                    Fig. TLS_Ext_PreSharedKey                     
TLS_Ext_PreSharedKey fields

type

ShortEnumField

41

len

MayEnd

None

class scapy.layers.tls.extensions.TLS_Ext_PrettyPacketList(_pkt, /, *, type=None, len=None, val=b'')[源代码]

基类:TLS_Ext_Unknown

Dummy extension used for server_name/ALPN/NPN for a lighter representation: the final field is showed as a 1-line list rather than as lots of packets. XXX Define a new condition for packet lists in Packet._show_or_dump?

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              TYPE             |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              VAL              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                  Fig. TLS_Ext_PrettyPacketList                   
TLS_Ext_PrettyPacketList fields

type

ShortEnumField

None

len

FieldLenField

None

val

StrLenField

b''

class scapy.layers.tls.extensions.TLS_Ext_RecordSizeLimit(_pkt, /, *, type=28, len=None, record_size_limit=None)[源代码]

基类:TLS_Ext_Unknown

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              TYPE             |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|       RECORD SIZE LIMIT       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                   Fig. TLS_Ext_RecordSizeLimit                   
TLS_Ext_RecordSizeLimit fields

type

ShortEnumField

28

len

MayEnd

None

record_size_limit

ShortField

None

class scapy.layers.tls.extensions.TLS_Ext_RenegotiationInfo(_pkt, /, *, type=65281, len=None, reneg_conn_len=None, renegotiated_connection=b'')[源代码]

基类:TLS_Ext_Unknown

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              TYPE             |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| RENEG CONN LEN|    RENEGOTIATED CONNECTION    |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                  Fig. TLS_Ext_RenegotiationInfo                  
TLS_Ext_RenegotiationInfo fields

type

ShortEnumField

65281

len

MayEnd

None

reneg_conn_len

FieldLenField

None

renegotiated_connection

StrLenField

b''

class scapy.layers.tls.extensions.TLS_Ext_ServerAuthz(_pkt, /, *, type=8, len=None)[源代码]

基类:TLS_Ext_Unknown

XXX Unsupported

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              TYPE             |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                     Fig. TLS_Ext_ServerAuthz                     
TLS_Ext_ServerAuthz fields

type

ShortEnumField

8

len

MayEnd

None

class scapy.layers.tls.extensions.TLS_Ext_ServerCertType(_pkt, /, *, type=9, len=None, ctype=None)[源代码]

基类:TLS_Ext_Unknown

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              TYPE             |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     CTYPE     |
+-+-+-+-+-+-+-+-+

                   Fig. TLS_Ext_ServerCertType                    
TLS_Ext_ServerCertType fields

type

ShortEnumField

9

len

MayEnd

None

ctype

ByteEnumField

None

class scapy.layers.tls.extensions.TLS_Ext_ServerName(_pkt, /, *, type=0, len=None, servernameslen=None, servernames=[])[源代码]

基类:TLS_Ext_PrettyPacketList

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              TYPE             |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|         SERVERNAMESLEN        |          SERVERNAMES          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                     Fig. TLS_Ext_ServerName                      
TLS_Ext_ServerName fields

type

ShortEnumField

0

len

MayEnd

None

servernameslen

ServerLenField

None

servernames

ServerListField

[]

class scapy.layers.tls.extensions.TLS_Ext_SessionTicket(_pkt, /, *, type=35, len=None, ticket=b'')[源代码]

基类:TLS_Ext_Unknown

RFC 5077 updates RFC 4507 according to most implementations, which do not use another (useless) 'ticketlen' field after the global 'len' field.

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              TYPE             |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             TICKET            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                    Fig. TLS_Ext_SessionTicket                    
TLS_Ext_SessionTicket fields

type

ShortEnumField

35

len

FieldLenField

None

ticket

StrLenField

b''

class scapy.layers.tls.extensions.TLS_Ext_SignatureAlgorithms(_pkt, /, *, type=13, len=None, sig_algs_len=None, sig_algs=[])[源代码]

基类:TLS_Ext_Unknown

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              TYPE             |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          SIG ALGS LEN         |            SIG ALGS           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                 Fig. TLS_Ext_SignatureAlgorithms                 
TLS_Ext_SignatureAlgorithms fields

type

ShortEnumField

13

len

MayEnd

None

sig_algs_len

SigAndHashAlgsLenField

None

sig_algs

SigAndHashAlgsField

[]

class scapy.layers.tls.extensions.TLS_Ext_SignatureAlgorithmsCert(_pkt, /, *, type=50, len=None, sig_algs_len=None, sig_algs=[])[源代码]

基类:TLS_Ext_Unknown

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              TYPE             |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          SIG ALGS LEN         |            SIG ALGS           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

               Fig. TLS_Ext_SignatureAlgorithmsCert               
TLS_Ext_SignatureAlgorithmsCert fields

type

ShortEnumField

50

len

MayEnd

None

sig_algs_len

SigAndHashAlgsLenField

None

sig_algs

SigAndHashAlgsField

[]

class scapy.layers.tls.extensions.TLS_Ext_SupportedEllipticCurves(_pkt, /, *, type=10, len=None, groupslen=None, groups=[])[源代码]

基类:TLS_Ext_SupportedGroups

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              TYPE             |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           GROUPSLEN           |             GROUPS            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

               Fig. TLS_Ext_SupportedEllipticCurves               
TLS_Ext_SupportedEllipticCurves fields

type

ShortEnumField

10

len

MayEnd

None

groupslen

FieldLenField

None

groups

FieldListField

[]

class scapy.layers.tls.extensions.TLS_Ext_SupportedGroups(_pkt, /, *, type=10, len=None, groupslen=None, groups=[])[源代码]

基类:TLS_Ext_Unknown

This extension was known as 'Supported Elliptic Curves' before TLS 1.3 merged both group selection mechanisms for ECDH and FFDH.

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              TYPE             |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           GROUPSLEN           |             GROUPS            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                   Fig. TLS_Ext_SupportedGroups                   
TLS_Ext_SupportedGroups fields

type

ShortEnumField

10

len

MayEnd

None

groupslen

FieldLenField

None

groups

FieldListField

[]

class scapy.layers.tls.extensions.TLS_Ext_SupportedPointFormat(_pkt, /, *, type=11, len=None, ecpllen=None, ecpl=[0])[源代码]

基类:TLS_Ext_Unknown

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              TYPE             |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    ECPLLEN    |              ECPL             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                Fig. TLS_Ext_SupportedPointFormat                 
TLS_Ext_SupportedPointFormat fields

type

ShortEnumField

11

len

MayEnd

None

ecpllen

FieldLenField

None

ecpl

FieldListField

[0]

class scapy.layers.tls.extensions.TLS_Ext_SupportedVersion_CH(_pkt, /, *, type=43, len=None, versionslen=None, versions=[])[源代码]

基类:TLS_Ext_Unknown

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              TYPE             |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  VERSIONSLEN  |            VERSIONS           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                 Fig. TLS_Ext_SupportedVersion_CH                 
TLS_Ext_SupportedVersion_CH fields

type

ShortEnumField

43

len

MayEnd

None

versionslen

FieldLenField

None

versions

FieldListField

[]

class scapy.layers.tls.extensions.TLS_Ext_SupportedVersion_SH(_pkt, /, *, type=43, len=None, version=None)[源代码]

基类:TLS_Ext_Unknown

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              TYPE             |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            VERSION            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                 Fig. TLS_Ext_SupportedVersion_SH                 
TLS_Ext_SupportedVersion_SH fields

type

ShortEnumField

43

len

MayEnd

None

version

ShortEnumField

None

class scapy.layers.tls.extensions.TLS_Ext_SupportedVersions(_pkt, /, *, type=43, len=None)[源代码]

基类:TLS_Ext_Unknown

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              TYPE             |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                  Fig. TLS_Ext_SupportedVersions                  
TLS_Ext_SupportedVersions fields

type

ShortEnumField

43

len

MayEnd

None

class scapy.layers.tls.extensions.TLS_Ext_TicketEarlyDataInfo(_pkt, /, *, type=46, len=None, max_early_data_size=0)[源代码]

基类:TLS_Ext_Unknown

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              TYPE             |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                      MAX EARLY DATA SIZE                      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                 Fig. TLS_Ext_TicketEarlyDataInfo                 
TLS_Ext_TicketEarlyDataInfo fields

type

ShortEnumField

46

len

MayEnd

None

max_early_data_size

IntField

0

class scapy.layers.tls.extensions.TLS_Ext_TruncatedHMAC(_pkt, /, *, type=4, len=None)[源代码]

基类:TLS_Ext_Unknown

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              TYPE             |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                    Fig. TLS_Ext_TruncatedHMAC                    
TLS_Ext_TruncatedHMAC fields

type

ShortEnumField

4

len

MayEnd

None

class scapy.layers.tls.extensions.TLS_Ext_TrustedCAInd(_pkt, /, *, type=3, len=None, talen=None, ta=[])[源代码]

基类:TLS_Ext_Unknown

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              TYPE             |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             TALEN             |               TA              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                    Fig. TLS_Ext_TrustedCAInd                     
TLS_Ext_TrustedCAInd fields

type

ShortEnumField

3

len

MayEnd

None

talen

FieldLenField

None

ta

_TAListField

[]

class scapy.layers.tls.extensions.TLS_Ext_Unknown(_pkt, /, *, type=None, len=None, val=b'')[源代码]

基类:_GenericTLSSessionInheritance

We put this here rather than in extensions.py in order to avoid circular imports...

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              TYPE             |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              VAL              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                       Fig. TLS_Ext_Unknown                       
TLS_Ext_Unknown fields

type

ShortEnumField

None

len

FieldLenField

None

val

StrLenField

b''

post_build(p, pay)[源代码]
class scapy.layers.tls.extensions.TLS_Ext_UserMapping(_pkt, /, *, type=6, len=None, umlen=None, um=[])[源代码]

基类:TLS_Ext_Unknown

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              TYPE             |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     UMLEN     |               UM              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                     Fig. TLS_Ext_UserMapping                     
TLS_Ext_UserMapping fields

type

ShortEnumField

6

len

MayEnd

None

umlen

FieldLenField

None

um

FieldListField

[]