id
int64
0
328k
repository_name
stringlengths
7
58
file_path
stringlengths
9
302
class_name
stringlengths
5
256
human_written_code
stringlengths
16
2.16M
class_skeleton
stringlengths
18
1.49M
⌀
total_program_units
int64
1
1.76k
total_doc_str
int64
0
771
AvgCountLine
float64
0
7.89k
AvgCountLineBlank
float64
0
297
AvgCountLineCode
float64
0
7.89k
AvgCountLineComment
float64
0
7.89k
AvgCyclomatic
float64
0
130
CommentToCodeRatio
float64
0
168
CountClassBase
float64
0
40
CountClassCoupled
float64
0
583
CountClassCoupledModified
float64
0
575
CountClassDerived
float64
0
5.35k
CountDeclInstanceMethod
float64
0
529
CountDeclInstanceVariable
float64
0
296
CountDeclMethod
float64
0
599
CountDeclMethodAll
float64
0
1.12k
CountLine
float64
1
40.4k
CountLineBlank
float64
0
8.16k
CountLineCode
float64
1
25.7k
CountLineCodeDecl
float64
1
8.15k
CountLineCodeExe
float64
0
24.2k
CountLineComment
float64
0
16.5k
CountStmt
float64
1
9.71k
CountStmtDecl
float64
1
8.15k
CountStmtExe
float64
0
9.69k
MaxCyclomatic
float64
0
759
MaxInheritanceTree
float64
0
16
MaxNesting
float64
0
34
SumCyclomatic
float64
0
2.9k
30,100
secdev/scapy
secdev_scapy/scapy/layers/tls/handshake.py
scapy.layers.tls.handshake.TLSServerKeyExchange
from scapy.compat import hex_bytes, orb, raw from scapy.layers.tls.keyexchange import _TLSSignature, _TLSServerParamsField, _TLSSignatureField, ServerRSAParams, SigAndHashAlgsField, _tls_hash_sig, SigAndHashAlgsLenField from scapy.error import log_runtime, warning from scapy.config import conf from scapy.packet import ...
class TLSServerKeyExchange(_TLSHandshake): def build(self, *args, **kargs): ''' We overload build() method in order to provide a valid default value for params based on TLS session if not provided. This cannot be done by overriding i2m() because the method is called on a copy of th...
3
2
39
3
25
12
7
0.44
1
4
3
0
2
2
2
137
88
8
57
16
54
25
45
16
42
10
6
4
14
30,101
secdev/scapy
secdev_scapy/scapy/layers/tls/handshake.py
scapy.layers.tls.handshake.TLSSupplementalData
from scapy.fields import ByteEnumField, ByteField, Field, FieldLenField, IntField, PacketField, PacketLenField, PacketListField, ShortEnumField, ShortField, StrFixedLenField, StrLenField, ThreeBytesField, UTCTimeField class TLSSupplementalData(_TLSHandshake): name = 'TLS Handshake - Supplemental Data' fields_d...
class TLSSupplementalData(_TLSHandshake): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
135
7
0
7
3
6
0
3
3
2
0
6
0
0
30,102
secdev/scapy
secdev_scapy/scapy/layers/tls/handshake.py
scapy.layers.tls.handshake.ThreeBytesLenField
from scapy.fields import ByteEnumField, ByteField, Field, FieldLenField, IntField, PacketField, PacketLenField, PacketListField, ShortEnumField, ShortField, StrFixedLenField, StrLenField, ThreeBytesField, UTCTimeField import struct class ThreeBytesLenField(FieldLenField): def __init__(self, name, default, length_...
class ThreeBytesLenField(FieldLenField): def __init__(self, name, default, length_of=None, adjust=lambda pkt, x: x): pass def i2repr(self, pkt, x): pass def addfield(self, pkt, s, val): pass def getfield(self, pkt, s): pass
5
0
3
0
3
0
1
0.08
1
0
0
0
4
0
4
38
15
3
12
5
7
1
11
5
6
2
5
1
5
30,103
secdev/scapy
secdev_scapy/scapy/layers/tls/handshake.py
scapy.layers.tls.handshake.URLAndOptionalHash
from scapy.fields import ByteEnumField, ByteField, Field, FieldLenField, IntField, PacketField, PacketLenField, PacketListField, ShortEnumField, ShortField, StrFixedLenField, StrLenField, ThreeBytesField, UTCTimeField import math from scapy.packet import Packet, Raw, Padding class URLAndOptionalHash(Packet): name ...
class URLAndOptionalHash(Packet): def guess_payload_class(self, p): pass
2
0
2
0
2
0
1
0.08
1
2
1
0
1
0
1
120
13
1
12
4
10
1
5
4
3
1
4
0
1
30,104
secdev/scapy
secdev_scapy/scapy/layers/tls/handshake.py
scapy.layers.tls.handshake.UserMappingData
from scapy.fields import ByteEnumField, ByteField, Field, FieldLenField, IntField, PacketField, PacketLenField, PacketListField, ShortEnumField, ShortField, StrFixedLenField, StrLenField, ThreeBytesField, UTCTimeField from scapy.packet import Packet, Raw, Padding class UserMappingData(Packet): name = 'User Mapping...
class UserMappingData(Packet): def guess_payload_class(self, p): pass
2
0
2
0
2
0
1
0
1
1
1
0
1
0
1
120
9
1
8
4
6
0
5
4
3
1
4
0
1
30,105
secdev/scapy
secdev_scapy/scapy/layers/tls/handshake.py
scapy.layers.tls.handshake._ASN1CertAndExt
from scapy.layers.tls.extensions import _ExtensionsLenField, _ExtensionsField, _cert_status_type, TLS_Ext_PostHandshakeAuth, TLS_Ext_SupportedVersion_CH, TLS_Ext_SignatureAlgorithms, TLS_Ext_SupportedVersion_SH, TLS_Ext_EarlyDataIndication, _tls_hello_retry_magic, TLS_Ext_ExtendedMasterSecret, TLS_Ext_EncryptThenMAC fr...
class _ASN1CertAndExt(_GenericTLSSessionInheritance): def extract_padding(self, s): pass
2
0
2
0
2
0
1
0
1
0
0
0
1
0
1
133
9
1
8
4
6
0
5
4
3
1
5
0
1
30,106
secdev/scapy
secdev_scapy/scapy/layers/tls/handshake.py
scapy.layers.tls.handshake._ASN1CertAndExtListField
from scapy.fields import ByteEnumField, ByteField, Field, FieldLenField, IntField, PacketField, PacketLenField, PacketListField, ShortEnumField, ShortField, StrFixedLenField, StrLenField, ThreeBytesField, UTCTimeField class _ASN1CertAndExtListField(PacketListField): def m2i(self, pkt, m): return self.cls(...
class _ASN1CertAndExtListField(PacketListField): def m2i(self, pkt, m): pass
2
0
2
0
2
0
1
0
1
0
0
0
1
0
1
51
3
0
3
2
1
0
3
2
1
1
7
0
1
30,107
secdev/scapy
secdev_scapy/scapy/layers/tls/handshake.py
scapy.layers.tls.handshake._ASN1CertField
from scapy.fields import ByteEnumField, ByteField, Field, FieldLenField, IntField, PacketField, PacketLenField, PacketListField, ShortEnumField, ShortField, StrFixedLenField, StrLenField, ThreeBytesField, UTCTimeField import struct from scapy.layers.tls.cert import Cert class _ASN1CertField(StrLenField): def i2le...
class _ASN1CertField(StrLenField): def i2len(self, pkt, i): pass def getfield(self, pkt, s): pass def i2m(self, pkt, i): pass def i2m_one(i): pass def any2i(self, pkt, x): pass
6
0
9
1
9
0
2
0
1
2
1
0
4
0
4
47
39
5
34
13
28
0
34
13
28
4
7
1
12
30,108
secdev/scapy
secdev_scapy/scapy/layers/tls/handshake.py
scapy.layers.tls.handshake._ASN1CertLenField
from scapy.fields import ByteEnumField, ByteField, Field, FieldLenField, IntField, PacketField, PacketLenField, PacketListField, ShortEnumField, ShortField, StrFixedLenField, StrLenField, ThreeBytesField, UTCTimeField import struct class _ASN1CertLenField(FieldLenField): """ This is mostly a 3-byte FieldLenFie...
class _ASN1CertLenField(FieldLenField): ''' This is mostly a 3-byte FieldLenField. ''' def __init__(self, name, default, length_of=None, adjust=lambda pkt, x: x): pass def i2m(self, pkt, x): pass def addfield(self, pkt, s, val): pass def getfield(self, pkt, s): ...
5
1
4
0
4
0
2
0.25
1
0
0
0
4
2
4
38
22
3
16
9
11
4
16
9
11
3
5
2
6
30,109
secdev/scapy
secdev_scapy/scapy/layers/tls/handshake.py
scapy.layers.tls.handshake._ASN1CertListField
from scapy.fields import ByteEnumField, ByteField, Field, FieldLenField, IntField, PacketField, PacketLenField, PacketListField, ShortEnumField, ShortField, StrFixedLenField, StrLenField, ThreeBytesField, UTCTimeField import struct from scapy.layers.tls.cert import Cert class _ASN1CertListField(StrLenField): islis...
class _ASN1CertListField(StrLenField): def i2len(self, pkt, i): pass def getfield(self, pkt, s): ''' Extract Certs in a loop. XXX We should provide safeguards when trying to parse a Cert. ''' pass def i2m(self, pkt, i): pass def i2m_one(i)...
6
1
12
1
10
1
3
0.1
1
2
1
0
4
0
4
47
52
7
41
14
35
4
41
14
35
4
7
1
15
30,110
secdev/scapy
secdev_scapy/scapy/layers/tls/handshake.py
scapy.layers.tls.handshake._CertAuthoritiesField
from scapy.fields import ByteEnumField, ByteField, Field, FieldLenField, IntField, PacketField, PacketLenField, PacketListField, ShortEnumField, ShortField, StrFixedLenField, StrLenField, ThreeBytesField, UTCTimeField import struct class _CertAuthoritiesField(StrLenField): """ XXX Rework this with proper ASN.1...
class _CertAuthoritiesField(StrLenField): ''' XXX Rework this with proper ASN.1 parsing. ''' def getfield(self, pkt, s): pass def m2i(self, pkt, m): pass def i2m(self, pkt, i): pass def addfield(self, pkt, s, val): pass def i2len(self, pkt, val): ...
6
1
5
0
5
0
2
0.12
1
1
0
0
5
0
5
48
33
5
25
11
19
3
24
11
18
3
7
2
8
30,111
secdev/scapy
secdev_scapy/scapy/layers/tls/handshake.py
scapy.layers.tls.handshake._CertTypesField
class _CertTypesField(_CipherSuitesField): pass
class _CertTypesField(_CipherSuitesField): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
51
2
0
2
1
1
0
2
1
1
0
8
0
0
30,112
secdev/scapy
secdev_scapy/scapy/layers/tls/handshake.py
scapy.layers.tls.handshake._CipherSuitesField
from scapy.layers.tls.crypto.suites import _tls_cipher_suites, _tls_cipher_suites_cls, _GenericCipherSuite, _GenericCipherSuiteMetaclass from scapy.fields import ByteEnumField, ByteField, Field, FieldLenField, IntField, PacketField, PacketLenField, PacketListField, ShortEnumField, ShortField, StrFixedLenField, StrLenFi...
class _CipherSuitesField(StrLenField): def __init__(self, name, default, dico, length_from=None, itemfmt='!H'): pass def any2i_one(self, pkt, x): pass def i2repr_one(self, pkt, x): pass def any2i_one(self, pkt, x): pass def i2repr_one(self, pkt, x): pass...
9
0
6
0
6
0
2
0
1
4
2
3
8
4
8
51
59
8
51
20
42
0
50
20
41
3
7
1
18
30,113
secdev/scapy
secdev_scapy/scapy/layers/tls/handshake.py
scapy.layers.tls.handshake._CompressionMethodsField
from scapy.layers.tls.crypto.compression import _tls_compression_algs, _tls_compression_algs_cls, Comp_NULL, _GenericComp, _GenericCompMetaclass class _CompressionMethodsField(_CipherSuitesField): def any2i_one(self, pkt, x): if isinstance(x, (_GenericComp, _GenericCompMetaclass)): x = x.val ...
class _CompressionMethodsField(_CipherSuitesField): def any2i_one(self, pkt, x): pass
2
0
6
0
6
0
3
0
1
3
2
0
1
0
1
52
8
1
7
2
5
0
7
2
5
3
8
1
3
30,114
secdev/scapy
secdev_scapy/scapy/layers/tls/handshake.py
scapy.layers.tls.handshake._GMTUnixTimeField
from scapy.fields import ByteEnumField, ByteField, Field, FieldLenField, IntField, PacketField, PacketLenField, PacketListField, ShortEnumField, ShortField, StrFixedLenField, StrLenField, ThreeBytesField, UTCTimeField class _GMTUnixTimeField(UTCTimeField): """ "The current time and date in standard UNIX 32-bit...
class _GMTUnixTimeField(UTCTimeField): ''' "The current time and date in standard UNIX 32-bit format (seconds since the midnight starting Jan 1, 1970, GMT, ignoring leap seconds)." ''' def i2h(self, pkt, x): pass def i2m(self, pkt, x): pass
3
1
3
0
3
0
2
0.57
1
1
0
0
2
0
2
37
13
2
7
3
4
4
7
3
4
2
5
1
4
30,115
secdev/scapy
secdev_scapy/scapy/layers/tls/handshake.py
scapy.layers.tls.handshake._SessionIDField
from scapy.fields import ByteEnumField, ByteField, Field, FieldLenField, IntField, PacketField, PacketLenField, PacketListField, ShortEnumField, ShortField, StrFixedLenField, StrLenField, ThreeBytesField, UTCTimeField class _SessionIDField(StrLenField): """ opaque SessionID<0..32>; section 7.4.1.2 of RFC 4346 ...
class _SessionIDField(StrLenField): ''' opaque SessionID<0..32>; section 7.4.1.2 of RFC 4346 ''' pass
1
1
0
0
0
0
0
1.5
1
0
0
0
0
0
0
43
5
0
2
1
1
3
2
1
1
0
7
0
0
30,116
secdev/scapy
secdev_scapy/scapy/layers/tls/handshake.py
scapy.layers.tls.handshake._StatusField
from scapy.fields import ByteEnumField, ByteField, Field, FieldLenField, IntField, PacketField, PacketLenField, PacketListField, ShortEnumField, ShortField, StrFixedLenField, StrLenField, ThreeBytesField, UTCTimeField class _StatusField(PacketLenField): def m2i(self, pkt, m): idtype = pkt.status_type ...
class _StatusField(PacketLenField): def m2i(self, pkt, m): pass
2
0
6
0
6
0
2
0
1
0
0
0
1
0
1
48
7
0
7
4
5
0
7
4
5
2
8
1
2
30,117
secdev/scapy
secdev_scapy/scapy/layers/tls/handshake.py
scapy.layers.tls.handshake._TLSCKExchKeysField
from scapy.fields import ByteEnumField, ByteField, Field, FieldLenField, IntField, PacketField, PacketLenField, PacketListField, ShortEnumField, ShortField, StrFixedLenField, StrLenField, ThreeBytesField, UTCTimeField from scapy.packet import Packet, Raw, Padding class _TLSCKExchKeysField(PacketField): __slots__ =...
class _TLSCKExchKeysField(PacketField): def __init__(self, name, length_from=None): pass def m2i(self, pkt, m): ''' The client_kx_msg may be either None, EncryptedPreMasterSecret (for RSA encryption key exchange), ClientDiffieHellmanPublic, or ClientECDiffieHellmanPubl...
3
1
12
2
7
3
2
0.38
1
2
2
0
2
1
2
48
28
6
16
10
13
6
16
10
13
3
8
1
4
30,118
secdev/scapy
secdev_scapy/scapy/layers/tls/handshake.py
scapy.layers.tls.handshake._TLSHandshake
from scapy.layers.tls.session import _GenericTLSSessionInheritance, readConnState, writeConnState from scapy.compat import hex_bytes, orb, raw import struct from scapy.config import conf from scapy.fields import ByteEnumField, ByteField, Field, FieldLenField, IntField, PacketField, PacketLenField, PacketListField, Shor...
class _TLSHandshake(_GenericTLSSessionInheritance): ''' Inherited by other Handshake classes to get post_build(). Also used as a fallback for unknown TLS Handshake packets. ''' def post_build(self, p, pay): pass def guess_payload_class(self, p): pass def tls_session_updat...
4
2
7
0
5
2
2
0.55
1
0
0
23
3
0
3
135
34
3
20
8
16
11
16
8
12
2
5
1
5
30,119
secdev/scapy
secdev_scapy/scapy/layers/tls/handshake.py
scapy.layers.tls.handshake._TLSRandomBytesField
from scapy.utils import randstring, repr_hex from scapy.fields import ByteEnumField, ByteField, Field, FieldLenField, IntField, PacketField, PacketLenField, PacketListField, ShortEnumField, ShortField, StrFixedLenField, StrLenField, ThreeBytesField, UTCTimeField class _TLSRandomBytesField(StrFixedLenField): def i...
class _TLSRandomBytesField(StrFixedLenField): def i2repr(self, pkt, x): pass
2
0
4
0
4
0
2
0
1
0
0
0
1
0
1
46
5
0
5
2
3
0
5
2
3
2
7
1
2
30,120
secdev/scapy
secdev_scapy/scapy/layers/tls/handshake.py
scapy.layers.tls.handshake._VerifyDataField
from scapy.fields import ByteEnumField, ByteField, Field, FieldLenField, IntField, PacketField, PacketLenField, PacketListField, ShortEnumField, ShortField, StrFixedLenField, StrLenField, ThreeBytesField, UTCTimeField class _VerifyDataField(StrLenField): def getfield(self, pkt, s): if pkt.tls_session.tls_...
class _VerifyDataField(StrLenField): def getfield(self, pkt, s): pass
2
0
8
0
8
0
3
0
1
0
0
0
1
0
1
44
9
0
9
3
7
0
7
3
5
3
7
1
3
30,121
secdev/scapy
secdev_scapy/scapy/layers/tls/handshake_sslv2.py
scapy.layers.tls.handshake_sslv2.SSLv2ClientCertificate
from scapy.layers.tls.keyexchange import _TLSSignatureField, _TLSSignature from scapy.fields import ByteEnumField, ByteField, EnumField, FieldLenField, ShortEnumField, StrLenField, XStrField, XStrLenField from scapy.error import log_runtime, warning class SSLv2ClientCertificate(_SSLv2Handshake): """ SSLv2 Clie...
class SSLv2ClientCertificate(_SSLv2Handshake): ''' SSLv2 ClientCertificate. ''' def build(self, *args, **kargs): pass def post_dissection_tls_session_update(self, msg_str): pass def tls_session_update(self, msg_str): pass
4
1
12
0
12
0
2
0.08
1
2
1
0
3
1
3
137
57
6
48
16
44
4
28
16
24
3
6
2
7
30,122
secdev/scapy
secdev_scapy/scapy/layers/tls/handshake_sslv2.py
scapy.layers.tls.handshake_sslv2.SSLv2ClientFinished
from scapy.error import log_runtime, warning from scapy.fields import ByteEnumField, ByteField, EnumField, FieldLenField, ShortEnumField, StrLenField, XStrField, XStrLenField class SSLv2ClientFinished(_SSLv2Handshake): """ In order to parse a ClientFinished, the exact message string should be fed to the cl...
class SSLv2ClientFinished(_SSLv2Handshake): ''' In order to parse a ClientFinished, the exact message string should be fed to the class. SSLv2 does not offer any other way to know the c_id length. ''' def build(self, *args, **kargs): pass def post_dissection(self, pkt): pa...
3
1
6
0
6
1
3
0.33
1
1
0
0
2
1
2
136
21
2
15
9
12
5
14
9
11
3
6
2
5
30,123
secdev/scapy
secdev_scapy/scapy/layers/tls/handshake_sslv2.py
scapy.layers.tls.handshake_sslv2.SSLv2ClientHello
from scapy.layers.tls.basefields import _tls_version, _TLSVersionField from scapy.fields import ByteEnumField, ByteField, EnumField, FieldLenField, ShortEnumField, StrLenField, XStrField, XStrLenField from scapy.layers.tls.crypto.suites import _tls_cipher_suites, _tls_cipher_suites_cls, get_usable_ciphersuites, SSL_CK_...
class SSLv2ClientHello(_SSLv2Handshake): ''' SSLv2 ClientHello. ''' def tls_session_update(self, msg_str): pass
2
1
5
0
5
0
1
0.17
1
1
0
0
1
0
1
135
29
3
23
4
21
4
8
4
6
1
6
0
1
30,124
secdev/scapy
secdev_scapy/scapy/layers/tls/handshake_sslv2.py
scapy.layers.tls.handshake_sslv2.SSLv2ClientMasterKey
from scapy.utils import randstring import struct from scapy.layers.tls.crypto.suites import _tls_cipher_suites, _tls_cipher_suites_cls, get_usable_ciphersuites, SSL_CK_DES_192_EDE3_CBC_WITH_MD5 from scapy.layers.tls.session import _GenericTLSSessionInheritance, readConnState, writeConnState from scapy.fields import Byt...
class SSLv2ClientMasterKey(_SSLv2Handshake): ''' SSLv2 ClientMasterKey. ''' def __init__(self, *args, **kargs): ''' When post_building, the packets fields are updated (this is somewhat non-standard). We might need these fields later, but calling __str__ on a new packet ...
5
2
30
4
25
2
5
0.11
1
3
2
0
4
9
4
138
146
20
115
42
110
13
86
42
81
13
6
4
21
30,125
secdev/scapy
secdev_scapy/scapy/layers/tls/handshake_sslv2.py
scapy.layers.tls.handshake_sslv2.SSLv2Error
from scapy.fields import ByteEnumField, ByteField, EnumField, FieldLenField, ShortEnumField, StrLenField, XStrField, XStrLenField class SSLv2Error(_SSLv2Handshake): """ SSLv2 Error. """ name = 'SSLv2 Handshake - Error' fields_desc = [ByteEnumField('msgtype', 0, _sslv2_handshake_type), ShortEnumFiel...
class SSLv2Error(_SSLv2Handshake): ''' SSLv2 Error. ''' pass
1
1
0
0
0
0
0
0.75
1
0
0
0
0
0
0
134
7
0
4
3
3
3
3
3
2
0
6
0
0
30,126
secdev/scapy
secdev_scapy/scapy/layers/tls/handshake_sslv2.py
scapy.layers.tls.handshake_sslv2.SSLv2RequestCertificate
from scapy.fields import ByteEnumField, ByteField, EnumField, FieldLenField, ShortEnumField, StrLenField, XStrField, XStrLenField class SSLv2RequestCertificate(_SSLv2Handshake): """ In order to parse a RequestCertificate, the exact message string should be fed to the class. This is how SSLv2 defines the ch...
class SSLv2RequestCertificate(_SSLv2Handshake): ''' In order to parse a RequestCertificate, the exact message string should be fed to the class. This is how SSLv2 defines the challenge length... ''' def tls_session_update(self, msg_str): pass
2
1
3
0
3
0
1
0.5
1
1
0
0
1
0
1
135
13
1
8
4
6
4
6
4
4
1
6
0
1
30,127
secdev/scapy
secdev_scapy/scapy/layers/tls/handshake_sslv2.py
scapy.layers.tls.handshake_sslv2.SSLv2ServerFinished
from scapy.fields import ByteEnumField, ByteField, EnumField, FieldLenField, ShortEnumField, StrLenField, XStrField, XStrLenField class SSLv2ServerFinished(_SSLv2Handshake): """ In order to parse a ServerFinished, the exact message string should be fed to the class. SSLv2 does not offer any other way to kn...
class SSLv2ServerFinished(_SSLv2Handshake): ''' In order to parse a ServerFinished, the exact message string should be fed to the class. SSLv2 does not offer any other way to know the sid length. ''' def build(self, *args, **kargs): pass def post_dissection_tls_session_update(self...
3
1
4
0
4
0
2
0.33
1
1
0
0
2
1
2
136
18
2
12
7
9
4
11
7
8
2
6
1
3
30,128
secdev/scapy
secdev_scapy/scapy/layers/tls/handshake_sslv2.py
scapy.layers.tls.handshake_sslv2.SSLv2ServerHello
from scapy.layers.tls.crypto.suites import _tls_cipher_suites, _tls_cipher_suites_cls, get_usable_ciphersuites, SSL_CK_DES_192_EDE3_CBC_WITH_MD5 from scapy.fields import ByteEnumField, ByteField, EnumField, FieldLenField, ShortEnumField, StrLenField, XStrField, XStrLenField from scapy.layers.tls.basefields import _tls_...
class SSLv2ServerHello(_SSLv2Handshake): ''' SSLv2 ServerHello. ''' def tls_session_update(self, msg_str): ''' XXX Something should be done about the session ID here. ''' pass
2
2
14
1
10
3
2
0.25
1
1
0
0
1
0
1
135
39
5
28
7
26
7
13
7
11
2
6
1
2
30,129
secdev/scapy
secdev_scapy/scapy/layers/tls/handshake_sslv2.py
scapy.layers.tls.handshake_sslv2.SSLv2ServerVerify
from scapy.fields import ByteEnumField, ByteField, EnumField, FieldLenField, ShortEnumField, StrLenField, XStrField, XStrLenField from scapy.error import log_runtime, warning class SSLv2ServerVerify(_SSLv2Handshake): """ In order to parse a ServerVerify, the exact message string should be fed to the class....
class SSLv2ServerVerify(_SSLv2Handshake): ''' In order to parse a ServerVerify, the exact message string should be fed to the class. This is how SSLv2 defines the challenge length... ''' def build(self, *args, **kargs): pass def post_dissection(self, pkt): pass
3
1
6
0
6
1
3
0.33
1
1
0
0
2
1
2
136
21
2
15
9
12
5
14
9
11
3
6
2
5
30,130
secdev/scapy
secdev_scapy/scapy/layers/tls/handshake_sslv2.py
scapy.layers.tls.handshake_sslv2._SSLv2CertDataField
from scapy.fields import ByteEnumField, ByteField, EnumField, FieldLenField, ShortEnumField, StrLenField, XStrField, XStrLenField from scapy.layers.tls.cert import Cert class _SSLv2CertDataField(StrLenField): def getfield(self, pkt, s): tmp_len = 0 if self.length_from is not None: tmp_...
class _SSLv2CertDataField(StrLenField): def getfield(self, pkt, s): pass def i2len(self, pkt, i): pass def i2m(self, pkt, i): pass
4
0
6
0
6
1
2
0.11
1
2
1
0
3
0
3
46
22
2
18
6
14
2
18
6
14
3
7
1
7
30,131
secdev/scapy
secdev_scapy/scapy/layers/tls/handshake_sslv2.py
scapy.layers.tls.handshake_sslv2._SSLv2CipherSuiteField
from scapy.fields import ByteEnumField, ByteField, EnumField, FieldLenField, ShortEnumField, StrLenField, XStrField, XStrLenField import struct class _SSLv2CipherSuiteField(EnumField): def __init__(self, name, default, dico): EnumField.__init__(self, name, default, dico) def i2m(self, pkt, val): ...
class _SSLv2CipherSuiteField(EnumField): def __init__(self, name, default, dico): pass def i2m(self, pkt, val): pass def addfield(self, pkt, s, val): pass def m2i(self, pkt, m): pass def getfield(self, pkt, s): pass
6
0
3
0
3
0
1
0
1
0
0
0
5
0
5
45
18
4
14
7
8
0
14
7
8
2
6
1
6
30,132
secdev/scapy
secdev_scapy/scapy/layers/tls/handshake_sslv2.py
scapy.layers.tls.handshake_sslv2._SSLv2CipherSuitesField
import struct from scapy.layers.tls.handshake import _CipherSuitesField class _SSLv2CipherSuitesField(_CipherSuitesField): def __init__(self, name, default, dico, length_from=None): _CipherSuitesField.__init__(self, name, default, dico, length_from=length_from) self.itemfmt = b'' self.item...
class _SSLv2CipherSuitesField(_CipherSuitesField): def __init__(self, name, default, dico, length_from=None): pass def i2m(self, pkt, val): pass def m2i(self, pkt, m): pass
4
0
5
0
5
0
2
0
1
0
0
0
3
2
3
54
19
2
17
8
13
0
16
8
12
2
8
1
5
30,133
secdev/scapy
secdev_scapy/scapy/layers/tls/handshake_sslv2.py
scapy.layers.tls.handshake_sslv2._SSLv2EncryptedKeyField
from scapy.fields import ByteEnumField, ByteField, EnumField, FieldLenField, ShortEnumField, StrLenField, XStrField, XStrLenField class _SSLv2EncryptedKeyField(XStrLenField): def i2repr(self, pkt, x): s = super(_SSLv2EncryptedKeyField, self).i2repr(pkt, x) if pkt.decryptedkey is not None: ...
class _SSLv2EncryptedKeyField(XStrLenField): def i2repr(self, pkt, x): pass
2
0
7
0
7
0
2
0
1
1
0
0
1
0
1
45
8
0
8
5
6
0
8
5
6
2
8
1
2
30,134
secdev/scapy
secdev_scapy/scapy/layers/tls/handshake_sslv2.py
scapy.layers.tls.handshake_sslv2._SSLv2Handshake
from scapy.packet import Padding from scapy.layers.tls.session import _GenericTLSSessionInheritance, readConnState, writeConnState from scapy.fields import ByteEnumField, ByteField, EnumField, FieldLenField, ShortEnumField, StrLenField, XStrField, XStrLenField class _SSLv2Handshake(_GenericTLSSessionInheritance): ...
class _SSLv2Handshake(_GenericTLSSessionInheritance): ''' Inherited by other Handshake classes to get post_build(). Also used as a fallback for unknown TLS Handshake packets. ''' def guess_payload_class(self, p): pass def tls_session_update(self, msg_str): ''' Covers b...
3
2
4
0
3
2
1
0.88
1
1
1
9
2
0
2
134
17
2
8
5
5
7
8
5
5
1
5
0
2
30,135
secdev/scapy
secdev_scapy/scapy/layers/tls/keyexchange.py
scapy.layers.tls.keyexchange.ClientDiffieHellmanPublic
from scapy.layers.tls.session import _GenericTLSSessionInheritance from scapy.fields import ByteEnumField, ByteField, EnumField, FieldLenField, FieldListField, PacketField, ShortEnumField, ShortField, StrFixedLenField, StrLenField from scapy.layers.tls.crypto.pkcs1 import pkcs_i2osp, pkcs_os2ip from scapy.config import...
class ClientDiffieHellmanPublic(_GenericTLSSessionInheritance): ''' If the user provides a value for dh_Yc attribute, we assume he will set the pms and ms accordingly and trigger the key derivation on his own. XXX As specified in 7.4.7.2. of RFC 4346, we should distinguish the needs for implicit or...
6
2
12
1
9
2
3
0.4
1
2
1
0
4
2
4
136
64
8
40
19
34
16
37
18
32
4
5
2
12
30,136
secdev/scapy
secdev_scapy/scapy/layers/tls/keyexchange.py
scapy.layers.tls.keyexchange.ClientECDiffieHellmanPublic
from scapy.layers.tls.crypto.pkcs1 import pkcs_i2osp, pkcs_os2ip from scapy.config import conf, crypto_validator from scapy.layers.tls.crypto.groups import _ffdh_groups, _tls_named_curves, _tls_named_groups_generate, _tls_named_groups_import, _tls_named_groups_pubbytes from scapy.layers.tls.session import _GenericTLSSe...
class ClientECDiffieHellmanPublic(_GenericTLSSessionInheritance): ''' Note that the 'len' field is 1 byte longer than with the previous class. ''' @crypto_validator def fill_missing(self): pass def post_build(self, pkt, pay): pass def post_dissection(self, m): ...
5
1
18
1
16
1
5
0.13
1
1
0
0
3
2
3
135
68
6
55
16
50
7
38
15
34
6
5
2
14
30,137
secdev/scapy
secdev_scapy/scapy/layers/tls/keyexchange.py
scapy.layers.tls.keyexchange.ClientPSKIdentity
from scapy.packet import Packet, Raw, Padding from scapy.fields import ByteEnumField, ByteField, EnumField, FieldLenField, FieldListField, PacketField, ShortEnumField, ShortField, StrFixedLenField, StrLenField class ClientPSKIdentity(Packet): """ XXX We provide parsing abilities for ServerPSKParams, but the co...
class ClientPSKIdentity(Packet): ''' XXX We provide parsing abilities for ServerPSKParams, but the context operations have not been implemented yet. See RFC 4279. Note that we do not cover the (EC)DHE_PSK nor the RSA_PSK key exchange, which should contain either an EncryptedPMS or a ClientDiffieHel...
1
1
0
0
0
0
0
1
1
0
0
0
0
0
0
119
12
0
6
3
5
6
3
3
2
0
4
0
0
30,138
secdev/scapy
secdev_scapy/scapy/layers/tls/keyexchange.py
scapy.layers.tls.keyexchange.ECCurvePkt
from scapy.packet import Packet, Raw, Padding from scapy.fields import ByteEnumField, ByteField, EnumField, FieldLenField, FieldListField, PacketField, ShortEnumField, ShortField, StrFixedLenField, StrLenField class ECCurvePkt(Packet): name = 'Elliptic Curve' fields_desc = [FieldLenField('alen', None, length_o...
class ECCurvePkt(Packet): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
119
6
0
6
3
5
0
3
3
2
0
4
0
0
30,139
secdev/scapy
secdev_scapy/scapy/layers/tls/keyexchange.py
scapy.layers.tls.keyexchange.ECPentanomialBasis
from scapy.fields import ByteEnumField, ByteField, EnumField, FieldLenField, FieldListField, PacketField, ShortEnumField, ShortField, StrFixedLenField, StrLenField from scapy.packet import Packet, Raw, Padding class ECPentanomialBasis(Packet): name = 'EC Pentanomial Basis' val = 1 fields_desc = [FieldLenFi...
class ECPentanomialBasis(Packet): def guess_payload_class(self, p): pass
2
0
2
0
2
0
1
0
1
1
1
0
1
0
1
120
12
1
11
5
9
0
6
5
4
1
4
0
1
30,140
secdev/scapy
secdev_scapy/scapy/layers/tls/keyexchange.py
scapy.layers.tls.keyexchange.ECTrinomialBasis
from scapy.fields import ByteEnumField, ByteField, EnumField, FieldLenField, FieldListField, PacketField, ShortEnumField, ShortField, StrFixedLenField, StrLenField from scapy.packet import Packet, Raw, Padding class ECTrinomialBasis(Packet): name = 'EC Trinomial Basis' val = 0 fields_desc = [FieldLenField(...
class ECTrinomialBasis(Packet): def guess_payload_class(self, p): pass
2
0
2
0
2
0
1
0
1
1
1
0
1
0
1
120
8
1
7
5
5
0
6
5
4
1
4
0
1
30,141
secdev/scapy
secdev_scapy/scapy/layers/tls/keyexchange.py
scapy.layers.tls.keyexchange.EncryptedPreMasterSecret
from scapy.packet import Packet, Raw, Padding from scapy.fields import ByteEnumField, ByteField, EnumField, FieldLenField, FieldListField, PacketField, ShortEnumField, ShortField, StrFixedLenField, StrLenField import struct from scapy.layers.tls.session import _GenericTLSSessionInheritance from scapy.layers.tls.basefie...
class EncryptedPreMasterSecret(_GenericTLSSessionInheritance): ''' Pay attention to implementation notes in section 7.4.7.1 of RFC 5246. ''' @classmethod def dispatch_hook(cls, _pkt=None, *args, **kargs): pass def pre_dissect(self, m): pass def post_build(self, pkt, pay): ...
6
2
17
1
14
2
5
0.19
1
2
2
0
3
0
4
136
82
9
62
20
56
12
54
19
49
8
5
2
18
30,142
secdev/scapy
secdev_scapy/scapy/layers/tls/keyexchange.py
scapy.layers.tls.keyexchange.ServerDHParams
from scapy.config import conf, crypto_validator from scapy.layers.tls.session import _GenericTLSSessionInheritance from scapy.layers.tls.crypto.groups import _ffdh_groups, _tls_named_curves, _tls_named_groups_generate, _tls_named_groups_import, _tls_named_groups_pubbytes from scapy.layers.tls.crypto.pkcs1 import pkcs_i...
class ServerDHParams(_GenericTLSSessionInheritance): ''' ServerDHParams for FFDH-based key exchanges, as defined in RFC 5246/7.4.3. Either with .fill_missing() or .post_dissection(), the server_kx_privkey or server_kx_pubkey of the TLS context are updated according to the parsed/assembled values. I...
7
4
17
3
11
4
3
0.43
1
2
1
0
4
6
4
136
95
15
56
29
49
24
46
27
41
8
5
1
13
30,143
secdev/scapy
secdev_scapy/scapy/layers/tls/keyexchange.py
scapy.layers.tls.keyexchange.ServerECDHExplicitChar2Params
from scapy.layers.tls.session import _GenericTLSSessionInheritance from scapy.packet import Packet, Raw, Padding from scapy.fields import ByteEnumField, ByteField, EnumField, FieldLenField, FieldListField, PacketField, ShortEnumField, ShortField, StrFixedLenField, StrLenField class ServerECDHExplicitChar2Params(_Gener...
class ServerECDHExplicitChar2Params(_GenericTLSSessionInheritance): ''' We provide parsing abilities for Char2Params, but there is no support from the cryptography library, hence no context operations. ''' def fill_missing(self): pass def guess_payload_class(self, p): pass
3
1
3
0
3
0
2
0.17
1
1
1
0
2
1
2
134
30
2
24
6
21
4
8
6
5
2
5
1
3
30,144
secdev/scapy
secdev_scapy/scapy/layers/tls/keyexchange.py
scapy.layers.tls.keyexchange.ServerECDHExplicitPrimeParams
from scapy.packet import Packet, Raw, Padding from scapy.fields import ByteEnumField, ByteField, EnumField, FieldLenField, FieldListField, PacketField, ShortEnumField, ShortField, StrFixedLenField, StrLenField from scapy.layers.tls.session import _GenericTLSSessionInheritance class ServerECDHExplicitPrimeParams(_Gener...
class ServerECDHExplicitPrimeParams(_GenericTLSSessionInheritance): ''' We provide parsing abilities for ExplicitPrimeParams, but there is no support from the cryptography library, hence no context operations. ''' def fill_missing(self): ''' Note that if it is not set by the user, ...
3
2
5
0
3
2
2
0.31
1
1
1
0
2
1
2
134
36
2
26
6
23
8
8
6
5
2
5
1
3
30,145
secdev/scapy
secdev_scapy/scapy/layers/tls/keyexchange.py
scapy.layers.tls.keyexchange.ServerECDHNamedCurveParams
from scapy.packet import Packet, Raw, Padding from scapy.layers.tls.crypto.groups import _ffdh_groups, _tls_named_curves, _tls_named_groups_generate, _tls_named_groups_import, _tls_named_groups_pubbytes from scapy.config import conf, crypto_validator from scapy.layers.tls.session import _GenericTLSSessionInheritance fr...
class ServerECDHNamedCurveParams(_GenericTLSSessionInheritance): @crypto_validator def fill_missing(self): ''' We do not want TLSServerKeyExchange.build() to overload and recompute things every time it is called. This method can be called specifically to have things filled in a...
7
2
15
2
9
4
3
0.36
1
3
1
0
4
4
4
136
73
13
45
16
38
16
33
14
28
7
5
1
12
30,146
secdev/scapy
secdev_scapy/scapy/layers/tls/keyexchange.py
scapy.layers.tls.keyexchange.ServerPSKParams
from scapy.fields import ByteEnumField, ByteField, EnumField, FieldLenField, FieldListField, PacketField, ShortEnumField, ShortField, StrFixedLenField, StrLenField from scapy.packet import Packet, Raw, Padding class ServerPSKParams(Packet): """ XXX We provide some parsing abilities for ServerPSKParams, but the...
class ServerPSKParams(Packet): ''' XXX We provide some parsing abilities for ServerPSKParams, but the context operations have not been implemented yet. See RFC 4279. Note that we do not cover the (EC)DHE_PSK key exchange, which should contain a Server*DHParams after 'psk_identity_hint'. ''' ...
4
1
2
0
2
0
1
0.58
1
1
1
0
3
0
3
122
21
3
12
6
8
7
9
6
5
1
4
0
3
30,147
secdev/scapy
secdev_scapy/scapy/layers/tls/keyexchange.py
scapy.layers.tls.keyexchange.ServerRSAParams
import math from scapy.config import conf, crypto_validator from scapy.fields import ByteEnumField, ByteField, EnumField, FieldLenField, FieldListField, PacketField, ShortEnumField, ShortField, StrFixedLenField, StrLenField from scapy.layers.tls.crypto.pkcs1 import pkcs_i2osp, pkcs_os2ip from scapy.layers.tls.session i...
class ServerRSAParams(_GenericTLSSessionInheritance): ''' Defined for RSA_EXPORT kx : it enables servers to share RSA keys shorter than their principal {>512}-bit key, when it is not allowed for kx. This should not appear in standard RSA kx negotiation, as the key has already been advertised in the...
7
1
8
1
7
0
2
0.16
1
4
3
0
4
4
4
136
52
8
38
19
31
6
31
17
26
5
5
1
9
30,148
secdev/scapy
secdev_scapy/scapy/layers/tls/keyexchange.py
scapy.layers.tls.keyexchange.SigAndHashAlgField
from scapy.fields import ByteEnumField, ByteField, EnumField, FieldLenField, FieldListField, PacketField, ShortEnumField, ShortField, StrFixedLenField, StrLenField class SigAndHashAlgField(EnumField): """Used in _TLSSignature.""" phantom_value = None getfield = phantom_decorate(EnumField.getfield, True) ...
class SigAndHashAlgField(EnumField): '''Used in _TLSSignature.''' pass
1
1
0
0
0
0
0
0.25
1
0
0
0
0
0
0
40
5
0
4
4
3
1
4
4
3
0
6
0
0
30,149
secdev/scapy
secdev_scapy/scapy/layers/tls/keyexchange.py
scapy.layers.tls.keyexchange.SigAndHashAlgsField
from scapy.fields import ByteEnumField, ByteField, EnumField, FieldLenField, FieldListField, PacketField, ShortEnumField, ShortField, StrFixedLenField, StrLenField class SigAndHashAlgsField(FieldListField): """Used in TLS_Ext_SignatureAlgorithms and TLSCertificateResquest.""" phantom_value = [] getfield = ...
class SigAndHashAlgsField(FieldListField): '''Used in TLS_Ext_SignatureAlgorithms and TLSCertificateResquest.''' pass
1
1
0
0
0
0
0
0.25
1
0
0
0
0
0
0
39
5
0
4
4
3
1
4
4
3
0
5
0
0
30,150
secdev/scapy
secdev_scapy/scapy/layers/tls/keyexchange.py
scapy.layers.tls.keyexchange.SigAndHashAlgsLenField
from scapy.fields import ByteEnumField, ByteField, EnumField, FieldLenField, FieldListField, PacketField, ShortEnumField, ShortField, StrFixedLenField, StrLenField class SigAndHashAlgsLenField(FieldLenField): """Used in TLS_Ext_SignatureAlgorithms and TLSCertificateResquest.""" phantom_value = 0 getfield =...
class SigAndHashAlgsLenField(FieldLenField): '''Used in TLS_Ext_SignatureAlgorithms and TLSCertificateResquest.''' pass
1
1
0
0
0
0
0
0.25
1
0
0
0
0
0
0
34
5
0
4
4
3
1
4
4
3
0
5
0
0
30,151
secdev/scapy
secdev_scapy/scapy/layers/tls/keyexchange.py
scapy.layers.tls.keyexchange.SigLenField
from scapy.fields import ByteEnumField, ByteField, EnumField, FieldLenField, FieldListField, PacketField, ShortEnumField, ShortField, StrFixedLenField, StrLenField class SigLenField(FieldLenField): """There is a trick for SSLv2, which uses implicit lengths...""" def getfield(self, pkt, s): v = pkt.tls...
class SigLenField(FieldLenField): '''There is a trick for SSLv2, which uses implicit lengths...''' def getfield(self, pkt, s): pass def addfield(self, pkt, s, val): '''With SSLv2 you will never be able to add a sig_len.''' pass
3
2
6
0
5
1
2
0.18
1
1
0
0
2
0
2
36
15
2
11
5
8
2
11
5
8
2
5
1
4
30,152
secdev/scapy
secdev_scapy/scapy/layers/tls/keyexchange.py
scapy.layers.tls.keyexchange.SigValField
from scapy.error import warning from scapy.fields import ByteEnumField, ByteField, EnumField, FieldLenField, FieldListField, PacketField, ShortEnumField, ShortField, StrFixedLenField, StrLenField class SigValField(StrLenField): """There is a trick for SSLv2, which uses implicit lengths...""" def getfield(self...
class SigValField(StrLenField): '''There is a trick for SSLv2, which uses implicit lengths...''' def getfield(self, pkt, m): pass
2
1
11
0
11
0
3
0.08
1
1
0
0
1
0
1
44
14
1
12
4
10
1
10
4
8
3
7
2
3
30,153
secdev/scapy
secdev_scapy/scapy/layers/tls/keyexchange.py
scapy.layers.tls.keyexchange._ECBasisField
from scapy.fields import ByteEnumField, ByteField, EnumField, FieldLenField, FieldListField, PacketField, ShortEnumField, ShortField, StrFixedLenField, StrLenField class _ECBasisField(PacketField): __slots__ = ['clsdict', 'basis_type_from'] def __init__(self, name, default, basis_type_from, clsdict): ...
class _ECBasisField(PacketField): def __init__(self, name, default, basis_type_from, clsdict): pass def m2i(self, pkt, m): pass def i2basis_type(self, pkt, x): pass
4
0
5
0
5
0
1
0
1
1
0
0
3
2
3
49
20
3
17
10
13
0
17
10
13
2
8
1
4
30,154
secdev/scapy
secdev_scapy/scapy/layers/tls/keyexchange.py
scapy.layers.tls.keyexchange._ECBasisTypeField
from scapy.fields import ByteEnumField, ByteField, EnumField, FieldLenField, FieldListField, PacketField, ShortEnumField, ShortField, StrFixedLenField, StrLenField class _ECBasisTypeField(ByteEnumField): __slots__ = ['basis_type_of'] def __init__(self, name, default, enum, basis_type_of, remain=0): se...
class _ECBasisTypeField(ByteEnumField): def __init__(self, name, default, enum, basis_type_of, remain=0): pass def i2m(self, pkt, x): pass
3
0
4
0
4
0
2
0
1
0
0
0
2
1
2
43
12
2
10
6
7
0
10
6
7
2
7
1
3
30,155
secdev/scapy
secdev_scapy/scapy/layers/tls/keyexchange.py
scapy.layers.tls.keyexchange._TLSServerParamsField
from scapy.fields import ByteEnumField, ByteField, EnumField, FieldLenField, FieldListField, PacketField, ShortEnumField, ShortField, StrFixedLenField, StrLenField from scapy.packet import Packet, Raw, Padding from scapy.layers.tls.crypto.pkcs1 import pkcs_i2osp, pkcs_os2ip class _TLSServerParamsField(PacketField): ...
class _TLSServerParamsField(PacketField): ''' This is a dispatcher for the Server*DHParams below, used in TLSServerKeyExchange and based on the key_exchange.server_kx_msg_cls. When this cls is None, it means that we should not see a ServerKeyExchange, so we grab everything within length_from and ma...
3
1
12
0
12
0
4
0.36
1
4
3
0
2
1
2
48
37
3
25
9
22
9
24
9
21
6
8
3
7
30,156
secdev/scapy
secdev_scapy/scapy/layers/tls/keyexchange.py
scapy.layers.tls.keyexchange._TLSSignature
from scapy.packet import Packet, Raw, Padding from scapy.layers.tls.session import _GenericTLSSessionInheritance class _TLSSignature(_GenericTLSSessionInheritance): """ Prior to TLS 1.2, digitally-signed structure implicitly used the concatenation of a MD5 hash and a SHA-1 hash. Then TLS 1.2 introduced...
class _TLSSignature(_GenericTLSSessionInheritance): ''' Prior to TLS 1.2, digitally-signed structure implicitly used the concatenation of a MD5 hash and a SHA-1 hash. Then TLS 1.2 introduced explicit SignatureAndHashAlgorithms, i.e. couples of (hash_alg, sig_alg). See RFC 5246, section 7.4.1.4.1. ...
6
3
13
0
10
3
4
0.44
1
2
1
0
5
2
5
137
86
6
57
15
51
25
43
15
37
6
5
4
19
30,157
secdev/scapy
secdev_scapy/scapy/layers/tls/keyexchange.py
scapy.layers.tls.keyexchange._TLSSignatureField
from scapy.fields import ByteEnumField, ByteField, EnumField, FieldLenField, FieldListField, PacketField, ShortEnumField, ShortField, StrFixedLenField, StrLenField from scapy.config import conf, crypto_validator class _TLSSignatureField(PacketField): """ Used for 'digitally-signed struct' in several ServerKeyE...
class _TLSSignatureField(PacketField): ''' Used for 'digitally-signed struct' in several ServerKeyExchange, and also in CertificateVerify. We can handle the anonymous case. ''' def __init__(self, name, default, length_from=None): pass def m2i(self, pkt, m): pass def getfi...
4
1
6
0
6
0
2
0.2
1
1
1
0
3
1
3
49
27
3
20
10
16
4
20
10
16
3
8
1
6
30,158
secdev/scapy
secdev_scapy/scapy/layers/tls/keyexchange.py
scapy.layers.tls.keyexchange._UnEncryptedPreMasterSecret
from scapy.packet import Packet, Raw, Padding class _UnEncryptedPreMasterSecret(Raw): """ When the content of an EncryptedPreMasterSecret could not be deciphered, we use this class to represent the encrypted data. """ name = 'RSA Encrypted PreMaster Secret (protected)' def __init__(self, *args...
class _UnEncryptedPreMasterSecret(Raw): ''' When the content of an EncryptedPreMasterSecret could not be deciphered, we use this class to represent the encrypted data. ''' def __init__(self, *args, **kargs): pass
2
1
3
0
3
1
1
1
1
1
0
0
1
0
1
123
10
1
5
3
3
5
5
3
3
1
5
0
1
30,159
secdev/scapy
secdev_scapy/scapy/layers/tls/keyexchange_tls13.py
scapy.layers.tls.keyexchange_tls13.KeyShareEntry
import struct from scapy.layers.tls.crypto.groups import _tls_named_curves, _tls_named_ffdh_groups, _tls_named_groups, _tls_named_groups_generate, _tls_named_groups_import, _tls_named_groups_pubbytes from scapy.config import conf, crypto_validator from scapy.packet import Packet from scapy.fields import FieldLenField, ...
class KeyShareEntry(Packet): ''' When building from scratch, we create a DH private key, and when dissecting, we create a DH public key. Default group is secp256r1. ''' def __init__(self, *args, **kargs): pass def do_build(self): ''' We need this hack, else 'self' woul...
10
3
7
0
5
1
2
0.23
1
2
0
0
7
6
7
126
67
10
47
23
37
11
39
21
31
5
4
2
12
30,160
secdev/scapy
secdev_scapy/scapy/layers/tls/keyexchange_tls13.py
scapy.layers.tls.keyexchange_tls13.PSKBinderEntry
from scapy.fields import FieldLenField, IntField, PacketField, PacketLenField, PacketListField, ShortEnumField, ShortField, StrFixedLenField, StrLenField, XStrLenField from scapy.packet import Packet from scapy.config import conf, crypto_validator class PSKBinderEntry(Packet): name = 'PSK Binder Entry' fields_...
class PSKBinderEntry(Packet): def default_payload_class(self, payload): pass
2
0
2
0
2
0
1
0
1
0
0
0
1
0
1
120
9
1
8
4
6
0
5
4
3
1
4
0
1
30,161
secdev/scapy
secdev_scapy/scapy/layers/tls/keyexchange_tls13.py
scapy.layers.tls.keyexchange_tls13.PSKIdentity
from scapy.packet import Packet from scapy.config import conf, crypto_validator from scapy.fields import FieldLenField, IntField, PacketField, PacketLenField, PacketListField, ShortEnumField, ShortField, StrFixedLenField, StrLenField, XStrLenField class PSKIdentity(Packet): name = 'PSK Identity' fields_desc = ...
class PSKIdentity(Packet): def default_payload_class(self, payload): pass
2
0
2
0
2
0
1
0
1
0
0
0
1
0
1
120
10
1
9
4
7
0
5
4
3
1
4
0
1
30,162
secdev/scapy
secdev_scapy/scapy/layers/tls/keyexchange_tls13.py
scapy.layers.tls.keyexchange_tls13.TLS_Ext_KeyShare_CH
from scapy.layers.tls.extensions import TLS_Ext_Unknown, _tls_ext from scapy.layers.tls.crypto.groups import _tls_named_curves, _tls_named_ffdh_groups, _tls_named_groups, _tls_named_groups_generate, _tls_named_groups_import, _tls_named_groups_pubbytes from scapy.fields import FieldLenField, IntField, PacketField, Packe...
class TLS_Ext_KeyShare_CH(TLS_Ext_Unknown): def post_build(self, pkt, pay): pass def post_dissection(self, r): pass
3
0
11
0
11
1
5
0.1
1
1
0
0
2
0
2
135
32
2
30
11
27
3
25
11
22
5
6
4
10
30,163
secdev/scapy
secdev_scapy/scapy/layers/tls/keyexchange_tls13.py
scapy.layers.tls.keyexchange_tls13.TLS_Ext_KeyShare_HRR
from scapy.layers.tls.extensions import TLS_Ext_Unknown, _tls_ext from scapy.fields import FieldLenField, IntField, PacketField, PacketLenField, PacketListField, ShortEnumField, ShortField, StrFixedLenField, StrLenField, XStrLenField from scapy.layers.tls.crypto.groups import _tls_named_curves, _tls_named_ffdh_groups, ...
class TLS_Ext_KeyShare_HRR(TLS_Ext_Unknown): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
133
5
0
5
3
4
0
3
3
2
0
6
0
0
30,164
secdev/scapy
secdev_scapy/scapy/layers/tls/keyexchange_tls13.py
scapy.layers.tls.keyexchange_tls13.TLS_Ext_KeyShare_SH
from scapy.error import log_runtime from scapy.layers.tls.extensions import TLS_Ext_Unknown, _tls_ext from scapy.layers.tls.crypto.groups import _tls_named_curves, _tls_named_ffdh_groups, _tls_named_groups, _tls_named_groups_generate, _tls_named_groups_import, _tls_named_groups_pubbytes from scapy.fields import FieldLe...
class TLS_Ext_KeyShare_SH(TLS_Ext_Unknown): def post_build(self, pkt, pay): pass def post_dissection(self, r): pass
3
0
29
1
27
2
9
0.07
1
1
0
0
2
0
2
135
65
4
59
17
56
4
50
17
47
11
6
4
18
30,165
secdev/scapy
secdev_scapy/scapy/layers/tls/keyexchange_tls13.py
scapy.layers.tls.keyexchange_tls13.TLS_Ext_PreSharedKey_CH
from scapy.layers.tls.extensions import TLS_Ext_Unknown, _tls_ext from scapy.fields import FieldLenField, IntField, PacketField, PacketLenField, PacketListField, ShortEnumField, ShortField, StrFixedLenField, StrLenField, XStrLenField class TLS_Ext_PreSharedKey_CH(TLS_Ext_Unknown): name = 'TLS Extension - Pre Share...
class TLS_Ext_PreSharedKey_CH(TLS_Ext_Unknown): pass
1
0
0
0
0
0
0
0.08
1
0
0
0
0
0
0
133
13
0
12
3
11
1
3
3
2
0
6
0
0
30,166
secdev/scapy
secdev_scapy/scapy/layers/tls/keyexchange_tls13.py
scapy.layers.tls.keyexchange_tls13.TLS_Ext_PreSharedKey_SH
from scapy.layers.tls.extensions import TLS_Ext_Unknown, _tls_ext from scapy.fields import FieldLenField, IntField, PacketField, PacketLenField, PacketListField, ShortEnumField, ShortField, StrFixedLenField, StrLenField, XStrLenField class TLS_Ext_PreSharedKey_SH(TLS_Ext_Unknown): name = 'TLS Extension - Pre Share...
class TLS_Ext_PreSharedKey_SH(TLS_Ext_Unknown): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
133
5
0
5
3
4
0
3
3
2
0
6
0
0
30,167
secdev/scapy
secdev_scapy/scapy/layers/tls/keyexchange_tls13.py
scapy.layers.tls.keyexchange_tls13.Ticket
from scapy.fields import FieldLenField, IntField, PacketField, PacketLenField, PacketListField, ShortEnumField, ShortField, StrFixedLenField, StrLenField, XStrLenField from scapy.packet import Packet class Ticket(Packet): name = 'Recommended Ticket Construction (from RFC 5077)' fields_desc = [StrFixedLenField(...
class Ticket(Packet): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
119
8
0
8
3
7
0
3
3
2
0
4
0
0
30,168
secdev/scapy
secdev_scapy/scapy/layers/tls/keyexchange_tls13.py
scapy.layers.tls.keyexchange_tls13.TicketField
from scapy.fields import FieldLenField, IntField, PacketField, PacketLenField, PacketListField, ShortEnumField, ShortField, StrFixedLenField, StrLenField, XStrLenField from scapy.config import conf, crypto_validator class TicketField(PacketLenField): def m2i(self, pkt, m): if len(m) < 64: retu...
class TicketField(PacketLenField): def m2i(self, pkt, m): pass
2
0
5
0
4
1
2
0.2
1
0
0
0
1
0
1
48
6
0
5
2
3
1
5
2
3
2
8
1
2
30,169
secdev/scapy
secdev_scapy/scapy/layers/tls/record.py
scapy.layers.tls.record.TLS
from scapy.error import log_runtime from scapy.layers.tls.crypto.cipher_aead import AEADTagError from scapy.layers.tls.crypto.cipher_stream import Cipher_NULL from scapy.layers.tls.crypto.common import CipherError from scapy.layers.tls.crypto.h_mac import HMACError from scapy.layers.tls.crypto.pkcs1 import pkcs_i2osp f...
class TLS(_GenericTLSSessionInheritance): ''' The generic TLS Record message, based on section 6.2 of RFC 5246. When reading a TLS message, we try to parse as much as we can. In .pre_dissect(), according to the type of the current cipher algorithm (self.tls_session.rcs.cipher.type), we extract the ...
21
17
25
2
15
8
4
0.73
1
11
8
1
15
2
16
148
518
62
267
83
245
195
228
80
207
12
5
4
71
30,170
secdev/scapy
secdev_scapy/scapy/layers/tls/record.py
scapy.layers.tls.record.TLSAlert
from scapy.layers.tls.session import _GenericTLSSessionInheritance from scapy.fields import ByteEnumField, PacketListField, StrField class TLSAlert(_GenericTLSSessionInheritance): name = 'TLS Alert' fields_desc = [ByteEnumField('level', None, _tls_alert_level), ByteEnumField('descr', None, _tls_alert_descripti...
class TLSAlert(_GenericTLSSessionInheritance): def mysummary(self): pass def post_dissection_tls_session_update(self, msg_str): pass def post_build_tls_session_update(self, msg_str): pass
4
0
2
0
2
0
1
0
1
0
0
0
3
0
3
135
13
3
10
6
6
0
9
6
5
1
5
0
3
30,171
secdev/scapy
secdev_scapy/scapy/layers/tls/record.py
scapy.layers.tls.record.TLSApplicationData
from scapy.layers.tls.session import _GenericTLSSessionInheritance from scapy.fields import ByteEnumField, PacketListField, StrField class TLSApplicationData(_GenericTLSSessionInheritance): name = 'TLS Application Data' fields_desc = [StrField('data', '')] def post_dissection_tls_session_update(self, msg_...
class TLSApplicationData(_GenericTLSSessionInheritance): def post_dissection_tls_session_update(self, msg_str): pass def post_build_tls_session_update(self, msg_str): pass
3
0
2
0
2
0
1
0
1
0
0
0
2
0
2
134
9
2
7
5
4
0
7
5
4
1
5
0
2
30,172
secdev/scapy
secdev_scapy/scapy/layers/tls/record.py
scapy.layers.tls.record.TLSChangeCipherSpec
from scapy.fields import ByteEnumField, PacketListField, StrField from scapy.layers.tls.session import _GenericTLSSessionInheritance class TLSChangeCipherSpec(_GenericTLSSessionInheritance): """ Note that, as they are not handshake messages, the ccs messages do not get appended to the list of messages whos...
class TLSChangeCipherSpec(_GenericTLSSessionInheritance): ''' Note that, as they are not handshake messages, the ccs messages do not get appended to the list of messages whose integrity gets verified through the Finished messages. ''' def post_dissection_tls_session_update(self, msg_str): ...
3
1
4
0
2
2
1
1.14
1
0
0
0
2
0
2
134
17
2
7
5
4
8
7
5
4
1
5
0
2
30,173
secdev/scapy
secdev_scapy/scapy/layers/tls/record.py
scapy.layers.tls.record._TLSEncryptedContent
from scapy.layers.tls.session import _GenericTLSSessionInheritance from scapy.packet import Raw, Padding, bind_layers class _TLSEncryptedContent(Raw, _GenericTLSSessionInheritance): """ When the content of a TLS record (more precisely, a TLSCiphertext) could not be deciphered, we use this class to represen...
class _TLSEncryptedContent(Raw, _GenericTLSSessionInheritance): ''' When the content of a TLS record (more precisely, a TLSCiphertext) could not be deciphered, we use this class to represent the encrypted data. The MAC will still be parsed from the whole message, even though it could not been verif...
1
1
0
0
0
0
0
2.33
2
0
0
0
0
0
0
135
10
0
3
3
2
7
3
3
2
0
5
0
0
30,174
secdev/scapy
secdev_scapy/scapy/layers/tls/record.py
scapy.layers.tls.record._TLSMsgListField
from scapy.packet import Raw, Padding, bind_layers import struct from scapy.compat import raw, chb, orb from scapy.fields import ByteEnumField, PacketListField, StrField from scapy.config import conf from scapy.layers.tls.handshake import _tls_handshake_cls, _TLSHandshake, _tls13_handshake_cls, TLS13ServerHello, TLS13C...
class _TLSMsgListField(PacketListField): ''' This is the actual content of the TLS record. As a TLS record may pack multiple sublayer messages (notably, several handshake messages), we inherit from PacketListField. ''' def __init__(self, name, default, length_from=None): pass def ...
7
5
25
2
18
6
6
0.37
1
12
10
1
6
0
6
56
161
16
106
20
99
39
84
20
77
11
7
4
37
30,175
secdev/scapy
secdev_scapy/scapy/layers/tls/record_sslv2.py
scapy.layers.tls.record_sslv2.SSLv2
from scapy.compat import orb, raw from scapy.error import log_runtime from scapy.layers.tls.record import _TLSMsgListField, TLS from scapy.config import conf import struct from scapy.layers.tls.basefields import _SSLv2LengthField, _SSLv2PadField, _SSLv2PadLenField, _TLSMACField class SSLv2(TLS): """ The encryp...
class SSLv2(TLS): ''' The encrypted_data is the encrypted version of mac+msg+pad. ''' def __init__(self, *args, **kargs): pass def _sslv2_mac_verify(self, msg, mac): pass def pre_dissect(self, s): pass def post_dissect(self, s): ''' SSLv2 may forc...
9
2
23
3
18
2
6
0.15
1
3
0
0
8
2
8
156
206
31
154
51
145
23
141
51
132
17
6
3
44
30,176
secdev/scapy
secdev_scapy/scapy/layers/tls/record_sslv2.py
scapy.layers.tls.record_sslv2._SSLv2MsgListField
from scapy.compat import orb, raw from scapy.layers.tls.handshake_sslv2 import _sslv2_handshake_cls from scapy.layers.tls.record import _TLSMsgListField, TLS from scapy.packet import Raw from scapy.layers.tls.session import _GenericTLSSessionInheritance class _SSLv2MsgListField(_TLSMsgListField): def __init__(sel...
class _SSLv2MsgListField(_TLSMsgListField): def __init__(self, name, default, length_from=None): pass def length_from(pkt): pass def m2i(self, pkt, m): pass def i2m(self, pkt, p): pass def addfield(self, pkt, s, val): pass
6
0
9
0
8
0
3
0
1
3
2
0
4
0
4
60
38
4
34
10
29
0
28
10
23
3
8
2
10
30,177
secdev/scapy
secdev_scapy/scapy/layers/tls/record_tls13.py
scapy.layers.tls.record_tls13.TLS13
from scapy.layers.tls.crypto.common import CipherError from scapy.error import log_runtime, warning import struct from scapy.layers.tls.session import _GenericTLSSessionInheritance from scapy.fields import ByteEnumField, PacketField, XStrField from scapy.compat import raw, orb from scapy.layers.tls.record import _TLSMs...
class TLS13(_GenericTLSSessionInheritance): def __init__(self, *args, **kargs): pass def _tls_auth_decrypt(self, s): ''' Provided with the record header and AEAD-ciphered data, return the sliced and clear tuple (TLSInnerPlaintext, tag). Note that we still return the sl...
9
6
14
1
9
4
3
0.44
1
6
4
0
8
2
8
140
132
15
82
27
73
36
71
26
62
5
5
2
21
30,178
secdev/scapy
secdev_scapy/scapy/layers/tls/record_tls13.py
scapy.layers.tls.record_tls13.TLSInnerPlaintext
from scapy.fields import ByteEnumField, PacketField, XStrField import struct from scapy.layers.tls.session import _GenericTLSSessionInheritance from scapy.layers.tls.basefields import _TLSVersionField, _tls_version, _TLSMACField, _TLSLengthField, _tls_type from scapy.layers.tls.record import _TLSMsgListField, TLS clas...
class TLSInnerPlaintext(_GenericTLSSessionInheritance): def pre_dissect(self, s): ''' We need to parse the padding and type as soon as possible, else we won't be able to parse the message list... ''' pass
2
1
21
3
14
4
4
0.21
1
1
0
0
1
1
1
133
27
4
19
8
17
4
16
8
14
4
5
2
4
30,179
secdev/scapy
secdev_scapy/scapy/layers/tls/record_tls13.py
scapy.layers.tls.record_tls13._TLSInnerPlaintextField
from scapy.compat import raw, orb from scapy.error import log_runtime, warning from scapy.fields import ByteEnumField, PacketField, XStrField from scapy.layers.tls.session import _GenericTLSSessionInheritance class _TLSInnerPlaintextField(PacketField): def __init__(self, name, default, *args, **kargs): su...
class _TLSInnerPlaintextField(PacketField): def __init__(self, name, default, *args, **kargs): pass def m2i(self, pkt, m): pass def getfield(self, pkt, s): pass def i2m(self, pkt, p): pass
5
0
5
0
5
1
2
0.1
1
3
2
0
4
0
4
50
25
3
21
8
16
2
19
8
14
3
8
2
7
30,180
secdev/scapy
secdev_scapy/scapy/layers/tls/session.py
scapy.layers.tls.session.TLSSession
from scapy.error import log_runtime, warning from scapy.sessions import TCPSession from scapy.config import conf class TLSSession(TCPSession): def __init__(self, *args, **kwargs): warning('TLSSession is deprecated and will be removed in a future version. Please use TCPSession instead with conf.tls_session...
class TLSSession(TCPSession): def __init__(self, *args, **kwargs): pass def toPacketList(self): pass
3
0
8
0
7
1
2
0.07
1
1
0
0
2
1
2
12
17
1
15
5
12
1
12
5
9
2
4
1
3
30,181
secdev/scapy
secdev_scapy/scapy/layers/tls/session.py
scapy.layers.tls.session._GenericTLSSessionInheritance
import struct from scapy.layers.inet import TCP from scapy.config import conf from scapy.error import log_runtime, warning from scapy.packet import Packet from scapy.compat import raw class _GenericTLSSessionInheritance(Packet): """ Many classes inside the TLS module need to get access to session-related i...
class _GenericTLSSessionInheritance(Packet): ''' Many classes inside the TLS module need to get access to session-related information. For instance, an encrypted TLS record cannot be parsed without some knowledge of the cipher suite being used and the secrets which have been negotiated. Passing inf...
15
5
14
1
11
2
3
0.25
1
6
4
20
12
5
13
132
208
29
143
52
123
36
124
50
106
15
4
5
37
30,182
secdev/scapy
secdev_scapy/scapy/layers/tls/session.py
scapy.layers.tls.session._tls_sessions
from scapy.config import conf from scapy.error import log_runtime, warning class _tls_sessions(object): def __init__(self): self.sessions = {} self.server_rsa_key = None def add(self, session): s = self.find(session) if s: log_runtime.info('TLS: previous session sh...
class _tls_sessions(object): def __init__(self): pass def add(self, session): pass def rem(self, session, force=False): pass def find(self, session): pass def __repr__(self): pass
6
0
10
0
10
0
4
0
1
3
0
0
5
2
5
5
55
6
49
22
43
0
48
22
42
7
1
4
18
30,183
secdev/scapy
secdev_scapy/scapy/layers/tls/session.py
scapy.layers.tls.session.connState
from scapy.layers.tls.crypto.hkdf import TLS13_HKDF from scapy.utils import repr_hex, strxor from scapy.layers.tls.crypto.compression import Comp_NULL from scapy.config import conf from scapy.layers.tls.crypto.prf import PRF from scapy.error import log_runtime, warning class connState(object): """ From RFC 524...
class connState(object): ''' From RFC 5246, section 6.1: A TLS connection state is the operating environment of the TLS Record Protocol. It specifies a compression algorithm, an encryption algorithm, and a MAC algorithm. In addition, the parameters for these algorithms are known: the MAC key ...
8
3
29
3
22
4
4
0.36
1
5
4
2
7
13
7
7
242
30
158
58
140
57
115
49
106
15
1
2
30
30,184
secdev/scapy
secdev_scapy/scapy/layers/tls/session.py
scapy.layers.tls.session.readConnState
class readConnState(connState): def __init__(self, **kargs): connState.__init__(self, read_or_write='read', **kargs)
class readConnState(connState): def __init__(self, **kargs): pass
2
0
2
0
2
0
1
0
1
0
0
0
1
0
1
8
3
0
3
2
1
0
3
2
1
1
2
0
1
30,185
secdev/scapy
secdev_scapy/scapy/layers/tls/session.py
scapy.layers.tls.session.tlsSession
from scapy.utils import repr_hex, strxor from scapy.config import conf import socket import struct from scapy.layers.tls.crypto.hkdf import TLS13_HKDF from scapy.layers.inet import TCP from scapy.pton_ntop import inet_pton from scapy.error import log_runtime, warning class tlsSession(object): """ This is our T...
class tlsSession(object): ''' This is our TLS context, which gathers information from both sides of the TLS connection. These sides are represented by a readConnState instance and a writeConnState instance. Along with overarching network attributes, a tlsSession object also holds negotiated, shared...
24
7
25
3
16
6
4
0.43
1
8
4
0
23
65
23
23
631
103
372
130
343
161
303
125
279
10
1
2
95
30,186
secdev/scapy
secdev_scapy/scapy/layers/tls/session.py
scapy.layers.tls.session.writeConnState
class writeConnState(connState): def __init__(self, **kargs): connState.__init__(self, read_or_write='write', **kargs)
class writeConnState(connState): def __init__(self, **kargs): pass
2
0
2
0
2
0
1
0
1
0
0
0
1
0
1
8
3
0
3
2
1
0
3
2
1
1
2
0
1
30,187
secdev/scapy
secdev_scapy/scapy/layers/tls/tools.py
scapy.layers.tls.tools.TLSCiphertext
class TLSCiphertext(TLSPlaintext): name = 'TLS Ciphertext'
class TLSCiphertext(TLSPlaintext): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
119
2
0
2
2
1
0
2
2
1
0
5
0
0
30,188
secdev/scapy
secdev_scapy/scapy/layers/tls/tools.py
scapy.layers.tls.tools.TLSCompressed
class TLSCompressed(TLSPlaintext): name = 'TLS Compressed'
class TLSCompressed(TLSPlaintext): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
119
2
0
2
2
1
0
2
2
1
0
5
0
0
30,189
secdev/scapy
secdev_scapy/scapy/layers/tls/tools.py
scapy.layers.tls.tools.TLSPlaintext
from scapy.fields import ByteEnumField, ShortEnumField, FieldLenField, StrLenField from scapy.packet import Packet from scapy.layers.tls.basefields import _tls_type, _tls_version class TLSPlaintext(Packet): name = 'TLS Plaintext' fields_desc = [ByteEnumField('type', None, _tls_type), ShortEnumField('version', ...
class TLSPlaintext(Packet): pass
1
0
0
0
0
0
0
0
1
0
0
2
0
0
0
119
7
0
7
3
6
0
3
3
2
0
4
0
0
30,190
secdev/scapy
secdev_scapy/scapy/layers/tuntap.py
scapy.layers.tuntap.LinuxTunIfReq
from scapy.fields import BitField, Field, FlagsField, IntField, StrFixedLenField, XShortEnumField from scapy.packet import Packet, bind_layers class LinuxTunIfReq(Packet): """ Structure to request a specific device name for a tun/tap Linux ``struct ifreq``. See linux/if.h (struct ifreq) and tuntap.tx...
class LinuxTunIfReq(Packet): ''' Structure to request a specific device name for a tun/tap Linux ``struct ifreq``. See linux/if.h (struct ifreq) and tuntap.txt for reference. ''' pass
1
1
0
0
0
0
0
1.4
1
0
0
0
0
0
0
119
13
1
5
2
4
7
2
2
1
0
4
0
0
30,191
secdev/scapy
secdev_scapy/scapy/layers/tuntap.py
scapy.layers.tuntap.LinuxTunPacketInfo
from scapy.fields import BitField, Field, FlagsField, IntField, StrFixedLenField, XShortEnumField from scapy.consts import BIG_ENDIAN, BSD, DARWIN, LINUX from scapy.data import ETHER_TYPES, MTU class LinuxTunPacketInfo(TunPacketInfo): """ Base for TUN packets. See linux/if_tun.h (struct tun_pi) for refere...
class LinuxTunPacketInfo(TunPacketInfo): ''' Base for TUN packets. See linux/if_tun.h (struct tun_pi) for reference. ''' pass
1
1
0
0
0
0
0
0.75
1
0
0
0
0
0
0
119
15
1
8
2
7
6
2
2
1
0
5
0
0
30,192
secdev/scapy
secdev_scapy/scapy/layers/tuntap.py
scapy.layers.tuntap.NativeShortField
from scapy.fields import BitField, Field, FlagsField, IntField, StrFixedLenField, XShortEnumField class NativeShortField(Field): def __init__(self, name, default): Field.__init__(self, name, default, '@H')
class NativeShortField(Field): def __init__(self, name, default): pass
2
0
2
0
2
0
1
0
1
0
0
0
1
0
1
33
3
0
3
2
1
0
3
2
1
1
4
0
1
30,193
secdev/scapy
secdev_scapy/scapy/layers/tuntap.py
scapy.layers.tuntap.TunPacketInfo
from scapy.layers.l2 import Ether from scapy.packet import Packet, bind_layers class TunPacketInfo(Packet): aliastypes = [Ether]
class TunPacketInfo(Packet): pass
1
0
0
0
0
0
0
0
1
0
0
1
0
0
0
119
2
0
2
2
1
0
2
2
1
0
4
0
0
30,194
secdev/scapy
secdev_scapy/scapy/layers/tuntap.py
scapy.layers.tuntap.TunTapInterface
from scapy.data import ETHER_TYPES, MTU from scapy.error import log_runtime, warning from scapy.config import conf from fcntl import ioctl from scapy.interfaces import network_name from scapy.layers.l2 import Ether import time import socket from scapy.consts import BIG_ENDIAN, BSD, DARWIN, LINUX from scapy.supersocket ...
class TunTapInterface(SimpleSocket): ''' A socket to act as the host's peer of a tun / tap interface. This implements kernel interfaces for tun and tap devices. :param iface: The name of the interface to use, eg: 'tun0' :param mode_tun: If True, create as TUN interface (layer 3). ...
5
2
33
5
21
7
6
0.54
1
10
6
0
4
7
4
38
163
31
87
23
81
47
66
22
61
14
5
2
24
30,195
secdev/scapy
secdev_scapy/scapy/layers/usb.py
scapy.layers.usb.USBpcap
from scapy.fields import ByteField, XByteField, ByteEnumField, LEShortField, LEShortEnumField, LEIntField, LEIntEnumField, XLELongField, LenField from scapy.packet import Packet, bind_top_down from scapy.compat import chb class USBpcap(Packet): name = 'USBpcap URB' fields_desc = [ByteField('headerLen', None), ...
class USBpcap(Packet): def post_build(self, p, pay): pass def guess_payload_class(self, payload): pass
3
0
10
0
10
1
4
0.03
1
4
3
0
2
0
2
121
35
2
32
6
29
1
18
6
15
5
4
2
8
30,196
secdev/scapy
secdev_scapy/scapy/layers/usb.py
scapy.layers.usb.USBpcapTransferControl
from scapy.fields import ByteField, XByteField, ByteEnumField, LEShortField, LEShortEnumField, LEIntField, LEIntEnumField, XLELongField, LenField from scapy.packet import Packet, bind_top_down class USBpcapTransferControl(Packet): name = 'USBpcap Transfer Control' fields_desc = [ByteField('stage', 0)]
class USBpcapTransferControl(Packet): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
119
5
0
5
3
4
0
3
3
2
0
4
0
0
30,197
secdev/scapy
secdev_scapy/scapy/layers/usb.py
scapy.layers.usb.USBpcapTransferInterrupt
from scapy.packet import Packet, bind_top_down from scapy.fields import ByteField, XByteField, ByteEnumField, LEShortField, LEShortEnumField, LEIntField, LEIntEnumField, XLELongField, LenField class USBpcapTransferInterrupt(Packet): name = 'USBpcap Transfer Interrupt' fields_desc = [LEIntField('startFrame', 0)...
class USBpcapTransferInterrupt(Packet): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
119
7
0
7
3
6
0
3
3
2
0
4
0
0
30,198
secdev/scapy
secdev_scapy/scapy/layers/usb.py
scapy.layers.usb.USBpcapTransferIsochronous
from scapy.packet import Packet, bind_top_down from scapy.fields import ByteField, XByteField, ByteEnumField, LEShortField, LEShortEnumField, LEIntField, LEIntEnumField, XLELongField, LenField class USBpcapTransferIsochronous(Packet): name = 'USBpcap Transfer Isochronous' fields_desc = [LEIntField('offset', 0)...
class USBpcapTransferIsochronous(Packet): pass
1
0
0
0
0
0
0
0
1
0
0
0
0
0
0
119
7
0
7
3
6
0
3
3
2
0
4
0
0
30,199
secdev/scapy
secdev_scapy/scapy/layers/vrrp.py
scapy.layers.vrrp.VRRP
from scapy.layers.inet import IP, in4_chksum, checksum from scapy.packet import Packet, bind_layers from scapy.fields import BitField, ByteField, FieldLenField, FieldListField, IPField, IP6Field, IntField, MultipleTypeField, StrField, XShortField from scapy.compat import chb, orb class VRRP(Packet): fields_desc = ...
class VRRP(Packet): def post_build(self, p, pay): pass @classmethod def dispatch_hook(cls, _pkt=None, *args, **kargs): pass
4
0
6
0
6
1
3
0.04
1
1
1
0
1
0
2
121
28
2
26
7
22
1
13
6
10
3
4
2
5