scapy.contrib.ikev2

Internet Key Exchange Protocol Version 2 (IKEv2), RFC 7296

class scapy.contrib.ikev2.ConfigurationAttribute(_pkt, /, *, type=1, length=None, value=None)[源代码]

基类: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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              TYPE             |             LENGTH            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             VALUE             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                   Fig. ConfigurationAttribute                    
ConfigurationAttribute fields

type

ShortEnumField

1

length

FieldLenField

None

value

MultipleTypeField (IPField, IP6Field, XStrLenField)

b''

class scapy.contrib.ikev2.EncryptedTrafficSelector(_pkt, /, *, TS_type=9, IP_protocol_ID=None, length=16, res=0, starting_address_FC=0, res2=0, ending_address_FC=0, starting_R_CTL=0, ending_R_CTL=0, starting_type=0, ending_type=0)[源代码]

基类:TrafficSelector

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    TS TYPE    | IP PROTOCOL ID|             LENGTH            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|      RES      |              STARTING ADDRESS FC              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |      RES2     |       ENDING ADDRESS FC       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               | STARTING R CTL|  ENDING R CTL |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| STARTING TYPE |  ENDING TYPE  |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                  Fig. EncryptedTrafficSelector                   
EncryptedTrafficSelector fields

TS_type

ByteEnumField

9

IP_protocol_ID

ByteEnumField

None

length

ShortField

16

res

ByteField

0

starting_address_FC

X3BytesField

0

res2

ByteField

0

ending_address_FC

X3BytesField

0

starting_R_CTL

ByteField

0

ending_R_CTL

ByteField

0

starting_type

ByteField

0

ending_type

ByteField

0

class scapy.contrib.ikev2.IKEv2(_pkt, /, *, init_SPI=b'', resp_SPI=b'', next_payload=0, version=32, exch_type=0, flags=<Flag 0 ()>, id=0, length=None)[源代码]

基类:_IKEv2_Packet

aliastypes
answers(other)[源代码]
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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            INIT SPI                           |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                            RESP SPI                           |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  NEXT PAYLOAD |    VERSION    |   EXCH TYPE   |     FLAGS     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                               ID                              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                             LENGTH                            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                            Fig. IKEv2                            
IKEv2 fields

init_SPI

XStrFixedLenField

b''

resp_SPI

XStrFixedLenField

b''

next_payload

ByteEnumField

0

version

XByteField

32

exch_type

ByteEnumField

0

flags

FlagsField

<Flag 0 ()>

id

IntField

0

length

IntField

None

post_build(p, pay)[源代码]
class scapy.contrib.ikev2.IKEv2_AUTH(_pkt, /, *, next_payload=None, flags=<Flag 0 ()>, length=None, auth_type=None, res2=0, load=b'')[源代码]

基类:IKEv2_Payload

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  NEXT PAYLOAD |     FLAGS     |             LENGTH            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   AUTH TYPE   |                      RES2                     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |              LOAD             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                         Fig. IKEv2_AUTH                          
IKEv2_AUTH fields

next_payload

ByteEnumField

None

flags

FlagsField

<Flag 0 ()>

length

ShortField

None

auth_type

ByteEnumField

None

res2

X3BytesField

0

load

XStrLenField

b''

class scapy.contrib.ikev2.IKEv2_CERT(_pkt, /, *, next_payload=None, flags=<Flag 0 ()>, length=None, cert_encoding=4, cert_data=None)[源代码]

基类:IKEv2_Payload

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  NEXT PAYLOAD |     FLAGS     |             LENGTH            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| CERT ENCODING |           CERT DATA           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                         Fig. IKEv2_CERT                          
IKEv2_CERT fields

next_payload

ByteEnumField

None

flags

FlagsField

<Flag 0 ()>

length

ShortField

None

cert_encoding

ByteEnumField

4

cert_data

MultipleTypeField (PacketLenField, PacketLenField, XStrLenField)

b''

class scapy.contrib.ikev2.IKEv2_CERTREQ(_pkt, /, *, next_payload=None, flags=<Flag 0 ()>, length=None, cert_encoding=0, cert_authority=b'')[源代码]

基类:IKEv2_Payload

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  NEXT PAYLOAD |     FLAGS     |             LENGTH            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| CERT ENCODING |         CERT AUTHORITY        |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                        Fig. IKEv2_CERTREQ                        
IKEv2_CERTREQ fields

next_payload

ByteEnumField

None

flags

FlagsField

<Flag 0 ()>

length

ShortField

None

cert_encoding

ByteEnumField

0

cert_authority

XStrLenField

b''

class scapy.contrib.ikev2.IKEv2_CP(_pkt, /, *, next_payload=None, flags=<Flag 0 ()>, length=None, CFGType=1, res2=0, attributes=[])[源代码]

基类:IKEv2_Payload

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  NEXT PAYLOAD |     FLAGS     |             LENGTH            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    CFGTYPE    |                      RES2                     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |           ATTRIBUTES          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                          Fig. IKEv2_CP                           
IKEv2_CP fields

next_payload

ByteEnumField

None

flags

FlagsField

<Flag 0 ()>

length

ShortField

None

CFGType

ByteEnumField

1

res2

X3BytesField

0

attributes

PacketListField

[]

class scapy.contrib.ikev2.IKEv2_Delete(_pkt, /, *, next_payload=None, flags=<Flag 0 ()>, length=None, proto=None, SPIsize=None, SPInum=0, SPI=[])[源代码]

基类:IKEv2_Payload

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  NEXT PAYLOAD |     FLAGS     |             LENGTH            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     PROTO     |    SPISIZE    |             SPINUM            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              SPI              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                        Fig. IKEv2_Delete                         
IKEv2_Delete fields

next_payload

ByteEnumField

None

flags

FlagsField

<Flag 0 ()>

length

ShortField

None

proto

ByteEnumField

None

SPIsize

FieldLenField

None

SPInum

ShortField

0

SPI

FieldListField

[]

class scapy.contrib.ikev2.IKEv2_EAP(_pkt, /, *, next_payload=None, flags=<Flag 0 ()>, length=None, load=b'')[源代码]

基类:IKEv2_Payload

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  NEXT PAYLOAD |     FLAGS     |             LENGTH            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              LOAD             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                          Fig. IKEv2_EAP                          
IKEv2_EAP fields

next_payload

ByteEnumField

None

flags

FlagsField

<Flag 0 ()>

length

ShortField

None

load

XStrLenField

b''

class scapy.contrib.ikev2.IKEv2_Encrypted(_pkt, /, *, next_payload=None, flags=<Flag 0 ()>, length=None, load=b'')[源代码]

基类:IKEv2_Payload

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  NEXT PAYLOAD |     FLAGS     |             LENGTH            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              LOAD             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                       Fig. IKEv2_Encrypted                       
IKEv2_Encrypted fields

next_payload

ByteEnumField

None

flags

FlagsField

<Flag 0 ()>

length

ShortField

None

load

XStrLenField

b''

class scapy.contrib.ikev2.IKEv2_Encrypted_Fragment(_pkt, /, *, next_payload=None, flags=<Flag 0 ()>, length=None, frag_number=1, frag_total=1, load=b'')[源代码]

基类:IKEv2_Payload

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  NEXT PAYLOAD |     FLAGS     |             LENGTH            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|          FRAG NUMBER          |           FRAG TOTAL          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              LOAD             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                  Fig. IKEv2_Encrypted_Fragment                   
IKEv2_Encrypted_Fragment fields

next_payload

ByteEnumField

None

flags

FlagsField

<Flag 0 ()>

length

ShortField

None

frag_number

ShortField

1

frag_total

ShortField

1

load

XStrLenField

b''

class scapy.contrib.ikev2.IKEv2_GSA(_pkt, /, *, next_payload=None, flags=<Flag 0 ()>, length=None, load=b'')[源代码]

基类:IKEv2_Payload

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  NEXT PAYLOAD |     FLAGS     |             LENGTH            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              LOAD             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                          Fig. IKEv2_GSA                          
IKEv2_GSA fields

next_payload

ByteEnumField

None

flags

FlagsField

<Flag 0 ()>

length

ShortField

None

load

XStrLenField

b''

class scapy.contrib.ikev2.IKEv2_GSPM(_pkt, /, *, next_payload=None, flags=<Flag 0 ()>, length=None, load=b'')[源代码]

基类:IKEv2_Payload

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  NEXT PAYLOAD |     FLAGS     |             LENGTH            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              LOAD             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                         Fig. IKEv2_GSPM                          
IKEv2_GSPM fields

next_payload

ByteEnumField

None

flags

FlagsField

<Flag 0 ()>

length

ShortField

None

load

XStrLenField

b''

class scapy.contrib.ikev2.IKEv2_IDg(_pkt, /, *, next_payload=None, flags=<Flag 0 ()>, length=None, load=b'')[源代码]

基类:IKEv2_Payload

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  NEXT PAYLOAD |     FLAGS     |             LENGTH            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              LOAD             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                          Fig. IKEv2_IDg                          
IKEv2_IDg fields

next_payload

ByteEnumField

None

flags

FlagsField

<Flag 0 ()>

length

ShortField

None

load

XStrLenField

b''

class scapy.contrib.ikev2.IKEv2_IDi(_pkt, /, *, next_payload=None, flags=<Flag 0 ()>, length=None, IDtype=1, res2=0, ID=None)[源代码]

基类:IKEv2_Payload

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  NEXT PAYLOAD |     FLAGS     |             LENGTH            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     IDTYPE    |                      RES2                     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |               ID              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                          Fig. IKEv2_IDi                          
IKEv2_IDi fields

next_payload

ByteEnumField

None

flags

FlagsField

<Flag 0 ()>

length

ShortField

None

IDtype

ByteEnumField

1

res2

X3BytesField

0

ID

MultipleTypeField (IPField, IP6Field, XStrLenField)

b''

class scapy.contrib.ikev2.IKEv2_IDr(_pkt, /, *, next_payload=None, flags=<Flag 0 ()>, length=None, IDtype=1, res2=0, ID=None)[源代码]

基类:IKEv2_Payload

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  NEXT PAYLOAD |     FLAGS     |             LENGTH            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     IDTYPE    |                      RES2                     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |               ID              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                          Fig. IKEv2_IDr                          
IKEv2_IDr fields

next_payload

ByteEnumField

None

flags

FlagsField

<Flag 0 ()>

length

ShortField

None

IDtype

ByteEnumField

1

res2

X3BytesField

0

ID

MultipleTypeField (IPField, IP6Field, XStrLenField)

b''

class scapy.contrib.ikev2.IKEv2_KD(_pkt, /, *, next_payload=None, flags=<Flag 0 ()>, length=None, load=b'')[源代码]

基类:IKEv2_Payload

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  NEXT PAYLOAD |     FLAGS     |             LENGTH            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              LOAD             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                          Fig. IKEv2_KD                           
IKEv2_KD fields

next_payload

ByteEnumField

None

flags

FlagsField

<Flag 0 ()>

length

ShortField

None

load

XStrLenField

b''

class scapy.contrib.ikev2.IKEv2_KE(_pkt, /, *, next_payload=None, flags=<Flag 0 ()>, length=None, group=0, res2=0, ke=b'')[源代码]

基类:IKEv2_Payload

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  NEXT PAYLOAD |     FLAGS     |             LENGTH            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             GROUP             |              RES2             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               KE              |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                          Fig. IKEv2_KE                           
IKEv2_KE fields

next_payload

ByteEnumField

None

flags

FlagsField

<Flag 0 ()>

length

ShortField

None

group

ShortEnumField

0

res2

ShortField

0

ke

XStrLenField

b''

class scapy.contrib.ikev2.IKEv2_Key_Length_Attribute(name)[源代码]

基类:IntField

h2i(pkt, x)[源代码]
i2h(pkt, x)[源代码]
class scapy.contrib.ikev2.IKEv2_Nonce(_pkt, /, *, next_payload=None, flags=<Flag 0 ()>, length=None, nonce=b'')[源代码]

基类:IKEv2_Payload

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  NEXT PAYLOAD |     FLAGS     |             LENGTH            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             NONCE             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                         Fig. IKEv2_Nonce                         
IKEv2_Nonce fields

next_payload

ByteEnumField

None

flags

FlagsField

<Flag 0 ()>

length

ShortField

None

nonce

XStrLenField

b''

class scapy.contrib.ikev2.IKEv2_Notify(_pkt, /, *, next_payload=None, flags=<Flag 0 ()>, length=None, proto=None, SPIsize=None, type=0, SPI=b'', notify=b'', gw_id_type=1, gw_id_len=None, gw_id=None, nonce=b'')[源代码]

基类:IKEv2_Payload

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  NEXT PAYLOAD |     FLAGS     |             LENGTH            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|     PROTO     |    SPISIZE    |              TYPE             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              SPI              |             NOTIFY            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|   GW ID TYPE  |   GW ID LEN   |             GW ID             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|             NONCE             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                        Fig. IKEv2_Notify                         
IKEv2_Notify fields

next_payload

ByteEnumField

None

flags

FlagsField

<Flag 0 ()>

length

ShortField

None

proto

ByteEnumField

None

SPIsize

FieldLenField

None

type

ShortEnumField

0

SPI

XStrLenField

b''

notify

XStrLenField (Cond)

b''

gw_id_type

ByteEnumField (Cond)

1

gw_id_len

FieldLenField (Cond)

None

gw_id

MultipleTypeField (Cond, IPField, IP6Field, StrLenField)

b''

nonce

XStrLenField (Cond)

b''

class scapy.contrib.ikev2.IKEv2_PS(_pkt, /, *, next_payload=None, flags=<Flag 0 ()>, length=None, load=b'')[源代码]

基类:IKEv2_Payload

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  NEXT PAYLOAD |     FLAGS     |             LENGTH            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              LOAD             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                          Fig. IKEv2_PS                           
IKEv2_PS fields

next_payload

ByteEnumField

None

flags

FlagsField

<Flag 0 ()>

length

ShortField

None

load

XStrLenField

b''

class scapy.contrib.ikev2.IKEv2_Payload(_pkt, /, *, next_payload=None, flags=<Flag 0 ()>, length=None, load=b'')[源代码]

基类:_IKEv2_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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  NEXT PAYLOAD |     FLAGS     |             LENGTH            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              LOAD             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                        Fig. IKEv2_Payload                        
IKEv2_Payload fields

next_payload

ByteEnumField

None

flags

FlagsField

<Flag 0 ()>

length

ShortField

None

load

XStrLenField

b''

post_build(pkt, pay)[源代码]
class scapy.contrib.ikev2.IKEv2_Proposal(_pkt, /, *, next_payload=None, flags=<Flag 0 ()>, length=None, proposal=1, proto=1, SPIsize=None, trans_nb=None, SPI=b'', trans=<Raw  |>)[源代码]

基类:IKEv2_Payload

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  NEXT PAYLOAD |     FLAGS     |             LENGTH            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    PROPOSAL   |     PROTO     |    SPISIZE    |    TRANS NB   |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              SPI              |             TRANS             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                       Fig. IKEv2_Proposal                        
IKEv2_Proposal fields

next_payload

ByteEnumField

None

flags

FlagsField

<Flag 0 ()>

length

ShortField

None

proposal

ByteField

1

proto

ByteEnumField

1

SPIsize

FieldLenField

None

trans_nb

ByteField

None

SPI

XStrLenField

b''

trans

PacketLenField

<Raw  |>

class scapy.contrib.ikev2.IKEv2_SA(_pkt, /, *, next_payload=None, flags=<Flag 0 ()>, length=None, prop=<Raw  |>)[源代码]

基类:IKEv2_Payload

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  NEXT PAYLOAD |     FLAGS     |             LENGTH            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              PROP             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                          Fig. IKEv2_SA                           
IKEv2_SA fields

next_payload

ByteEnumField

None

flags

FlagsField

<Flag 0 ()>

length

ShortField

None

prop

PacketLenField

<Raw  |>

class scapy.contrib.ikev2.IKEv2_TSi(_pkt, /, *, next_payload=None, flags=<Flag 0 ()>, length=None, number_of_TSs=None, res2=0, traffic_selector=[])[源代码]

基类:IKEv2_Payload

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  NEXT PAYLOAD |     FLAGS     |             LENGTH            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| NUMBER OF TSS |                      RES2                     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |        TRAFFIC SELECTOR       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                          Fig. IKEv2_TSi                          
IKEv2_TSi fields

next_payload

ByteEnumField

None

flags

FlagsField

<Flag 0 ()>

length

ShortField

None

number_of_TSs

FieldLenField

None

res2

X3BytesField

0

traffic_selector

PacketListField

[]

class scapy.contrib.ikev2.IKEv2_TSr(_pkt, /, *, next_payload=None, flags=<Flag 0 ()>, length=None, number_of_TSs=None, res2=0, traffic_selector=[])[源代码]

基类:IKEv2_Payload

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  NEXT PAYLOAD |     FLAGS     |             LENGTH            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| NUMBER OF TSS |                      RES2                     |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|               |        TRAFFIC SELECTOR       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                          Fig. IKEv2_TSr                          
IKEv2_TSr fields

next_payload

ByteEnumField

None

flags

FlagsField

<Flag 0 ()>

length

ShortField

None

number_of_TSs

FieldLenField

None

res2

X3BytesField

0

traffic_selector

PacketListField

[]

class scapy.contrib.ikev2.IKEv2_Transform(_pkt, /, *, next_payload=None, flags=<Flag 0 ()>, length=8, transform_type=None, res2=0, transform_id=None, key_length=2148401152)[源代码]

基类:IKEv2_Payload

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  NEXT PAYLOAD |     FLAGS     |             LENGTH            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
| TRANSFORM TYPE|      RES2     |          TRANSFORM ID         |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                           KEY LENGTH                          |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                       Fig. IKEv2_Transform                       
IKEv2_Transform fields

next_payload

ByteEnumField

None

flags

FlagsField

<Flag 0 ()>

length

ShortField

8

transform_type

ByteEnumField

None

res2

ByteField

0

transform_id

MultiEnumField (Depends on None)

None

key_length

IKEv2_Key_Length_Attribute (Cond)

2148401152

class scapy.contrib.ikev2.IKEv2_VendorID(_pkt, /, *, next_payload=None, flags=<Flag 0 ()>, length=None, vendorID=b'')[源代码]

基类:IKEv2_Payload

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|  NEXT PAYLOAD |     FLAGS     |             LENGTH            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|            VENDORID           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                       Fig. IKEv2_VendorID                        
IKEv2_VendorID fields

next_payload

ByteEnumField

None

flags

FlagsField

<Flag 0 ()>

length

ShortField

None

vendorID

XStrLenField

b''

class scapy.contrib.ikev2.IPv4TrafficSelector(_pkt, /, *, TS_type=7, IP_protocol_ID=None, length=16, start_port=0, end_port=65535, starting_address_v4='192.168.0.1', ending_address_v4='192.168.0.255')[源代码]

基类:TrafficSelector

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    TS TYPE    | IP PROTOCOL ID|             LENGTH            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           START PORT          |            END PORT           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                      STARTING ADDRESS V4                      |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                       ENDING ADDRESS V4                       |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                     Fig. IPv4TrafficSelector                     
IPv4TrafficSelector fields

TS_type

ByteEnumField

7

IP_protocol_ID

ByteEnumField

None

length

ShortField

16

start_port

ShortField

0

end_port

ShortField

65535

starting_address_v4

IPField

'192.168.0.1'

ending_address_v4

IPField

'192.168.0.255'

class scapy.contrib.ikev2.IPv6TrafficSelector(_pkt, /, *, TS_type=8, IP_protocol_ID=None, length=20, start_port=0, end_port=65535, starting_address_v6='2001::', ending_address_v6='2001::')[源代码]

基类:TrafficSelector

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    TS TYPE    | IP PROTOCOL ID|             LENGTH            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|           START PORT          |            END PORT           |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                      STARTING ADDRESS V6                      |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|                       ENDING ADDRESS V6                       |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+                                                               +
|                                                               |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                     Fig. IPv6TrafficSelector                     
IPv6TrafficSelector fields

TS_type

ByteEnumField

8

IP_protocol_ID

ByteEnumField

None

length

ShortField

20

start_port

ShortField

0

end_port

ShortField

65535

starting_address_v6

IP6Field

'2001::'

ending_address_v6

IP6Field

'2001::'

class scapy.contrib.ikev2.RawTrafficSelector(_pkt, /, *, TS_type=None, IP_protocol_ID=None, length=None, load=b'')[源代码]

基类:TrafficSelector

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
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|    TS TYPE    | IP PROTOCOL ID|             LENGTH            |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
|              LOAD             |
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+

                     Fig. RawTrafficSelector                      
RawTrafficSelector fields

TS_type

ByteEnumField

None

IP_protocol_ID

ByteEnumField

None

length

FieldLenField

None

load

PacketField

b''

class scapy.contrib.ikev2.TrafficSelector(_pkt, /)[源代码]

基类:Packet

aliastypes
classmethod dispatch_hook(_pkt=None, *args, **kargs)[源代码]
extract_padding(s)[源代码]
scapy.contrib.ikev2.ikev2scan(ip, **kwargs)[源代码]

Send a IKEv2 SA to an IP and wait for answers.