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 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
29,600 | secdev/scapy | secdev_scapy/scapy/layers/ssh.py | scapy.layers.ssh.SSHNewCompress | from scapy.fields import BitLenField, ByteField, ByteEnumField, IntEnumField, IntField, PacketField, PacketListField, PacketLenField, FieldLenField, FieldListField, StrLenField, StrFixedLenField, StrNullField, YesNoByteField
from scapy.packet import Packet, bind_bottom_up, bind_layers
class SSHNewCompress(Packet):
... |
class SSHNewCompress(Packet):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 119 | 4 | 0 | 4 | 2 | 3 | 0 | 2 | 2 | 1 | 0 | 4 | 0 | 0 |
29,601 | secdev/scapy | secdev_scapy/scapy/layers/ssh.py | scapy.layers.ssh.SSHNewKeys | from scapy.packet import Packet, bind_bottom_up, bind_layers
from scapy.fields import BitLenField, ByteField, ByteEnumField, IntEnumField, IntField, PacketField, PacketListField, PacketLenField, FieldLenField, FieldListField, StrLenField, StrFixedLenField, StrNullField, YesNoByteField
class SSHNewKeys(Packet):
fie... |
class SSHNewKeys(Packet):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 119 | 4 | 0 | 4 | 2 | 3 | 0 | 2 | 2 | 1 | 0 | 4 | 0 | 0 |
29,602 | secdev/scapy | secdev_scapy/scapy/layers/ssh.py | scapy.layers.ssh.SSHPacketStringField | from scapy.fields import BitLenField, ByteField, ByteEnumField, IntEnumField, IntField, PacketField, PacketListField, PacketLenField, FieldLenField, FieldListField, StrLenField, StrFixedLenField, StrNullField, YesNoByteField
class SSHPacketStringField(PacketField):
__slots__ = ['sub_cls']
def __init__(self, n... |
class SSHPacketStringField(PacketField):
def __init__(self, name, sub_cls):
pass
def m2i(self, pkt, x):
pass | 3 | 0 | 4 | 0 | 4 | 0 | 1 | 0 | 1 | 2 | 1 | 0 | 2 | 1 | 2 | 48 | 11 | 2 | 9 | 5 | 6 | 0 | 9 | 5 | 6 | 1 | 8 | 0 | 2 |
29,603 | secdev/scapy | secdev_scapy/scapy/layers/ssh.py | scapy.layers.ssh.SSHPublicKey | from scapy.fields import BitLenField, ByteField, ByteEnumField, IntEnumField, IntField, PacketField, PacketListField, PacketLenField, FieldLenField, FieldListField, StrLenField, StrFixedLenField, StrNullField, YesNoByteField
from scapy.config import conf
from scapy.packet import Packet, bind_bottom_up, bind_layers
cla... |
class SSHPublicKey(Packet):
def default_payload_class(self, payload):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 120 | 8 | 1 | 7 | 3 | 5 | 0 | 4 | 3 | 2 | 1 | 4 | 0 | 1 |
29,604 | secdev/scapy | secdev_scapy/scapy/layers/ssh.py | scapy.layers.ssh.SSHPublicKeyEd25519 | from scapy.packet import Packet, bind_bottom_up, bind_layers
from scapy.fields import BitLenField, ByteField, ByteEnumField, IntEnumField, IntField, PacketField, PacketListField, PacketLenField, FieldLenField, FieldListField, StrLenField, StrFixedLenField, StrNullField, YesNoByteField
from scapy.config import conf
cla... |
class SSHPublicKeyEd25519(Packet):
def default_payload_class(self, payload):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 120 | 7 | 1 | 6 | 3 | 4 | 0 | 4 | 3 | 2 | 1 | 4 | 0 | 1 |
29,605 | secdev/scapy | secdev_scapy/scapy/layers/ssh.py | scapy.layers.ssh.SSHPublicKeyEd448 | from scapy.packet import Packet, bind_bottom_up, bind_layers
from scapy.fields import BitLenField, ByteField, ByteEnumField, IntEnumField, IntField, PacketField, PacketListField, PacketLenField, FieldLenField, FieldListField, StrLenField, StrFixedLenField, StrNullField, YesNoByteField
from scapy.config import conf
cla... |
class SSHPublicKeyEd448(Packet):
def default_payload_class(self, payload):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 120 | 7 | 1 | 6 | 3 | 4 | 0 | 4 | 3 | 2 | 1 | 4 | 0 | 1 |
29,606 | secdev/scapy | secdev_scapy/scapy/layers/ssh.py | scapy.layers.ssh.SSHServiceAccept | from scapy.packet import Packet, bind_bottom_up, bind_layers
from scapy.fields import BitLenField, ByteField, ByteEnumField, IntEnumField, IntField, PacketField, PacketListField, PacketLenField, FieldLenField, FieldListField, StrLenField, StrFixedLenField, StrNullField, YesNoByteField
class SSHServiceAccept(Packet):
... |
class SSHServiceAccept(Packet):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 119 | 5 | 0 | 5 | 2 | 4 | 0 | 2 | 2 | 1 | 0 | 4 | 0 | 0 |
29,607 | secdev/scapy | secdev_scapy/scapy/layers/ssh.py | scapy.layers.ssh.SSHServiceDebug | from scapy.fields import BitLenField, ByteField, ByteEnumField, IntEnumField, IntField, PacketField, PacketListField, PacketLenField, FieldLenField, FieldListField, StrLenField, StrFixedLenField, StrNullField, YesNoByteField
from scapy.packet import Packet, bind_bottom_up, bind_layers
class SSHServiceDebug(Packet):
... |
class SSHServiceDebug(Packet):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 119 | 7 | 0 | 7 | 2 | 6 | 0 | 2 | 2 | 1 | 0 | 4 | 0 | 0 |
29,608 | secdev/scapy | secdev_scapy/scapy/layers/ssh.py | scapy.layers.ssh.SSHServiceRequest | from scapy.fields import BitLenField, ByteField, ByteEnumField, IntEnumField, IntField, PacketField, PacketListField, PacketLenField, FieldLenField, FieldListField, StrLenField, StrFixedLenField, StrNullField, YesNoByteField
from scapy.packet import Packet, bind_bottom_up, bind_layers
class SSHServiceRequest(Packet):
... |
class SSHServiceRequest(Packet):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 119 | 5 | 0 | 5 | 2 | 4 | 0 | 2 | 2 | 1 | 0 | 4 | 0 | 0 |
29,609 | secdev/scapy | secdev_scapy/scapy/layers/ssh.py | scapy.layers.ssh.SSHSignature | from scapy.config import conf
from scapy.fields import BitLenField, ByteField, ByteEnumField, IntEnumField, IntField, PacketField, PacketListField, PacketLenField, FieldLenField, FieldListField, StrLenField, StrFixedLenField, StrNullField, YesNoByteField
from scapy.packet import Packet, bind_bottom_up, bind_layers
cla... |
class SSHSignature(Packet):
def default_payload_class(self, payload):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 120 | 8 | 1 | 7 | 3 | 5 | 0 | 4 | 3 | 2 | 1 | 4 | 0 | 1 |
29,610 | secdev/scapy | secdev_scapy/scapy/layers/ssh.py | scapy.layers.ssh.SSHSignatureEd25519 | from scapy.packet import Packet, bind_bottom_up, bind_layers
from scapy.config import conf
from scapy.fields import BitLenField, ByteField, ByteEnumField, IntEnumField, IntField, PacketField, PacketListField, PacketLenField, FieldLenField, FieldListField, StrLenField, StrFixedLenField, StrNullField, YesNoByteField
cla... |
class SSHSignatureEd25519(Packet):
def default_payload_class(self, payload):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 120 | 7 | 1 | 6 | 3 | 4 | 0 | 4 | 3 | 2 | 1 | 4 | 0 | 1 |
29,611 | secdev/scapy | secdev_scapy/scapy/layers/ssh.py | scapy.layers.ssh.SSHSignatureEd448 | from scapy.config import conf
from scapy.fields import BitLenField, ByteField, ByteEnumField, IntEnumField, IntField, PacketField, PacketListField, PacketLenField, FieldLenField, FieldListField, StrLenField, StrFixedLenField, StrNullField, YesNoByteField
from scapy.packet import Packet, bind_bottom_up, bind_layers
cla... |
class SSHSignatureEd448(Packet):
def default_payload_class(self, payload):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 120 | 7 | 1 | 6 | 3 | 4 | 0 | 4 | 3 | 2 | 1 | 4 | 0 | 1 |
29,612 | secdev/scapy | secdev_scapy/scapy/layers/ssh.py | scapy.layers.ssh.SSHString | from scapy.fields import BitLenField, ByteField, ByteEnumField, IntEnumField, IntField, PacketField, PacketListField, PacketLenField, FieldLenField, FieldListField, StrLenField, StrFixedLenField, StrNullField, YesNoByteField
from scapy.packet import Packet, bind_bottom_up, bind_layers
from scapy.config import conf
cla... |
class SSHString(Packet):
def default_payload_class(self, payload):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 120 | 8 | 1 | 7 | 3 | 5 | 0 | 4 | 3 | 2 | 1 | 4 | 0 | 1 |
29,613 | secdev/scapy | secdev_scapy/scapy/layers/ssh.py | scapy.layers.ssh.SSHUnimplemented | from scapy.fields import BitLenField, ByteField, ByteEnumField, IntEnumField, IntField, PacketField, PacketListField, PacketLenField, FieldLenField, FieldListField, StrLenField, StrFixedLenField, StrNullField, YesNoByteField
from scapy.packet import Packet, bind_bottom_up, bind_layers
class SSHUnimplemented(Packet):
... |
class SSHUnimplemented(Packet):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 119 | 5 | 0 | 5 | 2 | 4 | 0 | 2 | 2 | 1 | 0 | 4 | 0 | 0 |
29,614 | secdev/scapy | secdev_scapy/scapy/layers/ssh.py | scapy.layers.ssh.SSHVersionExchange | from scapy.compat import plain_str
from scapy.layers.inet import TCP
from scapy.packet import Packet, bind_bottom_up, bind_layers
class SSHVersionExchange(Packet):
name = 'SSH - Protocol Version Exchange'
fields_desc = [_SSHHeaderField('lines', [], StrCRLFField('', b''))]
def mysummary(self):
retu... |
class SSHVersionExchange(Packet):
def mysummary(self):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 1 | 0 | 1 | 120 | 12 | 1 | 11 | 4 | 9 | 0 | 5 | 4 | 3 | 1 | 4 | 0 | 1 |
29,615 | secdev/scapy | secdev_scapy/scapy/layers/ssh.py | scapy.layers.ssh.StrCRLFField | from scapy.fields import BitLenField, ByteField, ByteEnumField, IntEnumField, IntField, PacketField, PacketListField, PacketLenField, FieldLenField, FieldListField, StrLenField, StrFixedLenField, StrNullField, YesNoByteField
class StrCRLFField(StrNullField):
DELIMITER = b'\r\n' |
class StrCRLFField(StrNullField):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 44 | 2 | 0 | 2 | 2 | 1 | 0 | 2 | 2 | 1 | 0 | 7 | 0 | 0 |
29,616 | secdev/scapy | secdev_scapy/scapy/layers/ssh.py | scapy.layers.ssh._ComaStrField | from scapy.fields import BitLenField, ByteField, ByteEnumField, IntEnumField, IntField, PacketField, PacketListField, PacketLenField, FieldLenField, FieldListField, StrLenField, StrFixedLenField, StrNullField, YesNoByteField
class _ComaStrField(StrLenField):
islist = 1
def m2i(self, pkt, x):
return su... |
class _ComaStrField(StrLenField):
def m2i(self, pkt, x):
pass
def i2m(self, pkt, x):
pass | 3 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 1 | 0 | 0 | 2 | 0 | 2 | 45 | 8 | 2 | 6 | 4 | 3 | 0 | 6 | 4 | 3 | 1 | 7 | 0 | 2 |
29,617 | secdev/scapy | secdev_scapy/scapy/layers/ssh.py | scapy.layers.ssh._SSHCertificate | from scapy.fields import BitLenField, ByteField, ByteEnumField, IntEnumField, IntField, PacketField, PacketListField, PacketLenField, FieldLenField, FieldListField, StrLenField, StrFixedLenField, StrNullField, YesNoByteField
class _SSHCertificate(PacketField):
def m2i(self, pkt, x):
return _SSH_certificat... |
class _SSHCertificate(PacketField):
def m2i(self, pkt, x):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 47 | 3 | 0 | 3 | 2 | 1 | 0 | 3 | 2 | 1 | 1 | 8 | 0 | 1 |
29,618 | secdev/scapy | secdev_scapy/scapy/layers/ssh.py | scapy.layers.ssh._SSHHeaderField | from scapy.fields import BitLenField, ByteField, ByteEnumField, IntEnumField, IntField, PacketField, PacketListField, PacketLenField, FieldLenField, FieldListField, StrLenField, StrFixedLenField, StrNullField, YesNoByteField
class _SSHHeaderField(FieldListField):
def getfield(self, pkt, s):
val = []
... |
class _SSHHeaderField(FieldListField):
def getfield(self, pkt, s):
pass | 2 | 0 | 8 | 0 | 8 | 0 | 3 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 40 | 9 | 0 | 9 | 4 | 7 | 0 | 9 | 4 | 7 | 3 | 5 | 2 | 3 |
29,619 | secdev/scapy | secdev_scapy/scapy/layers/ssh.py | scapy.layers.ssh._SSHPublicKey | from scapy.fields import BitLenField, ByteField, ByteEnumField, IntEnumField, IntField, PacketField, PacketListField, PacketLenField, FieldLenField, FieldListField, StrLenField, StrFixedLenField, StrNullField, YesNoByteField
class _SSHPublicKey(PacketField):
def m2i(self, pkt, x):
return _SSH_publickeys.g... |
class _SSHPublicKey(PacketField):
def m2i(self, pkt, x):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 47 | 3 | 0 | 3 | 2 | 1 | 0 | 3 | 2 | 1 | 1 | 8 | 0 | 1 |
29,620 | secdev/scapy | secdev_scapy/scapy/layers/ssh.py | scapy.layers.ssh._SSHSignature | from scapy.fields import BitLenField, ByteField, ByteEnumField, IntEnumField, IntField, PacketField, PacketListField, PacketLenField, FieldLenField, FieldListField, StrLenField, StrFixedLenField, StrNullField, YesNoByteField
class _SSHSignature(PacketField):
def m2i(self, pkt, x):
return _SSH_signatures.g... |
class _SSHSignature(PacketField):
def m2i(self, pkt, x):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 47 | 3 | 0 | 3 | 2 | 1 | 0 | 3 | 2 | 1 | 1 | 8 | 0 | 1 |
29,621 | secdev/scapy | secdev_scapy/scapy/layers/tftp.py | scapy.layers.tftp.TFTP | from scapy.packet import Packet, bind_layers, split_bottom_up, bind_bottom_up
from scapy.fields import PacketListField, ShortEnumField, ShortField, StrNullField
class TFTP(Packet):
name = 'TFTP opcode'
fields_desc = [ShortEnumField('op', 1, TFTP_operations)] |
class TFTP(Packet):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 119 | 3 | 0 | 3 | 3 | 2 | 0 | 3 | 3 | 2 | 0 | 4 | 0 | 0 |
29,622 | secdev/scapy | secdev_scapy/scapy/layers/tftp.py | scapy.layers.tftp.TFTP_ACK | from scapy.fields import PacketListField, ShortEnumField, ShortField, StrNullField
from scapy.layers.inet import UDP, IP
from scapy.packet import Packet, bind_layers, split_bottom_up, bind_bottom_up
class TFTP_ACK(Packet):
name = 'TFTP Ack'
fields_desc = [ShortField('block', 0)]
def answers(self, other):
... |
class TFTP_ACK(Packet):
def answers(self, other):
pass
def mysummary(self):
pass | 3 | 0 | 4 | 0 | 4 | 1 | 2 | 0.09 | 1 | 5 | 5 | 0 | 2 | 0 | 2 | 121 | 13 | 2 | 11 | 5 | 8 | 1 | 10 | 5 | 7 | 3 | 4 | 1 | 4 |
29,623 | secdev/scapy | secdev_scapy/scapy/layers/tftp.py | scapy.layers.tftp.TFTP_DATA | from scapy.layers.inet import UDP, IP
from scapy.packet import Packet, bind_layers, split_bottom_up, bind_bottom_up
from scapy.fields import PacketListField, ShortEnumField, ShortField, StrNullField
class TFTP_DATA(Packet):
name = 'TFTP Data'
fields_desc = [ShortField('block', 0)]
def answers(self, other)... |
class TFTP_DATA(Packet):
def answers(self, other):
pass
def mysummary(self):
pass | 3 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 2 | 2 | 0 | 2 | 0 | 2 | 121 | 9 | 2 | 7 | 5 | 4 | 0 | 7 | 5 | 4 | 1 | 4 | 0 | 2 |
29,624 | secdev/scapy | secdev_scapy/scapy/layers/tftp.py | scapy.layers.tftp.TFTP_ERROR | from scapy.packet import Packet, bind_layers, split_bottom_up, bind_bottom_up
from scapy.fields import PacketListField, ShortEnumField, ShortField, StrNullField
from scapy.layers.inet import UDP, IP
class TFTP_ERROR(Packet):
name = 'TFTP Error'
fields_desc = [ShortEnumField('errorcode', 0, TFTP_Error_Codes), S... |
class TFTP_ERROR(Packet):
def answers(self, other):
pass
def mysummary(self):
pass | 3 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 5 | 5 | 0 | 2 | 0 | 2 | 121 | 10 | 2 | 8 | 5 | 5 | 0 | 7 | 5 | 4 | 1 | 4 | 0 | 2 |
29,625 | secdev/scapy | secdev_scapy/scapy/layers/tftp.py | scapy.layers.tftp.TFTP_OACK | from scapy.packet import Packet, bind_layers, split_bottom_up, bind_bottom_up
class TFTP_OACK(Packet):
name = 'TFTP Option Ack'
fields_desc = []
def answers(self, other):
return isinstance(other, (TFTP_WRQ, TFTP_RRQ)) |
class TFTP_OACK(Packet):
def answers(self, other):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 2 | 2 | 0 | 1 | 0 | 1 | 120 | 6 | 1 | 5 | 4 | 3 | 0 | 5 | 4 | 3 | 1 | 4 | 0 | 1 |
29,626 | secdev/scapy | secdev_scapy/scapy/layers/tftp.py | scapy.layers.tftp.TFTP_Option | from scapy.fields import PacketListField, ShortEnumField, ShortField, StrNullField
from scapy.packet import Packet, bind_layers, split_bottom_up, bind_bottom_up
class TFTP_Option(Packet):
fields_desc = [StrNullField('oname', ''), StrNullField('value', '')]
def extract_padding(self, pkt):
return ('', p... |
class TFTP_Option(Packet):
def extract_padding(self, pkt):
pass | 2 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 120 | 6 | 1 | 5 | 3 | 3 | 0 | 4 | 3 | 2 | 1 | 4 | 0 | 1 |
29,627 | secdev/scapy | secdev_scapy/scapy/layers/tftp.py | scapy.layers.tftp.TFTP_Options | from scapy.fields import PacketListField, ShortEnumField, ShortField, StrNullField
from scapy.packet import Packet, bind_layers, split_bottom_up, bind_bottom_up
class TFTP_Options(Packet):
fields_desc = [PacketListField('options', [], TFTP_Option, length_from=lambda x: None)] |
class TFTP_Options(Packet):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 119 | 2 | 0 | 2 | 2 | 1 | 1 | 2 | 2 | 1 | 0 | 4 | 0 | 0 |
29,628 | secdev/scapy | secdev_scapy/scapy/layers/tftp.py | scapy.layers.tftp.TFTP_RRQ | from scapy.packet import Packet, bind_layers, split_bottom_up, bind_bottom_up
from scapy.layers.inet import UDP, IP
from scapy.fields import PacketListField, ShortEnumField, ShortField, StrNullField
class TFTP_RRQ(Packet):
name = 'TFTP Read Request'
fields_desc = [StrNullField('filename', ''), StrNullField('mo... |
class TFTP_RRQ(Packet):
def answers(self, other):
pass
def mysummary(self):
pass | 3 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 2 | 0 | 2 | 121 | 10 | 2 | 8 | 5 | 5 | 0 | 7 | 5 | 4 | 1 | 4 | 0 | 2 |
29,629 | secdev/scapy | secdev_scapy/scapy/layers/tftp.py | scapy.layers.tftp.TFTP_RRQ_server | import random
import os
from scapy.sessions import IPSession
from scapy.packet import Packet, bind_layers, split_bottom_up, bind_bottom_up
from scapy.base_classes import Net
from scapy.layers.inet import UDP, IP
from scapy.automaton import ATMT, Automaton
from scapy.config import conf
class TFTP_RRQ_server(Automaton):... |
class TFTP_RRQ_server(Automaton):
'''
TFTP automaton to serve local files
You can't use 'store' and 'dir' at the same time.
:param store: (optional) a dictionary that contains the file data, like
{"thefile": b"data"}.
:param dir: (optional) a folder that contains the data file dat... | 29 | 1 | 5 | 0 | 5 | 0 | 2 | 0.1 | 1 | 10 | 9 | 0 | 15 | 14 | 15 | 63 | 109 | 16 | 90 | 48 | 61 | 9 | 75 | 34 | 59 | 8 | 4 | 4 | 30 |
29,630 | secdev/scapy | secdev_scapy/scapy/layers/tftp.py | scapy.layers.tftp.TFTP_WRQ | from scapy.layers.inet import UDP, IP
from scapy.packet import Packet, bind_layers, split_bottom_up, bind_bottom_up
from scapy.fields import PacketListField, ShortEnumField, ShortField, StrNullField
class TFTP_WRQ(Packet):
name = 'TFTP Write Request'
fields_desc = [StrNullField('filename', ''), StrNullField('m... |
class TFTP_WRQ(Packet):
def answers(self, other):
pass
def mysummary(self):
pass | 3 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 1 | 1 | 0 | 2 | 0 | 2 | 121 | 10 | 2 | 8 | 5 | 5 | 0 | 7 | 5 | 4 | 1 | 4 | 0 | 2 |
29,631 | secdev/scapy | secdev_scapy/scapy/layers/tftp.py | scapy.layers.tftp.TFTP_WRQ_server | from scapy.automaton import ATMT, Automaton
import random
from scapy.config import conf
from scapy.layers.inet import UDP, IP
from scapy.base_classes import Net
from scapy.packet import Packet, bind_layers, split_bottom_up, bind_bottom_up
from scapy.sessions import IPSession
class TFTP_WRQ_server(Automaton):
"""
... |
class TFTP_WRQ_server(Automaton):
'''
TFTP automaton to wait for incoming files
:param ip: (optional) the local IP to listen on.
:param sport: (optional) the local port (by default: random)
'''
def parse_args(self, ip=None, sport=None, *args, **kargs):
pass
def master_filter(s... | 21 | 1 | 5 | 0 | 5 | 0 | 2 | 0.08 | 1 | 9 | 8 | 0 | 11 | 10 | 11 | 59 | 78 | 11 | 64 | 35 | 43 | 5 | 54 | 26 | 42 | 3 | 4 | 2 | 17 |
29,632 | secdev/scapy | secdev_scapy/scapy/layers/tftp.py | scapy.layers.tftp.TFTP_read | from scapy.base_classes import Net
from scapy.automaton import ATMT, Automaton
from scapy.config import conf
from scapy.layers.inet import UDP, IP
from scapy.volatile import RandShort
from scapy.packet import Packet, bind_layers, split_bottom_up, bind_bottom_up
class TFTP_read(Automaton):
"""
TFTP automaton to... |
class TFTP_read(Automaton):
'''
TFTP automaton to read a remote file on a TFTP server.
:param filename: the name of the remote file to read.
:param server: the host on which to read (IP or name).
:param sport: (optional) the source port to use. (default: random)
:param port: (optional) the TFTP... | 23 | 1 | 5 | 0 | 5 | 0 | 1 | 0.17 | 1 | 8 | 8 | 0 | 12 | 11 | 12 | 60 | 89 | 14 | 66 | 35 | 43 | 11 | 53 | 25 | 40 | 3 | 4 | 2 | 17 |
29,633 | secdev/scapy | secdev_scapy/scapy/layers/tftp.py | scapy.layers.tftp.TFTP_write | from scapy.volatile import RandShort
from scapy.config import conf
from scapy.base_classes import Net
from scapy.automaton import ATMT, Automaton
from scapy.packet import Packet, bind_layers, split_bottom_up, bind_bottom_up
from scapy.layers.inet import UDP, IP
class TFTP_write(Automaton):
"""
TFTP automaton t... |
class TFTP_write(Automaton):
'''
TFTP automaton to write a local file onto a TFTP server.
:param filename: the name of the remote file to write.
:param data: the bytes data to write.
:param server: the host on which to read (IP or name).
:param sport: (optional) the source port to use. (default... | 21 | 1 | 5 | 0 | 5 | 0 | 1 | 0.18 | 1 | 9 | 8 | 0 | 11 | 13 | 11 | 59 | 82 | 13 | 61 | 34 | 40 | 11 | 49 | 25 | 37 | 3 | 4 | 2 | 15 |
29,634 | secdev/scapy | secdev_scapy/scapy/layers/tls/automaton.py | scapy.layers.tls.automaton._TLSAutomaton | from scapy.error import log_interactive
from scapy.layers.tls.record_sslv2 import SSLv2
from scapy.config import conf
from scapy.layers.tls.cert import Cert, PrivKey
from scapy.layers.tls.basefields import _tls_type
from scapy.layers.tls.record_tls13 import TLS13
import socket
from scapy.packet import Raw
from scapy.au... |
class _TLSAutomaton(Automaton):
'''
SSLv3 and TLS 1.0-1.2 typically need a 2-RTT handshake:
Client Server
| --------->>> | C1 - ClientHello
| <<<--------- | S1 - ServerHello
| <<<--------- | S1 - Certificate
| <<<--------- | S1 - ServerKeyExchange
| <<<-----... | 10 | 7 | 23 | 1 | 17 | 5 | 5 | 0.54 | 1 | 8 | 6 | 2 | 9 | 9 | 9 | 57 | 256 | 28 | 151 | 31 | 141 | 81 | 120 | 30 | 110 | 23 | 4 | 4 | 45 |
29,635 | secdev/scapy | secdev_scapy/scapy/layers/tls/automaton_cli.py | scapy.layers.tls.automaton_cli.TLSClientAutomaton | from scapy.error import warning
from scapy.layers.tls.record import TLSAlert, TLSChangeCipherSpec, TLSApplicationData
from scapy.layers.tls.extensions import ServerName, TLS_Ext_PSKKeyExchangeModes, TLS_Ext_PostHandshakeAuth, TLS_Ext_ServerName, TLS_Ext_SignatureAlgorithms, TLS_Ext_SupportedGroups, TLS_Ext_SupportedVer... |
class TLSClientAutomaton(_TLSAutomaton):
'''
A simple TLS test client automaton. Try to overload some states or
conditions and see what happens on the other side.
Rather than with an interruption, the best way to stop this client is by
typing 'quit'. This won't be a message sent to the server.
... | 346 | 13 | 6 | 0 | 5 | 1 | 1 | 0.16 | 1 | 53 | 46 | 0 | 176 | 23 | 176 | 233 | 1,383 | 224 | 1,005 | 429 | 647 | 162 | 719 | 246 | 542 | 19 | 5 | 6 | 262 |
29,636 | secdev/scapy | secdev_scapy/scapy/layers/tls/automaton_srv.py | scapy.layers.tls.automaton_srv.TLSServerAutomaton | from scapy.layers.tls.handshake_sslv2 import SSLv2ClientCertificate, SSLv2ClientFinished, SSLv2ClientHello, SSLv2ClientMasterKey, SSLv2RequestCertificate, SSLv2ServerFinished, SSLv2ServerHello, SSLv2ServerVerify
from scapy.layers.tls.basefields import _tls_version
from scapy.layers.tls.record_tls13 import TLS13
from sc... |
class TLSServerAutomaton(_TLSAutomaton):
'''
A simple TLS test server automaton. Try to overload some states or
conditions and see what happens on the other side.
Because of socket and automaton limitations, for now, the best way to
interrupt the server is by sending him 'stop_server'. Interruption... | 312 | 9 | 7 | 0 | 6 | 1 | 2 | 0.13 | 1 | 56 | 48 | 0 | 158 | 24 | 158 | 215 | 1,405 | 204 | 1,074 | 452 | 749 | 140 | 829 | 282 | 670 | 15 | 5 | 6 | 278 |
29,637 | secdev/scapy | secdev_scapy/scapy/layers/tls/basefields.py | scapy.layers.tls.basefields._SSLv2LengthField | import struct
class _SSLv2LengthField(_TLSLengthField):
def i2repr(self, pkt, x):
s = super(_SSLv2LengthField, self).i2repr(pkt, x)
if pkt.with_padding:
x |= 32768
s += ' [with padding: %s]' % hex(x)
return s
def getfield(self, pkt, s):
msglen = stru... |
class _SSLv2LengthField(_TLSLengthField):
def i2repr(self, pkt, x):
pass
def getfield(self, pkt, s):
pass | 3 | 0 | 8 | 0 | 7 | 1 | 2 | 0.13 | 1 | 1 | 0 | 0 | 2 | 0 | 2 | 36 | 18 | 1 | 15 | 6 | 12 | 2 | 14 | 6 | 11 | 2 | 6 | 1 | 4 |
29,638 | secdev/scapy | secdev_scapy/scapy/layers/tls/basefields.py | scapy.layers.tls.basefields._SSLv2MACField | class _SSLv2MACField(_TLSMACField):
pass | class _SSLv2MACField(_TLSMACField):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 45 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 7 | 0 | 0 |
29,639 | secdev/scapy | secdev_scapy/scapy/layers/tls/basefields.py | scapy.layers.tls.basefields._SSLv2PadField | class _SSLv2PadField(_TLSPadField):
def getfield(self, pkt, s):
if pkt.padlen is not None:
tmp_len = pkt.padlen
return (s[tmp_len:], self.m2i(pkt, s[:tmp_len]))
return (s, None) | class _SSLv2PadField(_TLSPadField):
def getfield(self, pkt, s):
pass | 2 | 0 | 5 | 0 | 5 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 46 | 6 | 0 | 6 | 3 | 4 | 0 | 6 | 3 | 4 | 2 | 7 | 1 | 2 |
29,640 | secdev/scapy | secdev_scapy/scapy/layers/tls/basefields.py | scapy.layers.tls.basefields._SSLv2PadLenField | from scapy.fields import ByteField, ShortEnumField, ShortField, StrField
class _SSLv2PadLenField(_TLSPadLenField):
def getfield(self, pkt, s):
if pkt.with_padding:
return ByteField.getfield(self, pkt, s)
return (s, None) |
class _SSLv2PadLenField(_TLSPadLenField):
def getfield(self, pkt, s):
pass | 2 | 0 | 4 | 0 | 4 | 0 | 2 | 0 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 36 | 5 | 0 | 5 | 2 | 3 | 0 | 5 | 2 | 3 | 2 | 6 | 1 | 2 |
29,641 | secdev/scapy | secdev_scapy/scapy/layers/tls/basefields.py | scapy.layers.tls.basefields._TLSClientVersionField | from scapy.fields import ByteField, ShortEnumField, ShortField, StrField
class _TLSClientVersionField(ShortEnumField):
"""
We use the advertised_tls_version if it has been defined,
and the legacy 0x0303 for TLS 1.3 packets.
"""
def i2h(self, pkt, x):
if x is None:
v = pkt.tls_s... |
class _TLSClientVersionField(ShortEnumField):
'''
We use the advertised_tls_version if it has been defined,
and the legacy 0x0303 for TLS 1.3 packets.
'''
def i2h(self, pkt, x):
pass
def i2m(self, pkt, x):
pass | 3 | 1 | 7 | 0 | 7 | 0 | 3 | 0.27 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 43 | 21 | 2 | 15 | 5 | 12 | 4 | 15 | 5 | 12 | 3 | 7 | 2 | 6 |
29,642 | secdev/scapy | secdev_scapy/scapy/layers/tls/basefields.py | scapy.layers.tls.basefields._TLSIVField | from scapy.fields import ByteField, ShortEnumField, ShortField, StrField
class _TLSIVField(StrField):
"""
As stated in Section 6.2.3.2. RFC 4346, TLS 1.1 implements an explicit IV
mechanism. For that reason, the behavior of the field is dependent on the
TLS version found in the packet if available or o... |
class _TLSIVField(StrField):
'''
As stated in Section 6.2.3.2. RFC 4346, TLS 1.1 implements an explicit IV
mechanism. For that reason, the behavior of the field is dependent on the
TLS version found in the packet if available or otherwise (on build, if
not overloaded, it is provided by the session)... | 6 | 1 | 5 | 0 | 5 | 0 | 2 | 0.41 | 1 | 0 | 0 | 0 | 5 | 0 | 5 | 45 | 43 | 5 | 27 | 10 | 21 | 11 | 25 | 10 | 19 | 5 | 6 | 2 | 12 |
29,643 | secdev/scapy | secdev_scapy/scapy/layers/tls/basefields.py | scapy.layers.tls.basefields._TLSLengthField | from scapy.fields import ByteField, ShortEnumField, ShortField, StrField
class _TLSLengthField(ShortField):
def i2repr(self, pkt, x):
s = super(_TLSLengthField, self).i2repr(pkt, x)
if pkt.deciphered_len is not None:
dx = pkt.deciphered_len
ds = super(_TLSLengthField, self)... |
class _TLSLengthField(ShortField):
def i2repr(self, pkt, x):
pass | 2 | 0 | 7 | 0 | 7 | 0 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 34 | 8 | 0 | 8 | 5 | 6 | 0 | 8 | 5 | 6 | 2 | 5 | 1 | 2 |
29,644 | secdev/scapy | secdev_scapy/scapy/layers/tls/basefields.py | scapy.layers.tls.basefields._TLSMACField | from scapy.fields import ByteField, ShortEnumField, ShortField, StrField
class _TLSMACField(StrField):
def i2len(self, pkt, i):
if i is not None:
return len(i)
return pkt.tls_session.wcs.mac_len
def i2m(self, pkt, x):
if x is None:
return b''
return x
... |
class _TLSMACField(StrField):
def i2len(self, pkt, i):
pass
def i2m(self, pkt, x):
pass
def addfield(self, pkt, s, val):
pass
def getfield(self, pkt, s):
pass
def i2repr(self, pkt, x):
pass | 6 | 0 | 5 | 0 | 4 | 1 | 2 | 0.14 | 1 | 0 | 0 | 1 | 5 | 0 | 5 | 45 | 28 | 4 | 21 | 7 | 15 | 3 | 18 | 7 | 12 | 2 | 6 | 1 | 8 |
29,645 | secdev/scapy | secdev_scapy/scapy/layers/tls/basefields.py | scapy.layers.tls.basefields._TLSPadField | from scapy.fields import ByteField, ShortEnumField, ShortField, StrField
from scapy.compat import orb
class _TLSPadField(StrField):
def i2len(self, pkt, i):
if i is not None:
return len(i)
return 0
def i2m(self, pkt, x):
if x is None:
return b''
return ... |
class _TLSPadField(StrField):
def i2len(self, pkt, i):
pass
def i2m(self, pkt, x):
pass
def addfield(self, pkt, s, val):
pass
def getfield(self, pkt, s):
pass
def i2repr(self, pkt, x):
pass | 6 | 0 | 5 | 0 | 3 | 1 | 2 | 0.39 | 1 | 0 | 0 | 1 | 5 | 0 | 5 | 45 | 29 | 4 | 18 | 7 | 12 | 7 | 18 | 7 | 12 | 2 | 6 | 1 | 8 |
29,646 | secdev/scapy | secdev_scapy/scapy/layers/tls/basefields.py | scapy.layers.tls.basefields._TLSPadLenField | from scapy.fields import ByteField, ShortEnumField, ShortField, StrField
class _TLSPadLenField(ByteField):
def addfield(self, pkt, s, val):
return s
def getfield(self, pkt, s):
if pkt.tls_session.consider_read_padding():
return ByteField.getfield(self, pkt, s)
return (s, N... |
class _TLSPadLenField(ByteField):
def addfield(self, pkt, s, val):
pass
def getfield(self, pkt, s):
pass | 3 | 0 | 4 | 0 | 3 | 1 | 2 | 0.14 | 1 | 0 | 0 | 1 | 2 | 0 | 2 | 35 | 9 | 1 | 7 | 3 | 4 | 1 | 7 | 3 | 4 | 2 | 5 | 1 | 3 |
29,647 | secdev/scapy | secdev_scapy/scapy/layers/tls/basefields.py | scapy.layers.tls.basefields._TLSVersionField | from scapy.fields import ByteField, ShortEnumField, ShortField, StrField
class _TLSVersionField(ShortEnumField):
"""
We use the tls_version if it has been defined, else the advertised version.
Also, the legacy 0x0301 is used for TLS 1.3 packets.
"""
def i2h(self, pkt, x):
if x is None:
... |
class _TLSVersionField(ShortEnumField):
'''
We use the tls_version if it has been defined, else the advertised version.
Also, the legacy 0x0301 is used for TLS 1.3 packets.
'''
def i2h(self, pkt, x):
pass
def i2m(self, pkt, x):
pass | 3 | 1 | 9 | 0 | 9 | 0 | 3 | 0.21 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 43 | 25 | 2 | 19 | 7 | 16 | 4 | 17 | 7 | 14 | 3 | 7 | 2 | 6 |
29,648 | secdev/scapy | secdev_scapy/scapy/layers/tls/cert.py | scapy.layers.tls.cert.CRL | import time
from scapy.compat import raw, bytes_encode
class CRL(metaclass=_CRLMaker):
"""
Wrapper for the X509_CRL from layers/x509.py.
Use the 'x509CRL' attribute to access original object.
"""
def import_from_asn1pkt(self, crl):
error_msg = 'Unable to import CRL'
self.x509CRL = ... |
class CRL(metaclass=_CRLMaker):
'''
Wrapper for the X509_CRL from layers/x509.py.
Use the 'x509CRL' attribute to access original object.
'''
def import_from_asn1pkt(self, crl):
pass
def isIssuerCert(self, other):
pass
def verify(self, anchors):
pass
def show(... | 5 | 1 | 19 | 2 | 16 | 1 | 5 | 0.09 | 1 | 1 | 0 | 0 | 4 | 17 | 4 | 19 | 84 | 12 | 66 | 31 | 61 | 6 | 65 | 31 | 60 | 14 | 4 | 3 | 18 |
29,649 | secdev/scapy | secdev_scapy/scapy/layers/tls/cert.py | scapy.layers.tls.cert.Cert | import time
from scapy.compat import raw, bytes_encode
from scapy.layers.tls.crypto.pkcs1 import pkcs_os2ip, _get_hash, _EncryptAndVerifyRSA, _DecryptAndSignRSA
from scapy.asn1.mib import hash_by_oid
from scapy.error import warning
from scapy.layers.x509 import ECDSAPrivateKey_OpenSSL, ECDSAPrivateKey, ECDSAPublicKey, ... |
class Cert(metaclass=_CertMaker):
'''
Wrapper for the X509_Cert from layers/x509.py.
Use the 'x509Cert' attribute to access original object.
'''
def import_from_asn1pkt(self, cert):
pass
def isIssuerCert(self, other):
'''
True if 'other' issued 'self', i.e.:
... | 18 | 9 | 15 | 1 | 10 | 5 | 3 | 0.51 | 1 | 4 | 1 | 0 | 10 | 24 | 10 | 25 | 167 | 24 | 96 | 42 | 85 | 49 | 86 | 41 | 75 | 11 | 4 | 4 | 31 |
29,650 | secdev/scapy | secdev_scapy/scapy/layers/tls/cert.py | scapy.layers.tls.cert.Chain | import os
class Chain(list):
"""
Basically, an enhanced array of Cert.
"""
def __init__(self, certList, cert0=None):
"""
Construct a chain of certificates starting with a self-signed
certificate (or any certificate submitted by the user)
and following issuer/subject mat... |
class Chain(list):
'''
Basically, an enhanced array of Cert.
'''
def __init__(self, certList, cert0=None):
'''
Construct a chain of certificates starting with a self-signed
certificate (or any certificate submitted by the user)
and following issuer/subject matching and ... | 6 | 5 | 25 | 1 | 17 | 7 | 6 | 0.45 | 1 | 2 | 1 | 0 | 5 | 0 | 5 | 38 | 133 | 12 | 85 | 26 | 79 | 38 | 83 | 23 | 77 | 9 | 2 | 4 | 30 |
29,651 | secdev/scapy | secdev_scapy/scapy/layers/tls/cert.py | scapy.layers.tls.cert.PrivKey | from scapy.compat import raw, bytes_encode
from scapy.layers.x509 import ECDSAPrivateKey_OpenSSL, ECDSAPrivateKey, ECDSAPublicKey, EdDSAPublicKey, EdDSAPrivateKey, RSAPrivateKey_OpenSSL, RSAPrivateKey, RSAPublicKey, X509_Cert, X509_CRL, X509_SubjectPublicKeyInfo
from scapy.asn1.mib import hash_by_oid
class PrivKey(met... |
class PrivKey(metaclass=_PrivKeyFactory):
'''
Parent class for PrivKeyRSA, PrivKeyECDSA and PrivKeyEdDSA.
Provides common signTBSCert(), resignCert(), verifyCert()
and export() methods.
'''
def signTBSCert(self, tbsCert, h='sha256'):
'''
Note that this will always copy the sign... | 9 | 5 | 11 | 0 | 6 | 5 | 1 | 1 | 1 | 2 | 2 | 3 | 3 | 0 | 3 | 18 | 40 | 4 | 18 | 11 | 14 | 18 | 18 | 11 | 14 | 1 | 4 | 0 | 3 |
29,652 | secdev/scapy | secdev_scapy/scapy/layers/tls/cert.py | scapy.layers.tls.cert.PrivKeyECDSA | from scapy.layers.tls.crypto.pkcs1 import pkcs_os2ip, _get_hash, _EncryptAndVerifyRSA, _DecryptAndSignRSA
from scapy.compat import raw, bytes_encode
from scapy.config import conf, crypto_validator
class PrivKeyECDSA(PrivKey):
"""
Wrapper for ECDSA keys based on SigningKey from ecdsa library.
Use the 'key' ... |
class PrivKeyECDSA(PrivKey):
'''
Wrapper for ECDSA keys based on SigningKey from ecdsa library.
Use the 'key' attribute to access original object.
'''
@crypto_validator
def fill_and_store(self, curve=None):
pass
@crypto_validator
def import_from_asn1pkt(self, privkey):
p... | 9 | 1 | 4 | 0 | 4 | 1 | 1 | 0.29 | 1 | 0 | 0 | 0 | 4 | 2 | 4 | 22 | 29 | 3 | 21 | 11 | 12 | 6 | 16 | 7 | 11 | 2 | 5 | 1 | 5 |
29,653 | secdev/scapy | secdev_scapy/scapy/layers/tls/cert.py | scapy.layers.tls.cert.PrivKeyEdDSA | from scapy.config import conf, crypto_validator
from scapy.compat import raw, bytes_encode
class PrivKeyEdDSA(PrivKey):
"""
Wrapper for EdDSA keys
Use the 'key' attribute to access original object.
"""
@crypto_validator
def fill_and_store(self, curve=None):
curve = curve or x25519.X255... |
class PrivKeyEdDSA(PrivKey):
'''
Wrapper for EdDSA keys
Use the 'key' attribute to access original object.
'''
@crypto_validator
def fill_and_store(self, curve=None):
pass
@crypto_validator
def import_from_asn1pkt(self, privkey):
pass
@crypto_validator
def verify... | 9 | 1 | 4 | 0 | 4 | 1 | 1 | 0.29 | 1 | 0 | 0 | 0 | 4 | 2 | 4 | 22 | 29 | 3 | 21 | 11 | 12 | 6 | 16 | 7 | 11 | 2 | 5 | 1 | 5 |
29,654 | secdev/scapy | secdev_scapy/scapy/layers/tls/cert.py | scapy.layers.tls.cert.PrivKeyRSA | from scapy.utils import binrepr
from scapy.config import conf, crypto_validator
from scapy.error import warning
from scapy.layers.tls.crypto.pkcs1 import pkcs_os2ip, _get_hash, _EncryptAndVerifyRSA, _DecryptAndSignRSA
class PrivKeyRSA(PrivKey, _DecryptAndSignRSA):
"""
Wrapper for RSA keys based on _DecryptAndS... |
class PrivKeyRSA(PrivKey, _DecryptAndSignRSA):
'''
Wrapper for RSA keys based on _DecryptAndSignRSA from crypto/pkcs1.py
Use the 'key' attribute to access original object.
'''
@crypto_validator
def fill_and_store(self, modulus=None, modulusLen=None, pubExp=None, prime1=None, prime2=None, coeffi... | 6 | 1 | 15 | 0 | 13 | 2 | 2 | 0.19 | 3 | 0 | 0 | 0 | 4 | 5 | 4 | 28 | 68 | 4 | 54 | 24 | 46 | 10 | 34 | 21 | 29 | 4 | 5 | 2 | 7 |
29,655 | secdev/scapy | secdev_scapy/scapy/layers/tls/cert.py | scapy.layers.tls.cert.PubKey | from scapy.compat import raw, bytes_encode
from scapy.asn1.mib import hash_by_oid
class PubKey(metaclass=_PubKeyFactory):
"""
Parent class for PubKeyRSA, PubKeyECDSA and PubKeyEdDSA.
Provides common verifyCert() and export() methods.
"""
def verifyCert(self, cert):
""" Verifies either a Ce... |
class PubKey(metaclass=_PubKeyFactory):
'''
Parent class for PubKeyRSA, PubKeyECDSA and PubKeyEdDSA.
Provides common verifyCert() and export() methods.
'''
def verifyCert(self, cert):
''' Verifies either a Cert or an X509_Cert. '''
pass
@property
def pem(self):
pass... | 10 | 3 | 7 | 0 | 6 | 1 | 1 | 0.71 | 1 | 0 | 0 | 3 | 1 | 0 | 1 | 16 | 13 | 1 | 7 | 6 | 5 | 5 | 7 | 6 | 5 | 1 | 4 | 0 | 1 |
29,656 | secdev/scapy | secdev_scapy/scapy/layers/tls/cert.py | scapy.layers.tls.cert.PubKeyECDSA | from scapy.config import conf, crypto_validator
from scapy.layers.tls.crypto.pkcs1 import pkcs_os2ip, _get_hash, _EncryptAndVerifyRSA, _DecryptAndSignRSA
class PubKeyECDSA(PubKey):
"""
Wrapper for ECDSA keys based on the cryptography library.
Use the 'key' attribute to access original object.
"""
... |
class PubKeyECDSA(PubKey):
'''
Wrapper for ECDSA keys based on the cryptography library.
Use the 'key' attribute to access original object.
'''
@crypto_validator
def fill_and_store(self, curve=None):
pass
@crypto_validator
def import_from_der(self, pubkey):
pass
def... | 8 | 1 | 5 | 0 | 4 | 1 | 1 | 0.29 | 1 | 1 | 0 | 0 | 4 | 1 | 4 | 20 | 30 | 3 | 21 | 10 | 13 | 6 | 15 | 7 | 10 | 2 | 5 | 1 | 5 |
29,657 | secdev/scapy | secdev_scapy/scapy/layers/tls/cert.py | scapy.layers.tls.cert.PubKeyEdDSA | from scapy.config import conf, crypto_validator
class PubKeyEdDSA(PubKey):
"""
Wrapper for EdDSA keys based on the cryptography library.
Use the 'key' attribute to access original object.
"""
@crypto_validator
def fill_and_store(self, curve=None):
curve = curve or x25519.X25519PrivateK... |
class PubKeyEdDSA(PubKey):
'''
Wrapper for EdDSA keys based on the cryptography library.
Use the 'key' attribute to access original object.
'''
@crypto_validator
def fill_and_store(self, curve=None):
pass
@crypto_validator
def import_from_der(self, pubkey):
pass
def... | 8 | 1 | 5 | 0 | 4 | 0 | 1 | 0.24 | 1 | 1 | 0 | 0 | 4 | 1 | 4 | 20 | 29 | 3 | 21 | 10 | 13 | 5 | 15 | 7 | 10 | 2 | 5 | 1 | 5 |
29,658 | secdev/scapy | secdev_scapy/scapy/layers/tls/cert.py | scapy.layers.tls.cert.PubKeyRSA | from scapy.config import conf, crypto_validator
from scapy.utils import binrepr
from scapy.layers.tls.crypto.pkcs1 import pkcs_os2ip, _get_hash, _EncryptAndVerifyRSA, _DecryptAndSignRSA
from scapy.error import warning
class PubKeyRSA(PubKey, _EncryptAndVerifyRSA):
"""
Wrapper for RSA keys based on _EncryptAndV... |
class PubKeyRSA(PubKey, _EncryptAndVerifyRSA):
'''
Wrapper for RSA keys based on _EncryptAndVerifyRSA from crypto/pkcs1.py
Use the 'key' attribute to access original object.
'''
@crypto_validator
def fill_and_store(self, modulus=None, modulusLen=None, pubExp=None):
pass
@crypto_vali... | 8 | 1 | 10 | 0 | 9 | 1 | 2 | 0.16 | 2 | 1 | 0 | 0 | 5 | 6 | 5 | 24 | 61 | 4 | 49 | 20 | 41 | 8 | 35 | 18 | 29 | 4 | 5 | 2 | 10 |
29,659 | secdev/scapy | secdev_scapy/scapy/layers/tls/cert.py | scapy.layers.tls.cert._CRLMaker | from scapy.layers.x509 import ECDSAPrivateKey_OpenSSL, ECDSAPrivateKey, ECDSAPublicKey, EdDSAPublicKey, EdDSAPrivateKey, RSAPrivateKey_OpenSSL, RSAPrivateKey, RSAPublicKey, X509_Cert, X509_CRL, X509_SubjectPublicKeyInfo
class _CRLMaker(_PKIObjMaker):
"""
Metaclass for CRL creation. It is not necessary as it wa... |
class _CRLMaker(_PKIObjMaker):
'''
Metaclass for CRL creation. It is not necessary as it was for the keys,
but we reuse the model instead of creating redundant constructors.
'''
def __call__(cls, cert_path):
pass | 2 | 1 | 9 | 0 | 9 | 0 | 2 | 0.4 | 1 | 3 | 2 | 1 | 1 | 0 | 1 | 15 | 14 | 0 | 10 | 4 | 8 | 4 | 10 | 4 | 8 | 2 | 3 | 1 | 2 |
29,660 | secdev/scapy | secdev_scapy/scapy/layers/tls/cert.py | scapy.layers.tls.cert._CertMaker | from scapy.layers.x509 import ECDSAPrivateKey_OpenSSL, ECDSAPrivateKey, ECDSAPublicKey, EdDSAPublicKey, EdDSAPrivateKey, RSAPrivateKey_OpenSSL, RSAPrivateKey, RSAPublicKey, X509_Cert, X509_CRL, X509_SubjectPublicKeyInfo
from scapy.config import conf, crypto_validator
class _CertMaker(_PKIObjMaker):
"""
Metacla... |
class _CertMaker(_PKIObjMaker):
'''
Metaclass for Cert creation. It is not necessary as it was for the keys,
but we reuse the model instead of creating redundant constructors.
'''
def __call__(cls, cert_path):
pass | 2 | 1 | 12 | 0 | 12 | 0 | 3 | 0.31 | 1 | 3 | 2 | 1 | 1 | 0 | 1 | 15 | 17 | 0 | 13 | 4 | 11 | 4 | 12 | 4 | 10 | 3 | 3 | 2 | 3 |
29,661 | secdev/scapy | secdev_scapy/scapy/layers/tls/cert.py | scapy.layers.tls.cert._PKIObj | class _PKIObj(object):
def __init__(self, frmt, der):
self.frmt = frmt
self._der = der | class _PKIObj(object):
def __init__(self, frmt, der):
pass | 2 | 0 | 5 | 0 | 3 | 2 | 1 | 0.43 | 1 | 0 | 0 | 0 | 2 | 3 | 2 | 2 | 11 | 1 | 7 | 6 | 4 | 3 | 7 | 6 | 4 | 1 | 1 | 0 | 2 |
29,662 | secdev/scapy | secdev_scapy/scapy/layers/tls/cert.py | scapy.layers.tls.cert._PKIObjMaker | import os
from scapy.compat import raw, bytes_encode
class _PKIObjMaker(type):
def __call__(cls, obj_path, obj_max_size, pem_marker=None):
error_msg = 'Unable to import data'
if obj_path is None:
raise Exception(error_msg)
obj_path = bytes_encode(obj_path)
if b'\x00' no... |
class _PKIObjMaker(type):
def __call__(cls, obj_path, obj_max_size, pem_marker=None):
pass | 2 | 0 | 44 | 4 | 32 | 8 | 8 | 0.24 | 1 | 3 | 1 | 4 | 1 | 0 | 1 | 14 | 45 | 4 | 33 | 11 | 31 | 8 | 31 | 10 | 29 | 8 | 2 | 3 | 8 |
29,663 | secdev/scapy | secdev_scapy/scapy/layers/tls/cert.py | scapy.layers.tls.cert._PrivKeyFactory | from scapy.layers.x509 import ECDSAPrivateKey_OpenSSL, ECDSAPrivateKey, ECDSAPublicKey, EdDSAPublicKey, EdDSAPrivateKey, RSAPrivateKey_OpenSSL, RSAPrivateKey, RSAPublicKey, X509_Cert, X509_CRL, X509_SubjectPublicKeyInfo
class _PrivKeyFactory(_PKIObjMaker):
"""
Metaclass for PrivKey creation.
It casts the a... |
class _PrivKeyFactory(_PKIObjMaker):
'''
Metaclass for PrivKey creation.
It casts the appropriate class on the fly, then fills in
the appropriate attributes with import_from_asn1pkt() submethod.
'''
def __call__(cls, key_path=None):
'''
key_path may be the path to either:
... | 2 | 2 | 60 | 2 | 50 | 8 | 11 | 0.25 | 1 | 11 | 9 | 1 | 1 | 0 | 1 | 15 | 66 | 2 | 51 | 6 | 49 | 13 | 50 | 6 | 48 | 11 | 3 | 5 | 11 |
29,664 | secdev/scapy | secdev_scapy/scapy/layers/tls/cert.py | scapy.layers.tls.cert._PubKeyFactory | from scapy.layers.x509 import ECDSAPrivateKey_OpenSSL, ECDSAPrivateKey, ECDSAPublicKey, EdDSAPublicKey, EdDSAPrivateKey, RSAPrivateKey_OpenSSL, RSAPrivateKey, RSAPublicKey, X509_Cert, X509_CRL, X509_SubjectPublicKeyInfo
from scapy.config import conf, crypto_validator
class _PubKeyFactory(_PKIObjMaker):
"""
Met... |
class _PubKeyFactory(_PKIObjMaker):
'''
Metaclass for PubKey creation.
It casts the appropriate class on the fly, then fills in
the appropriate attributes with import_from_asn1pkt() submethod.
'''
def __call__(cls, key_path=None, cryptography_obj=None):
pass | 2 | 1 | 55 | 4 | 44 | 7 | 11 | 0.27 | 1 | 10 | 8 | 1 | 1 | 0 | 1 | 15 | 61 | 4 | 45 | 6 | 43 | 12 | 42 | 6 | 40 | 11 | 3 | 3 | 11 |
29,665 | secdev/scapy | secdev_scapy/scapy/layers/tls/cert.py | scapy.layers.tls.cert._Raw_ASN1_BIT_STRING | from scapy.asn1.asn1 import ASN1_BIT_STRING
class _Raw_ASN1_BIT_STRING(ASN1_BIT_STRING):
"""A ASN1_BIT_STRING that ignores BER encoding"""
def __bytes__(self):
return self.val_readable
__str__ = __bytes__ |
class _Raw_ASN1_BIT_STRING(ASN1_BIT_STRING):
'''A ASN1_BIT_STRING that ignores BER encoding'''
def __bytes__(self):
pass | 2 | 1 | 2 | 0 | 2 | 0 | 1 | 0.25 | 1 | 0 | 0 | 0 | 1 | 0 | 1 | 35 | 5 | 0 | 4 | 3 | 2 | 1 | 4 | 3 | 2 | 1 | 5 | 0 | 1 |
29,666 | secdev/scapy | secdev_scapy/scapy/layers/tls/crypto/cipher_aead.py | scapy.layers.tls.crypto.cipher_aead.AEADTagError | class AEADTagError(Exception):
"""
Raised when MAC verification fails.
"""
pass | class AEADTagError(Exception):
'''
Raised when MAC verification fails.
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 5 | 0 | 2 | 1 | 1 | 3 | 2 | 1 | 1 | 0 | 3 | 0 | 0 |
29,667 | secdev/scapy | secdev_scapy/scapy/layers/tls/crypto/cipher_aead.py | scapy.layers.tls.crypto.cipher_aead._AEADCipher | import struct
from scapy.layers.tls.crypto.common import CipherError
from scapy.layers.tls.crypto.pkcs1 import pkcs_i2osp, pkcs_os2ip
class _AEADCipher(metaclass=_AEADCipherMetaclass):
"""
The hasattr(self, "pc_cls") tests correspond to the legacy API of the
crypto library. With cryptography v2.0, both CCM... |
class _AEADCipher(metaclass=_AEADCipherMetaclass):
'''
The hasattr(self, "pc_cls") tests correspond to the legacy API of the
crypto library. With cryptography v2.0, both CCM and GCM should follow
the else case.
Note that the "fixed_iv" in TLS RFCs is called "salt" in the AEAD RFC 5116.
'''
... | 8 | 5 | 20 | 2 | 14 | 4 | 4 | 0.37 | 1 | 4 | 2 | 2 | 7 | 3 | 7 | 21 | 157 | 20 | 100 | 22 | 92 | 37 | 82 | 22 | 74 | 7 | 3 | 3 | 26 |
29,668 | secdev/scapy | secdev_scapy/scapy/layers/tls/crypto/cipher_aead.py | scapy.layers.tls.crypto.cipher_aead._AEADCipherMetaclass | class _AEADCipherMetaclass(type):
"""
Cipher classes are automatically registered through this metaclass.
Furthermore, their name attribute is extracted from their class name.
"""
def __new__(cls, ciph_name, bases, dct):
if not ciph_name.startswith('_AEADCipher'):
dct['name'] = ... | class _AEADCipherMetaclass(type):
'''
Cipher classes are automatically registered through this metaclass.
Furthermore, their name attribute is extracted from their class name.
'''
def __new__(cls, ciph_name, bases, dct):
pass | 2 | 1 | 8 | 0 | 8 | 1 | 3 | 0.56 | 1 | 1 | 0 | 2 | 1 | 0 | 1 | 14 | 13 | 0 | 9 | 3 | 7 | 5 | 8 | 3 | 6 | 3 | 2 | 1 | 3 |
29,669 | secdev/scapy | secdev_scapy/scapy/layers/tls/crypto/cipher_aead.py | scapy.layers.tls.crypto.cipher_aead._AEADCipher_TLS13 | from scapy.utils import strxor
import struct
from scapy.layers.tls.crypto.common import CipherError
from scapy.config import conf
class _AEADCipher_TLS13(metaclass=_AEADCipherMetaclass):
"""
The hasattr(self, "pc_cls") enable support for the legacy implementation
of GCM in the cryptography library. They sh... |
class _AEADCipher_TLS13(metaclass=_AEADCipherMetaclass):
'''
The hasattr(self, "pc_cls") enable support for the legacy implementation
of GCM in the cryptography library. They should not be used, and might
eventually be removed, with cryptography v2.0. XXX
'''
def __init__(self, key=None, fixed... | 7 | 4 | 19 | 1 | 15 | 4 | 4 | 0.29 | 1 | 4 | 3 | 3 | 6 | 2 | 6 | 20 | 126 | 12 | 90 | 18 | 83 | 26 | 73 | 18 | 66 | 7 | 3 | 4 | 24 |
29,670 | secdev/scapy | secdev_scapy/scapy/layers/tls/crypto/cipher_block.py | scapy.layers.tls.crypto.cipher_block._BlockCipher | from scapy.layers.tls.crypto.common import CipherError
class _BlockCipher(metaclass=_BlockCipherMetaclass):
type = 'block'
def __init__(self, key=None, iv=None):
self.ready = {'key': True, 'iv': True}
if key is None:
self.ready['key'] = False
if hasattr(self, 'expanded_... |
class _BlockCipher(metaclass=_BlockCipherMetaclass):
def __init__(self, key=None, iv=None):
pass
def __setattr__(self, name, val):
pass
def encrypt(self, data):
'''
Encrypt the data. Also, update the cipher iv. This is needed for SSLv3
and TLS 1.0. For TLS 1.1/1.2... | 6 | 2 | 12 | 0 | 10 | 2 | 3 | 0.19 | 1 | 2 | 1 | 8 | 5 | 3 | 5 | 19 | 69 | 7 | 52 | 16 | 46 | 10 | 45 | 16 | 39 | 5 | 3 | 2 | 15 |
29,671 | secdev/scapy | secdev_scapy/scapy/layers/tls/crypto/cipher_block.py | scapy.layers.tls.crypto.cipher_block._BlockCipherMetaclass | class _BlockCipherMetaclass(type):
"""
Cipher classes are automatically registered through this metaclass.
Furthermore, their name attribute is extracted from their class name.
"""
def __new__(cls, ciph_name, bases, dct):
if ciph_name != '_BlockCipher':
dct['name'] = ciph_name[7... | class _BlockCipherMetaclass(type):
'''
Cipher classes are automatically registered through this metaclass.
Furthermore, their name attribute is extracted from their class name.
'''
def __new__(cls, ciph_name, bases, dct):
pass | 2 | 1 | 8 | 0 | 8 | 1 | 3 | 0.56 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 14 | 13 | 0 | 9 | 3 | 7 | 5 | 8 | 3 | 6 | 3 | 2 | 1 | 3 |
29,672 | secdev/scapy | secdev_scapy/scapy/layers/tls/crypto/cipher_stream.py | scapy.layers.tls.crypto.cipher_stream.Cipher_NULL | class Cipher_NULL(_StreamCipher):
key_len = 0
def __init__(self, key=None):
self.ready = {'key': True}
self._cipher = None
super(Cipher_NULL, self).__setattr__('key', key)
def snapshot(self):
c = self.__class__(self.key)
c.ready = self.ready.copy()
return c
... | class Cipher_NULL(_StreamCipher):
def __init__(self, key=None):
pass
def snapshot(self):
pass
def encrypt(self, data):
pass
def decrypt(self, data):
pass | 5 | 0 | 3 | 0 | 3 | 0 | 1 | 0.07 | 1 | 1 | 0 | 0 | 4 | 2 | 4 | 23 | 19 | 4 | 14 | 9 | 9 | 1 | 14 | 9 | 9 | 1 | 4 | 0 | 4 |
29,673 | secdev/scapy | secdev_scapy/scapy/layers/tls/crypto/cipher_stream.py | scapy.layers.tls.crypto.cipher_stream._StreamCipher | from scapy.layers.tls.crypto.common import CipherError
class _StreamCipher(metaclass=_StreamCipherMetaclass):
type = 'stream'
def __init__(self, key=None):
"""
Note that we have to keep the encryption/decryption state in unique
encryptor and decryptor objects. This differs from _BlockC... |
class _StreamCipher(metaclass=_StreamCipherMetaclass):
def __init__(self, key=None):
'''
Note that we have to keep the encryption/decryption state in unique
encryptor and decryptor objects. This differs from _BlockCipher.
In order to do connection state snapshots, we need to be abl... | 6 | 2 | 12 | 1 | 9 | 2 | 2 | 0.27 | 1 | 2 | 1 | 2 | 5 | 6 | 5 | 19 | 65 | 8 | 45 | 15 | 39 | 12 | 42 | 15 | 36 | 3 | 3 | 2 | 11 |
29,674 | secdev/scapy | secdev_scapy/scapy/layers/tls/crypto/cipher_stream.py | scapy.layers.tls.crypto.cipher_stream._StreamCipherMetaclass | class _StreamCipherMetaclass(type):
"""
Cipher classes are automatically registered through this metaclass.
Furthermore, their name attribute is extracted from their class name.
"""
def __new__(cls, ciph_name, bases, dct):
if ciph_name != '_StreamCipher':
dct['name'] = ciph_name... | class _StreamCipherMetaclass(type):
'''
Cipher classes are automatically registered through this metaclass.
Furthermore, their name attribute is extracted from their class name.
'''
def __new__(cls, ciph_name, bases, dct):
pass | 2 | 1 | 8 | 0 | 8 | 1 | 3 | 0.56 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 14 | 13 | 0 | 9 | 3 | 7 | 5 | 8 | 3 | 6 | 3 | 2 | 1 | 3 |
29,675 | secdev/scapy | secdev_scapy/scapy/layers/tls/crypto/common.py | scapy.layers.tls.crypto.common.CipherError | class CipherError(Exception):
"""
Raised when .decrypt() or .auth_decrypt() fails.
"""
pass | class CipherError(Exception):
'''
Raised when .decrypt() or .auth_decrypt() fails.
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 5 | 0 | 2 | 1 | 1 | 3 | 2 | 1 | 1 | 0 | 3 | 0 | 0 |
29,676 | secdev/scapy | secdev_scapy/scapy/layers/tls/crypto/compression.py | scapy.layers.tls.crypto.compression.Comp_Deflate | import zlib
class Comp_Deflate(_GenericComp):
"""
DEFLATE algorithm, specified for TLS by RFC 3749.
"""
name = 'deflate'
val = 1
def compress(self, s):
tmp = self.compress_state.compress(s)
tmp += self.compress_state.flush(zlib.Z_FULL_FLUSH)
return tmp
def decompre... |
class Comp_Deflate(_GenericComp):
'''
DEFLATE algorithm, specified for TLS by RFC 3749.
'''
def compress(self, s):
pass
def decompress(self, s):
pass
def __init__(self):
pass | 4 | 1 | 3 | 0 | 3 | 0 | 1 | 0.25 | 1 | 0 | 0 | 0 | 3 | 2 | 3 | 17 | 18 | 3 | 12 | 9 | 8 | 3 | 12 | 9 | 8 | 1 | 4 | 0 | 3 |
29,677 | secdev/scapy | secdev_scapy/scapy/layers/tls/crypto/compression.py | scapy.layers.tls.crypto.compression.Comp_LZS | from scapy.error import warning
class Comp_LZS(_GenericComp):
"""
Lempel-Zic-Stac (LZS) algorithm, specified for TLS by RFC 3943.
XXX No support for now.
"""
name = 'LZS'
val = 64
def compress(self, s):
warning('LZS Compression algorithm is not implemented yet')
return s
... |
class Comp_LZS(_GenericComp):
'''
Lempel-Zic-Stac (LZS) algorithm, specified for TLS by RFC 3943.
XXX No support for now.
'''
def compress(self, s):
pass
def decompress(self, s):
pass | 3 | 1 | 3 | 0 | 3 | 0 | 1 | 0.44 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 16 | 15 | 2 | 9 | 5 | 6 | 4 | 9 | 5 | 6 | 1 | 4 | 0 | 2 |
29,678 | secdev/scapy | secdev_scapy/scapy/layers/tls/crypto/compression.py | scapy.layers.tls.crypto.compression.Comp_NULL | class Comp_NULL(_GenericComp):
"""
The default and advised compression method for TLS: doing nothing.
"""
name = 'null'
val = 0
def compress(self, s):
return s
def decompress(self, s):
return s | class Comp_NULL(_GenericComp):
'''
The default and advised compression method for TLS: doing nothing.
'''
def compress(self, s):
pass
def decompress(self, s):
pass | 3 | 1 | 2 | 0 | 2 | 0 | 1 | 0.43 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 16 | 12 | 2 | 7 | 5 | 4 | 3 | 7 | 5 | 4 | 1 | 4 | 0 | 2 |
29,679 | secdev/scapy | secdev_scapy/scapy/layers/tls/crypto/compression.py | scapy.layers.tls.crypto.compression._GenericComp | class _GenericComp(metaclass=_GenericCompMetaclass):
pass | class _GenericComp(metaclass=_GenericCompMetaclass):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 3 | 0 | 0 | 0 | 14 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 3 | 0 | 0 |
29,680 | secdev/scapy | secdev_scapy/scapy/layers/tls/crypto/compression.py | scapy.layers.tls.crypto.compression._GenericCompMetaclass | class _GenericCompMetaclass(type):
"""
Compression classes are automatically registered through this metaclass.
"""
def __new__(cls, name, bases, dct):
the_class = super(_GenericCompMetaclass, cls).__new__(cls, name, bases, dct)
comp_name = dct.get('name')
val = dct.get('val')
... | class _GenericCompMetaclass(type):
'''
Compression classes are automatically registered through this metaclass.
'''
def __new__(cls, name, bases, dct):
pass | 2 | 1 | 9 | 0 | 9 | 0 | 2 | 0.3 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 14 | 13 | 0 | 10 | 5 | 8 | 3 | 9 | 5 | 7 | 2 | 2 | 1 | 2 |
29,681 | secdev/scapy | secdev_scapy/scapy/layers/tls/crypto/groups.py | scapy.layers.tls.crypto.groups._FFDHParams | class _FFDHParams(metaclass=_FFDHParamsMetaclass):
pass | class _FFDHParams(metaclass=_FFDHParamsMetaclass):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 13 | 0 | 0 | 0 | 14 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 3 | 0 | 0 |
29,682 | secdev/scapy | secdev_scapy/scapy/layers/tls/crypto/groups.py | scapy.layers.tls.crypto.groups._FFDHParamsMetaclass | from scapy.config import conf
class _FFDHParamsMetaclass(type):
def __new__(cls, ffdh_name, bases, dct):
the_class = super(_FFDHParamsMetaclass, cls).__new__(cls, ffdh_name, bases, dct)
if conf.crypto_valid and ffdh_name != '_FFDHParams':
pn = DHParameterNumbers(the_class.m, the_class.... |
class _FFDHParamsMetaclass(type):
def __new__(cls, ffdh_name, bases, dct):
pass | 2 | 0 | 8 | 0 | 8 | 0 | 2 | 0 | 1 | 1 | 0 | 1 | 1 | 0 | 1 | 14 | 9 | 0 | 9 | 5 | 7 | 0 | 8 | 5 | 6 | 2 | 2 | 1 | 2 |
29,683 | secdev/scapy | secdev_scapy/scapy/layers/tls/crypto/groups.py | scapy.layers.tls.crypto.groups.ffdhe2048 | from scapy.utils import long_converter
class ffdhe2048(_FFDHParams):
g = 2
m = long_converter('\n FFFFFFFF FFFFFFFF ADF85458 A2BB4A9A AFDC5620 273D3CF1\n D8B9C583 CE2D3695 A9E13641 146433FB CC939DCE 249B3EF9\n 7D2FE363 630C75D8 F681B202 AEC4617A D3DF1ED5 D5FD6561\n 2433F51F 5F066ED0 85636555 3DED1A... |
class ffdhe2048(_FFDHParams):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0.06 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 16 | 0 | 16 | 4 | 15 | 1 | 4 | 4 | 3 | 0 | 4 | 0 | 0 |
29,684 | secdev/scapy | secdev_scapy/scapy/layers/tls/crypto/groups.py | scapy.layers.tls.crypto.groups.ffdhe3072 | from scapy.utils import long_converter
class ffdhe3072(_FFDHParams):
g = 2
m = long_converter('\n FFFFFFFF FFFFFFFF ADF85458 A2BB4A9A AFDC5620 273D3CF1\n D8B9C583 CE2D3695 A9E13641 146433FB CC939DCE 249B3EF9\n 7D2FE363 630C75D8 F681B202 AEC4617A D3DF1ED5 D5FD6561\n 2433F51F 5F066ED0 85636555 3DED1A... |
class ffdhe3072(_FFDHParams):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0.05 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 21 | 0 | 21 | 4 | 20 | 1 | 4 | 4 | 3 | 0 | 4 | 0 | 0 |
29,685 | secdev/scapy | secdev_scapy/scapy/layers/tls/crypto/groups.py | scapy.layers.tls.crypto.groups.ffdhe4096 | from scapy.utils import long_converter
class ffdhe4096(_FFDHParams):
g = 2
m = long_converter('\n FFFFFFFF FFFFFFFF ADF85458 A2BB4A9A AFDC5620 273D3CF1\n D8B9C583 CE2D3695 A9E13641 146433FB CC939DCE 249B3EF9\n 7D2FE363 630C75D8 F681B202 AEC4617A D3DF1ED5 D5FD6561\n 2433F51F 5F066ED0 85636555 3DED1A... |
class ffdhe4096(_FFDHParams):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0.04 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 27 | 0 | 27 | 4 | 26 | 1 | 4 | 4 | 3 | 0 | 4 | 0 | 0 |
29,686 | secdev/scapy | secdev_scapy/scapy/layers/tls/crypto/groups.py | scapy.layers.tls.crypto.groups.ffdhe6144 | from scapy.utils import long_converter
class ffdhe6144(_FFDHParams):
g = 2
m = long_converter('\n FFFFFFFF FFFFFFFF ADF85458 A2BB4A9A AFDC5620 273D3CF1\n D8B9C583 CE2D3695 A9E13641 146433FB CC939DCE 249B3EF9\n 7D2FE363 630C75D8 F681B202 AEC4617A D3DF1ED5 D5FD6561\n 2433F51F 5F066ED0 85636555 3DED1A... |
class ffdhe6144(_FFDHParams):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0.03 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 37 | 0 | 37 | 4 | 36 | 1 | 4 | 4 | 3 | 0 | 4 | 0 | 0 |
29,687 | secdev/scapy | secdev_scapy/scapy/layers/tls/crypto/groups.py | scapy.layers.tls.crypto.groups.ffdhe8192 | from scapy.utils import long_converter
class ffdhe8192(_FFDHParams):
g = 2
m = long_converter('\n FFFFFFFF FFFFFFFF ADF85458 A2BB4A9A AFDC5620 273D3CF1\n D8B9C583 CE2D3695 A9E13641 146433FB CC939DCE 249B3EF9\n 7D2FE363 630C75D8 F681B202 AEC4617A D3DF1ED5 D5FD6561\n 2433F51F 5F066ED0 85636555 3DED1A... |
class ffdhe8192(_FFDHParams):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0.02 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 48 | 0 | 48 | 4 | 47 | 1 | 4 | 4 | 3 | 0 | 4 | 0 | 0 |
29,688 | secdev/scapy | secdev_scapy/scapy/layers/tls/crypto/groups.py | scapy.layers.tls.crypto.groups.modp1024 | from scapy.utils import long_converter
class modp1024(_FFDHParams):
g = 2
m = long_converter('\n FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1 29024E08\n 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD EF9519B3 CD3A431B\n 302B0A6D F25F1437 4FE1356D 6D51C245 E485B576 625E7EC6 F44C42E9\n A637ED6... |
class modp1024(_FFDHParams):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0.11 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 9 | 0 | 9 | 4 | 8 | 1 | 4 | 4 | 3 | 0 | 4 | 0 | 0 |
29,689 | secdev/scapy | secdev_scapy/scapy/layers/tls/crypto/groups.py | scapy.layers.tls.crypto.groups.modp1536 | from scapy.utils import long_converter
class modp1536(_FFDHParams):
g = 2
m = long_converter('\n FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1\n 29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD\n EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245\n E485B576 625E7EC6 F44C42E9 A637ED6... |
class modp1536(_FFDHParams):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0.08 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 12 | 0 | 12 | 4 | 11 | 1 | 4 | 4 | 3 | 0 | 4 | 0 | 0 |
29,690 | secdev/scapy | secdev_scapy/scapy/layers/tls/crypto/groups.py | scapy.layers.tls.crypto.groups.modp2048 | from scapy.utils import long_converter
class modp2048(_FFDHParams):
g = 2
m = long_converter('\n FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1\n 29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD\n EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245\n E485B576 625E7EC6 F44C42E9 A637ED6... |
class modp2048(_FFDHParams):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0.07 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 15 | 0 | 15 | 4 | 14 | 1 | 4 | 4 | 3 | 0 | 4 | 0 | 0 |
29,691 | secdev/scapy | secdev_scapy/scapy/layers/tls/crypto/groups.py | scapy.layers.tls.crypto.groups.modp3072 | from scapy.utils import long_converter
class modp3072(_FFDHParams):
g = 2
m = long_converter('\n FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1\n 29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD\n EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245\n E485B576 625E7EC6 F44C42E9 A637ED6... |
class modp3072(_FFDHParams):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0.05 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 20 | 0 | 20 | 4 | 19 | 1 | 4 | 4 | 3 | 0 | 4 | 0 | 0 |
29,692 | secdev/scapy | secdev_scapy/scapy/layers/tls/crypto/groups.py | scapy.layers.tls.crypto.groups.modp4096 | from scapy.utils import long_converter
class modp4096(_FFDHParams):
g = 2
m = long_converter('\n FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1\n 29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD\n EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245\n E485B576 625E7EC6 F44C42E9 A637ED6... |
class modp4096(_FFDHParams):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0.04 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 26 | 0 | 26 | 4 | 25 | 1 | 4 | 4 | 3 | 0 | 4 | 0 | 0 |
29,693 | secdev/scapy | secdev_scapy/scapy/layers/tls/crypto/groups.py | scapy.layers.tls.crypto.groups.modp6144 | from scapy.utils import long_converter
class modp6144(_FFDHParams):
g = 2
m = long_converter('\n FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1 29024E08\n 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD EF9519B3 CD3A431B\n 302B0A6D F25F1437 4FE1356D 6D51C245 E485B576 625E7EC6 F44C42E9\n A637ED6... |
class modp6144(_FFDHParams):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0.03 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 32 | 0 | 32 | 4 | 31 | 1 | 4 | 4 | 3 | 0 | 4 | 0 | 0 |
29,694 | secdev/scapy | secdev_scapy/scapy/layers/tls/crypto/groups.py | scapy.layers.tls.crypto.groups.modp768 | from scapy.utils import long_converter
class modp768(_FFDHParams):
g = 2
m = long_converter('\n FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1 29024E08\n 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD EF9519B3 CD3A431B\n 302B0A6D F25F1437 4FE1356D 6D51C245 E485B576 625E7EC6 F44C42E9\n A63A3620... |
class modp768(_FFDHParams):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 8 | 0 | 8 | 4 | 7 | 0 | 4 | 4 | 3 | 0 | 4 | 0 | 0 |
29,695 | secdev/scapy | secdev_scapy/scapy/layers/tls/crypto/groups.py | scapy.layers.tls.crypto.groups.modp8192 | from scapy.utils import long_converter
class modp8192(_FFDHParams):
g = 2
m = long_converter('\n FFFFFFFF FFFFFFFF C90FDAA2 2168C234 C4C6628B 80DC1CD1\n 29024E08 8A67CC74 020BBEA6 3B139B22 514A0879 8E3404DD\n EF9519B3 CD3A431B 302B0A6D F25F1437 4FE1356D 6D51C245\n E485B576 625E7EC6 F44C42E9 A637ED6... |
class modp8192(_FFDHParams):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0.02 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 14 | 47 | 0 | 47 | 4 | 46 | 1 | 4 | 4 | 3 | 0 | 4 | 0 | 0 |
29,696 | secdev/scapy | secdev_scapy/scapy/layers/tls/crypto/h_mac.py | scapy.layers.tls.crypto.h_mac.HMACError | class HMACError(Exception):
"""
Raised when HMAC verification fails.
"""
pass | class HMACError(Exception):
'''
Raised when HMAC verification fails.
'''
pass | 1 | 1 | 0 | 0 | 0 | 0 | 0 | 1.5 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 10 | 5 | 0 | 2 | 1 | 1 | 3 | 2 | 1 | 1 | 0 | 3 | 0 | 0 |
29,697 | secdev/scapy | secdev_scapy/scapy/layers/tls/crypto/h_mac.py | scapy.layers.tls.crypto.h_mac.Hmac_MD4 | class Hmac_MD4(_GenericHMAC):
pass | class Hmac_MD4(_GenericHMAC):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 17 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 4 | 0 | 0 |
29,698 | secdev/scapy | secdev_scapy/scapy/layers/tls/crypto/h_mac.py | scapy.layers.tls.crypto.h_mac.Hmac_MD5 | class Hmac_MD5(_GenericHMAC):
pass | class Hmac_MD5(_GenericHMAC):
pass | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 0 | 1 | 0 | 0 | 0 | 0 | 0 | 0 | 17 | 2 | 0 | 2 | 1 | 1 | 0 | 2 | 1 | 1 | 0 | 4 | 0 | 0 |
29,699 | secdev/scapy | secdev_scapy/scapy/layers/tls/crypto/h_mac.py | scapy.layers.tls.crypto.h_mac.Hmac_NULL | class Hmac_NULL(_GenericHMAC):
hmac_len = 0
key_len = 0
def digest(self, tbd):
return b''
def digest_sslv3(self, tbd):
return b'' | class Hmac_NULL(_GenericHMAC):
def digest(self, tbd):
pass
def digest_sslv3(self, tbd):
pass | 3 | 0 | 2 | 0 | 2 | 0 | 1 | 0 | 1 | 0 | 0 | 0 | 2 | 0 | 2 | 19 | 9 | 2 | 7 | 5 | 4 | 0 | 7 | 5 | 4 | 1 | 4 | 0 | 2 |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.