scapy.asn1.asn1 module

ASN.1 (Abstract Syntax Notation One)

class scapy.asn1.asn1.ASN1Codec(key, value)

Bases: scapy.utils.EnumElement

dec(s, context=None)
get_stem()
register_stem(stem)
safedec(s, context=None)
class scapy.asn1.asn1.ASN1Tag(key, value, context=None, codec=None)

Bases: scapy.utils.EnumElement

asn1_object(val)
clone()
get_codec(codec)
register(codecnum, codec)
register_asn1_object(asn1obj)
class scapy.asn1.asn1.ASN1_BADTAG(val)

Bases: scapy.asn1.asn1.ASN1_force

class scapy.asn1.asn1.ASN1_BIT_STRING(val, readable=False)

Bases: scapy.asn1.asn1.ASN1_Object

ASN1_BIT_STRING values are bit strings like “011101”. A zero-bit padded readable string is provided nonetheless, which is stored in val_readable

tag = <ASN1Tag BIT_STRING[3]>
class scapy.asn1.asn1.ASN1_BMP_STRING(val)

Bases: scapy.asn1.asn1.ASN1_STRING

tag = <ASN1Tag BMP_STRING[30]>
class scapy.asn1.asn1.ASN1_BOOLEAN(val)

Bases: scapy.asn1.asn1.ASN1_INTEGER

tag = <ASN1Tag BOOLEAN[1]>
exception scapy.asn1.asn1.ASN1_BadTag_Decoding_Error

Bases: scapy.asn1.asn1.ASN1_Decoding_Error

class scapy.asn1.asn1.ASN1_COUNTER32(val)

Bases: scapy.asn1.asn1.ASN1_INTEGER

tag = <ASN1Tag COUNTER32[65]>
class scapy.asn1.asn1.ASN1_Class

Bases: object

class scapy.asn1.asn1.ASN1_Class_UNIVERSAL

Bases: scapy.asn1.asn1.ASN1_Class

ANY = <ASN1Tag ANY[0]>
BIT_STRING = <ASN1Tag BIT_STRING[3]>
BMP_STRING = <ASN1Tag BMP_STRING[30]>
BOOLEAN = <ASN1Tag BOOLEAN[1]>
CHAR_STRING = <ASN1Tag CHAR_STRING[29]>
COUNTER32 = <ASN1Tag COUNTER32[65]>
EMBEDDED_PDF = <ASN1Tag EMBEDDED_PDF[11]>
ENUMERATED = <ASN1Tag ENUMERATED[10]>
ERROR = <ASN1Tag ERROR[-3]>
EXTERNAL = <ASN1Tag EXTERNAL[8]>
GAUGE32 = <ASN1Tag GAUGE32[66]>
GENERALIZED_TIME = <ASN1Tag GENERALIZED_TIME[24]>
GENERAL_STRING = <ASN1Tag GENERAL_STRING[27]>
GRAPHIC_STRING = <ASN1Tag GRAPHIC_STRING[25]>
IA5_STRING = <ASN1Tag IA5_STRING[22]>
INTEGER = <ASN1Tag INTEGER[2]>
IPADDRESS = <ASN1Tag IPADDRESS[64]>
ISO646_STRING = <ASN1Tag ISO646_STRING[26]>
NONE = <ASN1Tag NONE[-1]>
NULL = <ASN1Tag NULL[5]>
NUMERIC_STRING = <ASN1Tag NUMERIC_STRING[18]>
OBJECT_DESCRIPTOR = <ASN1Tag OBJECT_DESCRIPTOR[7]>
OID = <ASN1Tag OID[6]>
PRINTABLE_STRING = <ASN1Tag PRINTABLE_STRING[19]>
RAW = <ASN1Tag RAW[-2]>
REAL = <ASN1Tag REAL[9]>
RELATIVE_OID = <ASN1Tag RELATIVE_OID[13]>
SEQUENCE = <ASN1Tag SEQUENCE[48]>
SET = <ASN1Tag SET[49]>
STRING = <ASN1Tag STRING[4]>
T61_STRING = <ASN1Tag T61_STRING[20]>
TIME_TICKS = <ASN1Tag TIME_TICKS[67]>
UNIVERSAL_STRING = <ASN1Tag UNIVERSAL_STRING[28]>
UTC_TIME = <ASN1Tag UTC_TIME[23]>
UTF8_STRING = <ASN1Tag UTF8_STRING[12]>
VIDEOTEX_STRING = <ASN1Tag VIDEOTEX_STRING[21]>
name = 'UNIVERSAL'
class scapy.asn1.asn1.ASN1_Class_metaclass

Bases: scapy.utils.Enum_metaclass

element_class

alias of ASN1Tag

class scapy.asn1.asn1.ASN1_Codecs

Bases: object

BACnet = <ASN1Codec BACnet[6]>
BER = <ASN1Codec BER[1]>
CER = <ASN1Codec CER[4]>
DER = <ASN1Codec DER[2]>
LWER = <ASN1Codec LWER[5]>
OER = <ASN1Codec OER[7]>
PER = <ASN1Codec PER[3]>
SER = <ASN1Codec SER[8]>
XER = <ASN1Codec XER[9]>
class scapy.asn1.asn1.ASN1_Codecs_metaclass

Bases: scapy.utils.Enum_metaclass

element_class

alias of ASN1Codec

class scapy.asn1.asn1.ASN1_DECODING_ERROR(val, exc=None)

Bases: scapy.asn1.asn1.ASN1_Object

enc(codec)
tag = <ASN1Tag ERROR[-3]>
exception scapy.asn1.asn1.ASN1_Decoding_Error

Bases: scapy.asn1.asn1.ASN1_Error

class scapy.asn1.asn1.ASN1_ENUMERATED(val)

Bases: scapy.asn1.asn1.ASN1_INTEGER

tag = <ASN1Tag ENUMERATED[10]>
exception scapy.asn1.asn1.ASN1_Encoding_Error

Bases: scapy.asn1.asn1.ASN1_Error

exception scapy.asn1.asn1.ASN1_Error

Bases: scapy.error.Scapy_Exception

class scapy.asn1.asn1.ASN1_GAUGE32(val)

Bases: scapy.asn1.asn1.ASN1_INTEGER

tag = <ASN1Tag GAUGE32[66]>
class scapy.asn1.asn1.ASN1_GENERALIZED_TIME(val)

Bases: scapy.asn1.asn1.ASN1_UTC_TIME

tag = <ASN1Tag GENERALIZED_TIME[24]>
class scapy.asn1.asn1.ASN1_IA5_STRING(val)

Bases: scapy.asn1.asn1.ASN1_STRING

tag = <ASN1Tag IA5_STRING[22]>
class scapy.asn1.asn1.ASN1_INTEGER(val)

Bases: scapy.asn1.asn1.ASN1_Object

tag = <ASN1Tag INTEGER[2]>
class scapy.asn1.asn1.ASN1_IPADDRESS(val)

Bases: scapy.asn1.asn1.ASN1_STRING

tag = <ASN1Tag IPADDRESS[64]>
class scapy.asn1.asn1.ASN1_ISO646_STRING(val)

Bases: scapy.asn1.asn1.ASN1_STRING

tag = <ASN1Tag ISO646_STRING[26]>
class scapy.asn1.asn1.ASN1_NULL(val)

Bases: scapy.asn1.asn1.ASN1_Object

tag = <ASN1Tag NULL[5]>
class scapy.asn1.asn1.ASN1_NUMERIC_STRING(val)

Bases: scapy.asn1.asn1.ASN1_STRING

tag = <ASN1Tag NUMERIC_STRING[18]>
class scapy.asn1.asn1.ASN1_OID(val)

Bases: scapy.asn1.asn1.ASN1_Object

tag = <ASN1Tag OID[6]>
class scapy.asn1.asn1.ASN1_Object(val)

Bases: object

enc(codec)
show(lvl=0)
strshow(lvl=0)
tag = <ASN1Tag ANY[0]>
class scapy.asn1.asn1.ASN1_Object_metaclass

Bases: type

class scapy.asn1.asn1.ASN1_PRINTABLE_STRING(val)

Bases: scapy.asn1.asn1.ASN1_STRING

tag = <ASN1Tag PRINTABLE_STRING[19]>
class scapy.asn1.asn1.ASN1_SEQUENCE(val)

Bases: scapy.asn1.asn1.ASN1_Object

strshow(lvl=0)
tag = <ASN1Tag SEQUENCE[48]>
class scapy.asn1.asn1.ASN1_SET(val)

Bases: scapy.asn1.asn1.ASN1_SEQUENCE

tag = <ASN1Tag SET[49]>
class scapy.asn1.asn1.ASN1_STRING(val)

Bases: scapy.asn1.asn1.ASN1_Object

tag = <ASN1Tag STRING[4]>
class scapy.asn1.asn1.ASN1_T61_STRING(val)

Bases: scapy.asn1.asn1.ASN1_STRING

tag = <ASN1Tag T61_STRING[20]>
class scapy.asn1.asn1.ASN1_TIME_TICKS(val)

Bases: scapy.asn1.asn1.ASN1_INTEGER

tag = <ASN1Tag TIME_TICKS[67]>
class scapy.asn1.asn1.ASN1_UNIVERSAL_STRING(val)

Bases: scapy.asn1.asn1.ASN1_STRING

tag = <ASN1Tag UNIVERSAL_STRING[28]>
class scapy.asn1.asn1.ASN1_UTC_TIME(val)

Bases: scapy.asn1.asn1.ASN1_STRING

tag = <ASN1Tag UTC_TIME[23]>
class scapy.asn1.asn1.ASN1_UTF8_STRING(val)

Bases: scapy.asn1.asn1.ASN1_STRING

tag = <ASN1Tag UTF8_STRING[12]>
class scapy.asn1.asn1.ASN1_VIDEOTEX_STRING(val)

Bases: scapy.asn1.asn1.ASN1_STRING

tag = <ASN1Tag VIDEOTEX_STRING[21]>
class scapy.asn1.asn1.ASN1_force(val)

Bases: scapy.asn1.asn1.ASN1_Object

enc(codec)
tag = <ASN1Tag RAW[-2]>
class scapy.asn1.asn1.RandASN1Object(objlist=None)

Bases: scapy.volatile.RandField