scapy.layers.ppp

PPP (Point to Point Protocol)

[RFC 1661]

class scapy.layers.ppp.DIR_PPP(_pkt, /, *, direction=0)[源代码]

基类:Packet

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

                           Fig. DIR_PPP                           
DIR_PPP fields

direction

ByteEnumField

0

payload_guess

Possible sublayers: PPP

class scapy.layers.ppp.HDLC(_pkt, /, *, address=255, control=3)[源代码]

基类:Packet

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

                            Fig. HDLC                             
HDLC fields

address

XByteField

255

control

XByteField

3

payload_guess

Possible sublayers: PPP

class scapy.layers.ppp.PPP(_pkt, /, *, proto=33)[源代码]

基类:Packet

aliastypes
classmethod dispatch_hook(_pkt=None, *args, **kargs)[源代码]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             PROTO             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                             Fig. PPP                             
PPP fields

proto

_PPPProtoField

33

payload_guess

Possible sublayers: EAP, IP, IPv6, PPP_CHAP, PPP_ECP, PPP_IPCP, PPP_LCP, PPP_PAP

class scapy.layers.ppp.PPP_CHAP(_pkt, /, *, code=1, id=0, len=None, data=b'')[源代码]

基类:Packet

aliastypes
answers(other)[源代码]
classmethod dispatch_hook(_pkt=None, *_, **kargs)[源代码]
extract_padding(pay)[源代码]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      CODE     |       ID      |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              DATA             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                          Fig. PPP_CHAP                           
PPP_CHAP fields

code

ByteEnumField

1

id

XByteField

0

len

FieldLenField

None

data

StrLenField

b''

mysummary()[源代码]
class scapy.layers.ppp.PPP_CHAP_ChallengeResponse(_pkt, /, *, code=1, id=0, len=None, value_size=None, value=b'\x00\x00\x00\x00\x00\x00\x00\x00', optional_name=b'')[源代码]

基类:PPP_CHAP

aliastypes
answers(other)[源代码]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      CODE     |       ID      |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   VALUE SIZE  |             VALUE             | OPTIONAL NAME |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |
+-+-+-+-+-+-+-+-+

                 Fig. PPP_CHAP_ChallengeResponse                  
PPP_CHAP_ChallengeResponse fields

code

ByteEnumField

1

id

XByteField

0

len

FieldLenField

None

value_size

FieldLenField

None

value

XStrLenField

b'\x00\x00\x00\x00\x00\x00\x00\x00'

optional_name

StrLenField

b''

mysummary()[源代码]
class scapy.layers.ppp.PPP_ECP(_pkt, /, *, code=1, id=0, len=None, options=[])[源代码]

基类:Packet

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

                           Fig. PPP_ECP                           
PPP_ECP fields

code

ByteEnumField

1

id

XByteField

0

len

FieldLenField

None

options

PacketListField

[]

class scapy.layers.ppp.PPP_ECP_Option(_pkt, /, *, type=None, len=None, data=b'')[源代码]

基类:Packet

aliastypes
classmethod dispatch_hook(_pkt=None, *args, **kargs)[源代码]
extract_padding(pay)[源代码]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      LEN      |              DATA             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                       Fig. PPP_ECP_Option                        
PPP_ECP_Option fields

type

ByteEnumField

None

len

FieldLenField

None

data

StrLenField

b''

classmethod register_variant()[源代码]
registered_options = {0: <class 'scapy.layers.ppp.PPP_ECP_Option_OUI'>, None: <class 'scapy.layers.ppp.PPP_ECP_Option'>}
class scapy.layers.ppp.PPP_ECP_Option_OUI(_pkt, /, *, type=0, len=None, oui=0, subtype=0, data=b'')[源代码]

基类:PPP_ECP_Option

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

                     Fig. PPP_ECP_Option_OUI                      
PPP_ECP_Option_OUI fields

type

ByteEnumField

0

len

FieldLenField

None

oui

OUIField

0

subtype

ByteField

0

data

StrLenField

b''

class scapy.layers.ppp.PPP_IPCP(_pkt, /, *, code=1, id=0, len=None, options=[])[源代码]

基类:Packet

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

                          Fig. PPP_IPCP                           
PPP_IPCP fields

code

ByteEnumField

1

id

XByteField

0

len

FieldLenField

None

options

PacketListField

[]

class scapy.layers.ppp.PPP_IPCP_Option(_pkt, /, *, type=None, len=None, data=b'')[源代码]

基类:Packet

aliastypes
classmethod dispatch_hook(_pkt=None, *args, **kargs)[源代码]
extract_padding(pay)[源代码]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      LEN      |              DATA             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                       Fig. PPP_IPCP_Option                       
PPP_IPCP_Option fields

type

ByteEnumField

None

len

FieldLenField

None

data

StrLenField

b''

classmethod register_variant()[源代码]
registered_options = {129: <class 'scapy.layers.ppp.PPP_IPCP_Option_DNS1'>, 130: <class 'scapy.layers.ppp.PPP_IPCP_Option_NBNS1'>, 131: <class 'scapy.layers.ppp.PPP_IPCP_Option_DNS2'>, 132: <class 'scapy.layers.ppp.PPP_IPCP_Option_NBNS2'>, 3: <class 'scapy.layers.ppp.PPP_IPCP_Option_IPAddress'>, None: <class 'scapy.layers.ppp.PPP_IPCP_Option'>}
class scapy.layers.ppp.PPP_IPCP_Option_DNS1(_pkt, /, *, type=129, len=None, data='0.0.0.0', garbage=b'')[源代码]

基类:PPP_IPCP_Option_IPAddress

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

                    Fig. PPP_IPCP_Option_DNS1                     
PPP_IPCP_Option_DNS1 fields

type

ByteEnumField

129

len

FieldLenField

None

data

IPField

'0.0.0.0'

garbage

StrLenField

b''

class scapy.layers.ppp.PPP_IPCP_Option_DNS2(_pkt, /, *, type=131, len=None, data='0.0.0.0', garbage=b'')[源代码]

基类:PPP_IPCP_Option_IPAddress

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

                    Fig. PPP_IPCP_Option_DNS2                     
PPP_IPCP_Option_DNS2 fields

type

ByteEnumField

131

len

FieldLenField

None

data

IPField

'0.0.0.0'

garbage

StrLenField

b''

class scapy.layers.ppp.PPP_IPCP_Option_IPAddress(_pkt, /, *, type=3, len=None, data='0.0.0.0', garbage=b'')[源代码]

基类:PPP_IPCP_Option

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

                  Fig. PPP_IPCP_Option_IPAddress                  
PPP_IPCP_Option_IPAddress fields

type

ByteEnumField

3

len

FieldLenField

None

data

IPField

'0.0.0.0'

garbage

StrLenField

b''

class scapy.layers.ppp.PPP_IPCP_Option_NBNS1(_pkt, /, *, type=130, len=None, data='0.0.0.0', garbage=b'')[源代码]

基类:PPP_IPCP_Option_IPAddress

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

                    Fig. PPP_IPCP_Option_NBNS1                    
PPP_IPCP_Option_NBNS1 fields

type

ByteEnumField

130

len

FieldLenField

None

data

IPField

'0.0.0.0'

garbage

StrLenField

b''

class scapy.layers.ppp.PPP_IPCP_Option_NBNS2(_pkt, /, *, type=132, len=None, data='0.0.0.0', garbage=b'')[源代码]

基类:PPP_IPCP_Option_IPAddress

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

                    Fig. PPP_IPCP_Option_NBNS2                    
PPP_IPCP_Option_NBNS2 fields

type

ByteEnumField

132

len

FieldLenField

None

data

IPField

'0.0.0.0'

garbage

StrLenField

b''

class scapy.layers.ppp.PPP_LCP(_pkt, /, *, code=5, id=0, len=None, data=b'')[源代码]

基类:Packet

aliastypes
classmethod dispatch_hook(_pkt=None, *args, **kargs)[源代码]
extract_padding(pay)[源代码]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      CODE     |       ID      |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              DATA             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                           Fig. PPP_LCP                           
PPP_LCP fields

code

ByteEnumField

5

id

XByteField

0

len

FieldLenField

None

data

StrLenField

b''

mysummary()[源代码]
class scapy.layers.ppp.PPP_LCP_ACCM_Option(_pkt, /, *, type=2, len=6, accm=0)[源代码]

基类:PPP_LCP_Option

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

                     Fig. PPP_LCP_ACCM_Option                     
PPP_LCP_ACCM_Option fields

type

ByteEnumField

2

len

ByteField

6

accm

BitField (32 bits)

0

class scapy.layers.ppp.PPP_LCP_Auth_Protocol_Option(_pkt, /, *, type=3, len=None, auth_protocol=49187, data=b'', algorithm=5)[源代码]

基类:PPP_LCP_Option

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

                Fig. PPP_LCP_Auth_Protocol_Option                 
PPP_LCP_Auth_Protocol_Option fields

type

ByteEnumField

3

len

FieldLenField

None

auth_protocol

ShortEnumField

49187

data

StrLenField (Cond)

b''

algorithm

ByteEnumField (Cond)

5

class scapy.layers.ppp.PPP_LCP_Callback_Option(_pkt, /, *, type=13, len=None, operation=0, message=b'')[源代码]

基类:PPP_LCP_Option

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

                   Fig. PPP_LCP_Callback_Option                   
PPP_LCP_Callback_Option fields

type

ByteEnumField

13

len

FieldLenField

None

operation

ByteEnumField

0

message

StrLenField

b''

class scapy.layers.ppp.PPP_LCP_Code_Reject(_pkt, /, *, code=7, id=0, len=None, rejected_packet=None)[源代码]

基类:PPP_LCP

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

                     Fig. PPP_LCP_Code_Reject                     
PPP_LCP_Code_Reject fields

code

ByteEnumField

7

id

XByteField

0

len

FieldLenField

None

rejected_packet

PacketField

None

class scapy.layers.ppp.PPP_LCP_Configure(_pkt, /, *, code=1, id=0, len=None, options=[])[源代码]

基类:PPP_LCP

aliastypes
answers(other)[源代码]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      CODE     |       ID      |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            OPTIONS            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Fig. PPP_LCP_Configure                      
PPP_LCP_Configure fields

code

ByteEnumField

1

id

XByteField

0

len

FieldLenField

None

options

PacketListField

[]

class scapy.layers.ppp.PPP_LCP_Discard_Request(_pkt, /, *, code=11, id=0, len=None, magic_number=None, data=b'')[源代码]

基类:PPP_LCP

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      CODE     |       ID      |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          MAGIC NUMBER                         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              DATA             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                   Fig. PPP_LCP_Discard_Request                   
PPP_LCP_Discard_Request fields

code

ByteEnumField

11

id

XByteField

0

len

FieldLenField

None

magic_number

IntField

None

data

StrLenField

b''

class scapy.layers.ppp.PPP_LCP_Echo(_pkt, /, *, code=9, id=0, len=None, magic_number=None, data=b'')[源代码]

基类:PPP_LCP_Discard_Request

aliastypes
answers(other)[源代码]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      CODE     |       ID      |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                          MAGIC NUMBER                         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              DATA             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                        Fig. PPP_LCP_Echo                         
PPP_LCP_Echo fields

code

ByteEnumField

9

id

XByteField

0

len

FieldLenField

None

magic_number

IntField

None

data

StrLenField

b''

class scapy.layers.ppp.PPP_LCP_MRU_Option(_pkt, /, *, type=1, len=4, max_recv_unit=1500)[源代码]

基类:PPP_LCP_Option

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

                     Fig. PPP_LCP_MRU_Option                      
PPP_LCP_MRU_Option fields

type

ByteEnumField

1

len

ByteField

4

max_recv_unit

ShortField

1500

class scapy.layers.ppp.PPP_LCP_Magic_Number_Option(_pkt, /, *, type=5, len=6, magic_number=None)[源代码]

基类:PPP_LCP_Option

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

                 Fig. PPP_LCP_Magic_Number_Option                 
PPP_LCP_Magic_Number_Option fields

type

ByteEnumField

5

len

ByteField

6

magic_number

IntField

None

class scapy.layers.ppp.PPP_LCP_Option(_pkt, /, *, type=None, len=None, data=None)[源代码]

基类:Packet

aliastypes
classmethod dispatch_hook(_pkt=None, *args, **kargs)[源代码]
extract_padding(pay)[源代码]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      TYPE     |      LEN      |              DATA             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                       Fig. PPP_LCP_Option                        
PPP_LCP_Option fields

type

ByteEnumField

None

len

FieldLenField

None

data

StrLenField

None

classmethod register_variant()[源代码]
registered_options = {1: <class 'scapy.layers.ppp.PPP_LCP_MRU_Option'>, 13: <class 'scapy.layers.ppp.PPP_LCP_Callback_Option'>, 2: <class 'scapy.layers.ppp.PPP_LCP_ACCM_Option'>, 3: <class 'scapy.layers.ppp.PPP_LCP_Auth_Protocol_Option'>, 4: <class 'scapy.layers.ppp.PPP_LCP_Quality_Protocol_Option'>, 5: <class 'scapy.layers.ppp.PPP_LCP_Magic_Number_Option'>, None: <class 'scapy.layers.ppp.PPP_LCP_Option'>}
class scapy.layers.ppp.PPP_LCP_Protocol_Reject(_pkt, /, *, code=8, id=0, len=None, rejected_protocol=None, rejected_information=None)[源代码]

基类:PPP_LCP

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

                   Fig. PPP_LCP_Protocol_Reject                   
PPP_LCP_Protocol_Reject fields

code

ByteEnumField

8

id

XByteField

0

len

FieldLenField

None

rejected_protocol

ShortEnumField

None

rejected_information

PacketField

None

class scapy.layers.ppp.PPP_LCP_Quality_Protocol_Option(_pkt, /, *, type=4, len=None, quality_protocol=49189, data=b'')[源代码]

基类:PPP_LCP_Option

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

               Fig. PPP_LCP_Quality_Protocol_Option               
PPP_LCP_Quality_Protocol_Option fields

type

ByteEnumField

4

len

FieldLenField

None

quality_protocol

ShortEnumField

49189

data

StrLenField

b''

class scapy.layers.ppp.PPP_LCP_Terminate(_pkt, /, *, code=5, id=0, len=None, data=b'')[源代码]

基类:PPP_LCP

aliastypes
answers(other)[源代码]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      CODE     |       ID      |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              DATA             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Fig. PPP_LCP_Terminate                      
PPP_LCP_Terminate fields

code

ByteEnumField

5

id

XByteField

0

len

FieldLenField

None

data

StrLenField

b''

class scapy.layers.ppp.PPP_PAP(_pkt, /, *, code=1, id=0, len=None, data=b'')[源代码]

基类:Packet

aliastypes
classmethod dispatch_hook(_pkt=None, *_, **kargs)[源代码]
extract_padding(pay)[源代码]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      CODE     |       ID      |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              DATA             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                           Fig. PPP_PAP                           
PPP_PAP fields

code

ByteEnumField

1

id

XByteField

0

len

FieldLenField

None

data

StrLenField

b''

class scapy.layers.ppp.PPP_PAP_Request(_pkt, /, *, code=1, id=0, len=None, username_len=None, username=None, passwd_len=None, password=None)[源代码]

基类:PPP_PAP

aliastypes
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      CODE     |       ID      |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  USERNAME LEN |            USERNAME           |   PASSWD LEN  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            PASSWORD           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                       Fig. PPP_PAP_Request                       
PPP_PAP_Request fields

code

ByteEnumField

1

id

XByteField

0

len

FieldLenField

None

username_len

FieldLenField

None

username

StrLenField

None

passwd_len

FieldLenField

None

password

StrLenField

None

mysummary()[源代码]
class scapy.layers.ppp.PPP_PAP_Response(_pkt, /, *, code=2, id=0, len=None, msg_len=None, message=b'')[源代码]

基类:PPP_PAP

aliastypes
answers(other)[源代码]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      CODE     |       ID      |              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    MSG LEN    |            MESSAGE            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                      Fig. PPP_PAP_Response                       
PPP_PAP_Response fields

code

ByteEnumField

2

id

XByteField

0

len

FieldLenField

None

msg_len

FieldLenField

None

message

StrLenField

b''

mysummary()[源代码]
class scapy.layers.ppp.PPPoE(_pkt, /, *, version=1, type=1, code=0, sessionid=0, len=None)[源代码]

基类:Packet

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

                            Fig. PPPoE                            
PPPoE fields

version

BitField (4 bits)

1

type

BitField (4 bits)

1

code

ByteEnumField

0

sessionid

XShortField

0

len

ShortField

None

payload_guess

Possible sublayers: PPP

post_build(p, pay)[源代码]
class scapy.layers.ppp.PPPoED(_pkt, /, *, version=1, type=1, code=9, sessionid=0, len=None)[源代码]

基类:PPPoE

aliastypes
code_list = {0: 'PPP Session Stage', 7: 'PPPoE Active Discovery Offer (PADO)', 9: 'PPPoE Active Discovery Initiation (PADI)', 10: 'PPPoE Active Discovery Session-Grant (PADG)', 11: 'PPPoE Active Discovery Session-Credit Response (PADC)', 12: 'PPPoE Active Discovery Quality (PADQ)', 25: 'PPPoE Active Discovery Request (PADR)', 101: 'PPPoE Active Discovery Session-confirmation (PADS)', 167: 'PPPoE Active Discovery Terminate (PADT)'}
extract_padding(s)[源代码]
fields_desc
Display RFC-like schema
 0                   1                   2                   3
 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|VERSION|  TYPE |      CODE     |           SESSIONID           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              LEN              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                           Fig. PPPoED                            
PPPoED fields

version

BitField (4 bits)

1

type

BitField (4 bits)

1

code

ByteEnumField

9

sessionid

XShortField

0

len

ShortField

None

mysummary()[源代码]
payload_guess

Possible sublayers: PPPoED_Tags

class scapy.layers.ppp.PPPoED_Tags(_pkt, /, *, tag_list=[])[源代码]

基类:Packet

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

                         Fig. PPPoED_Tags                         
PPPoED_Tags fields

tag_list

PacketListField

[]

mysummary()[源代码]
class scapy.layers.ppp.PPPoETag(_pkt, /, *, tag_type=None, tag_len=None, tag_value=b'')[源代码]

基类:Packet

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

                          Fig. PPPoETag                           
PPPoETag fields

tag_type

ShortEnumField

None

tag_len

FieldLenField

None

tag_value

StrLenField

b''

tag_list = {0: 'End-Of-List', 257: 'Service-Name', 258: 'AC-Name', 259: 'Host-Uniq', 260: 'AC-Cookie', 261: 'Vendor-Specific', 262: 'Credits', 263: 'Metrics', 264: 'Sequence Number', 265: 'Credit Scale Factor', 272: 'Relay-Session-Id', 288: 'PPP-Max-Payload', 513: 'Service-Name-Error', 514: 'AC-System-Error', 515: 'Generic-Error'}
scapy.layers.ppp.adjust_auth_len(pkt, x)[源代码]