scapy.layers.snmp

SNMP (Simple Network Management Protocol).

class scapy.layers.snmp.ASN1F_SNMP_PDU_BULK(*seq, **kwargs)

Bases: scapy.asn1fields.ASN1F_SEQUENCE

ASN1_tag = <ASN1Tag PDU_BULK[165]>
class scapy.layers.snmp.ASN1F_SNMP_PDU_GET(*seq, **kwargs)

Bases: scapy.asn1fields.ASN1F_SEQUENCE

ASN1_tag = <ASN1Tag PDU_GET[160]>
class scapy.layers.snmp.ASN1F_SNMP_PDU_INFORM(*seq, **kwargs)

Bases: scapy.asn1fields.ASN1F_SEQUENCE

ASN1_tag = <ASN1Tag PDU_INFORM[166]>
class scapy.layers.snmp.ASN1F_SNMP_PDU_NEXT(*seq, **kwargs)

Bases: scapy.asn1fields.ASN1F_SEQUENCE

ASN1_tag = <ASN1Tag PDU_NEXT[161]>
class scapy.layers.snmp.ASN1F_SNMP_PDU_RESPONSE(*seq, **kwargs)

Bases: scapy.asn1fields.ASN1F_SEQUENCE

ASN1_tag = <ASN1Tag PDU_RESPONSE[162]>
class scapy.layers.snmp.ASN1F_SNMP_PDU_SET(*seq, **kwargs)

Bases: scapy.asn1fields.ASN1F_SEQUENCE

ASN1_tag = <ASN1Tag PDU_SET[163]>
class scapy.layers.snmp.ASN1F_SNMP_PDU_TRAPv1(*seq, **kwargs)

Bases: scapy.asn1fields.ASN1F_SEQUENCE

ASN1_tag = <ASN1Tag PDU_TRAPv1[164]>
class scapy.layers.snmp.ASN1F_SNMP_PDU_TRAPv2(*seq, **kwargs)

Bases: scapy.asn1fields.ASN1F_SEQUENCE

ASN1_tag = <ASN1Tag PDU_TRAPv2[167]>
class scapy.layers.snmp.ASN1_Class_SNMP

Bases: scapy.asn1.asn1.ASN1_Class_UNIVERSAL

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]>
PDU_BULK = <ASN1Tag PDU_BULK[165]>
PDU_GET = <ASN1Tag PDU_GET[160]>
PDU_INFORM = <ASN1Tag PDU_INFORM[166]>
PDU_NEXT = <ASN1Tag PDU_NEXT[161]>
PDU_RESPONSE = <ASN1Tag PDU_RESPONSE[162]>
PDU_SET = <ASN1Tag PDU_SET[163]>
PDU_TRAPv1 = <ASN1Tag PDU_TRAPv1[164]>
PDU_TRAPv2 = <ASN1Tag PDU_TRAPv2[167]>
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 = 'SNMP'
class scapy.layers.snmp.ASN1_SNMP_PDU_BULK(val)

Bases: scapy.asn1.asn1.ASN1_SEQUENCE

tag = <ASN1Tag PDU_BULK[165]>
class scapy.layers.snmp.ASN1_SNMP_PDU_GET(val)

Bases: scapy.asn1.asn1.ASN1_SEQUENCE

tag = <ASN1Tag PDU_GET[160]>
class scapy.layers.snmp.ASN1_SNMP_PDU_INFORM(val)

Bases: scapy.asn1.asn1.ASN1_SEQUENCE

tag = <ASN1Tag PDU_INFORM[166]>
class scapy.layers.snmp.ASN1_SNMP_PDU_NEXT(val)

Bases: scapy.asn1.asn1.ASN1_SEQUENCE

tag = <ASN1Tag PDU_NEXT[161]>
class scapy.layers.snmp.ASN1_SNMP_PDU_RESPONSE(val)

Bases: scapy.asn1.asn1.ASN1_SEQUENCE

tag = <ASN1Tag PDU_RESPONSE[162]>
class scapy.layers.snmp.ASN1_SNMP_PDU_SET(val)

Bases: scapy.asn1.asn1.ASN1_SEQUENCE

tag = <ASN1Tag PDU_SET[163]>
class scapy.layers.snmp.ASN1_SNMP_PDU_TRAPv1(val)

Bases: scapy.asn1.asn1.ASN1_SEQUENCE

tag = <ASN1Tag PDU_TRAPv1[164]>
class scapy.layers.snmp.ASN1_SNMP_PDU_TRAPv2(val)

Bases: scapy.asn1.asn1.ASN1_SEQUENCE

tag = <ASN1Tag PDU_TRAPv2[167]>
class scapy.layers.snmp.BERcodec_SNMP_PDU_BULK

Bases: scapy.asn1.ber.BERcodec_SEQUENCE

tag = <ASN1Tag PDU_BULK[165]>
class scapy.layers.snmp.BERcodec_SNMP_PDU_GET

Bases: scapy.asn1.ber.BERcodec_SEQUENCE

tag = <ASN1Tag PDU_GET[160]>
class scapy.layers.snmp.BERcodec_SNMP_PDU_INFORM

Bases: scapy.asn1.ber.BERcodec_SEQUENCE

tag = <ASN1Tag PDU_INFORM[166]>
class scapy.layers.snmp.BERcodec_SNMP_PDU_NEXT

Bases: scapy.asn1.ber.BERcodec_SEQUENCE

tag = <ASN1Tag PDU_NEXT[161]>
class scapy.layers.snmp.BERcodec_SNMP_PDU_RESPONSE

Bases: scapy.asn1.ber.BERcodec_SEQUENCE

tag = <ASN1Tag PDU_RESPONSE[162]>
class scapy.layers.snmp.BERcodec_SNMP_PDU_SET

Bases: scapy.asn1.ber.BERcodec_SEQUENCE

tag = <ASN1Tag PDU_SET[163]>
class scapy.layers.snmp.BERcodec_SNMP_PDU_TRAPv1

Bases: scapy.asn1.ber.BERcodec_SEQUENCE

tag = <ASN1Tag PDU_TRAPv1[164]>
class scapy.layers.snmp.BERcodec_SNMP_PDU_TRAPv2

Bases: scapy.asn1.ber.BERcodec_SEQUENCE

tag = <ASN1Tag PDU_TRAPv2[167]>
class scapy.layers.snmp.SNMP

Bases: scapy.asn1packet.ASN1_Packet

ASN1_codec = <ASN1Codec BER[1]>
ASN1_root = <ASN1F_SEQUENCE(<scapy.asn1fields.ASN1F_enum_INTEGER object>, <scapy.asn1fields.ASN1F_STRING object>, <scapy.asn1fields.ASN1F_CHOICE object>)>
aliastypes
answers(other)
fields_desc
SNMP fields

version

ASN1F_enum_INTEGER

0x1 <ASN1_INTEGER[1]>

community

ASN1F_STRING

<ASN1_STRING['public']>

PDU

ASN1F_CHOICE

<SNMPget  |>

class scapy.layers.snmp.SNMPbulk

Bases: scapy.asn1packet.ASN1_Packet

ASN1_codec = <ASN1Codec BER[1]>
ASN1_root = <ASN1F_SNMP_PDU_BULK(<scapy.asn1fields.ASN1F_INTEGER object>, <scapy.asn1fields.ASN1F_INTEGER object>, <scapy.asn1fields.ASN1F_INTEGER object>, <ASN1F_SEQUENCE_OF varbindlist>)>
aliastypes
fields_desc
SNMPbulk fields

id

ASN1F_INTEGER

0x0 <ASN1_INTEGER[0]>

non_repeaters

ASN1F_INTEGER

0x0 <ASN1_INTEGER[0]>

max_repetitions

ASN1F_INTEGER

0x0 <ASN1_INTEGER[0]>

varbindlist

ASN1F_SEQUENCE_OF

[]

class scapy.layers.snmp.SNMPget

Bases: scapy.asn1packet.ASN1_Packet

ASN1_codec = <ASN1Codec BER[1]>
ASN1_root = <ASN1F_SNMP_PDU_GET(<scapy.asn1fields.ASN1F_INTEGER object>, <scapy.asn1fields.ASN1F_enum_INTEGER object>, <scapy.asn1fields.ASN1F_INTEGER object>, <ASN1F_SEQUENCE_OF varbindlist>)>
aliastypes
fields_desc
SNMPget fields

id

ASN1F_INTEGER

0x0 <ASN1_INTEGER[0]>

error

ASN1F_enum_INTEGER

0x0 <ASN1_INTEGER[0]>

error_index

ASN1F_INTEGER

0x0 <ASN1_INTEGER[0]>

varbindlist

ASN1F_SEQUENCE_OF

[]

class scapy.layers.snmp.SNMPinform

Bases: scapy.asn1packet.ASN1_Packet

ASN1_codec = <ASN1Codec BER[1]>
ASN1_root = <ASN1F_SNMP_PDU_INFORM(<scapy.asn1fields.ASN1F_INTEGER object>, <scapy.asn1fields.ASN1F_enum_INTEGER object>, <scapy.asn1fields.ASN1F_INTEGER object>, <ASN1F_SEQUENCE_OF varbindlist>)>
aliastypes
fields_desc
SNMPinform fields

id

ASN1F_INTEGER

0x0 <ASN1_INTEGER[0]>

error

ASN1F_enum_INTEGER

0x0 <ASN1_INTEGER[0]>

error_index

ASN1F_INTEGER

0x0 <ASN1_INTEGER[0]>

varbindlist

ASN1F_SEQUENCE_OF

[]

class scapy.layers.snmp.SNMPnext

Bases: scapy.asn1packet.ASN1_Packet

ASN1_codec = <ASN1Codec BER[1]>
ASN1_root = <ASN1F_SNMP_PDU_NEXT(<scapy.asn1fields.ASN1F_INTEGER object>, <scapy.asn1fields.ASN1F_enum_INTEGER object>, <scapy.asn1fields.ASN1F_INTEGER object>, <ASN1F_SEQUENCE_OF varbindlist>)>
aliastypes
fields_desc
SNMPnext fields

id

ASN1F_INTEGER

0x0 <ASN1_INTEGER[0]>

error

ASN1F_enum_INTEGER

0x0 <ASN1_INTEGER[0]>

error_index

ASN1F_INTEGER

0x0 <ASN1_INTEGER[0]>

varbindlist

ASN1F_SEQUENCE_OF

[]

class scapy.layers.snmp.SNMPresponse

Bases: scapy.asn1packet.ASN1_Packet

ASN1_codec = <ASN1Codec BER[1]>
ASN1_root = <ASN1F_SNMP_PDU_RESPONSE(<scapy.asn1fields.ASN1F_INTEGER object>, <scapy.asn1fields.ASN1F_enum_INTEGER object>, <scapy.asn1fields.ASN1F_INTEGER object>, <ASN1F_SEQUENCE_OF varbindlist>)>
aliastypes
fields_desc
SNMPresponse fields

id

ASN1F_INTEGER

0x0 <ASN1_INTEGER[0]>

error

ASN1F_enum_INTEGER

0x0 <ASN1_INTEGER[0]>

error_index

ASN1F_INTEGER

0x0 <ASN1_INTEGER[0]>

varbindlist

ASN1F_SEQUENCE_OF

[]

class scapy.layers.snmp.SNMPset

Bases: scapy.asn1packet.ASN1_Packet

ASN1_codec = <ASN1Codec BER[1]>
ASN1_root = <ASN1F_SNMP_PDU_SET(<scapy.asn1fields.ASN1F_INTEGER object>, <scapy.asn1fields.ASN1F_enum_INTEGER object>, <scapy.asn1fields.ASN1F_INTEGER object>, <ASN1F_SEQUENCE_OF varbindlist>)>
aliastypes
fields_desc
SNMPset fields

id

ASN1F_INTEGER

0x0 <ASN1_INTEGER[0]>

error

ASN1F_enum_INTEGER

0x0 <ASN1_INTEGER[0]>

error_index

ASN1F_INTEGER

0x0 <ASN1_INTEGER[0]>

varbindlist

ASN1F_SEQUENCE_OF

[]

class scapy.layers.snmp.SNMPtrapv1

Bases: scapy.asn1packet.ASN1_Packet

ASN1_codec = <ASN1Codec BER[1]>
ASN1_root = <ASN1F_SNMP_PDU_TRAPv1(<scapy.asn1fields.ASN1F_OID object>, <scapy.asn1fields.ASN1F_IPADDRESS object>, <scapy.asn1fields.ASN1F_enum_INTEGER object>, <scapy.asn1fields.ASN1F_INTEGER object>, <scapy.asn1fields.ASN1F_TIME_TICKS object>, <ASN1F_SEQUENCE_OF varbindlist>)>
aliastypes
fields_desc
SNMPtrapv1 fields

enterprise

ASN1F_OID

<ASN1_OID['.1.3']>

agent_addr

ASN1F_IPADDRESS

<ASN1_IPADDRESS['0.0.0.0']>

generic_trap

ASN1F_enum_INTEGER

0x0 <ASN1_INTEGER[0]>

specific_trap

ASN1F_INTEGER

0x0 <ASN1_INTEGER[0]>

time_stamp

ASN1F_TIME_TICKS

0x5dcf69a4 <ASN1_TIME_TICKS[<IntAutoTime>]>

varbindlist

ASN1F_SEQUENCE_OF

[]

class scapy.layers.snmp.SNMPtrapv2

Bases: scapy.asn1packet.ASN1_Packet

ASN1_codec = <ASN1Codec BER[1]>
ASN1_root = <ASN1F_SNMP_PDU_TRAPv2(<scapy.asn1fields.ASN1F_INTEGER object>, <scapy.asn1fields.ASN1F_enum_INTEGER object>, <scapy.asn1fields.ASN1F_INTEGER object>, <ASN1F_SEQUENCE_OF varbindlist>)>
aliastypes
fields_desc
SNMPtrapv2 fields

id

ASN1F_INTEGER

0x0 <ASN1_INTEGER[0]>

error

ASN1F_enum_INTEGER

0x0 <ASN1_INTEGER[0]>

error_index

ASN1F_INTEGER

0x0 <ASN1_INTEGER[0]>

varbindlist

ASN1F_SEQUENCE_OF

[]

class scapy.layers.snmp.SNMPvarbind

Bases: scapy.asn1packet.ASN1_Packet

ASN1_codec = <ASN1Codec BER[1]>
ASN1_root = <ASN1F_SEQUENCE(<scapy.asn1fields.ASN1F_OID object>, <scapy.asn1fields.ASN1F_field object>)>
aliastypes
fields_desc
SNMPvarbind fields

oid

ASN1F_OID

<ASN1_OID['.1.3']>

value

ASN1F_field

<ASN1_NULL[0]>

scapy.layers.snmp.snmpwalk(dst, oid='1', community='public')