scapy.contrib.ikev2 module

class scapy.contrib.ikev2.EncryptedTrafficSelector

Bases: scapy.contrib.ikev2.TrafficSelector

aliastypes = [<class 'scapy.contrib.ikev2.EncryptedTrafficSelector'>, <class 'scapy.contrib.ikev2.TrafficSelector'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (EncryptedTrafficSelector).TS_type>, <Field (EncryptedTrafficSelector).IP_protocol_ID>, <Field (EncryptedTrafficSelector).length>, <Field (EncryptedTrafficSelector).res>, <Field (EncryptedTrafficSelector).starting_address_FC>, <Field (EncryptedTrafficSelector).res2>, <Field (EncryptedTrafficSelector).ending_address_FC>, <Field (EncryptedTrafficSelector).starting_R_CTL>, <Field (EncryptedTrafficSelector).ending_R_CTL>, <Field (EncryptedTrafficSelector).starting_type>, <Field (EncryptedTrafficSelector).ending_type>]
class scapy.contrib.ikev2.IKEv2

Bases: scapy.contrib.ikev2.IKEv2_class

aliastypes = [<class 'scapy.contrib.ikev2.IKEv2'>, <class 'scapy.contrib.ikev2.IKEv2_class'>, <class 'scapy.packet.Packet'>]
answers(other)

DEV: true if self is an answer from other

fields_desc = [<Field (IKEv2).init_SPI>, <Field (IKEv2).resp_SPI>, <Field (IKEv2).next_payload>, <Field (IKEv2).version>, <Field (IKEv2).exch_type>, <Field (IKEv2).flags>, <Field (IKEv2).id>, <Field (IKEv2).length>]
guess_payload_class(payload)

DEV: Guesses the next payload class from layer bonds. Can be overloaded to use a different mechanism.

Parameters:payload (str) – the layer’s payload
Returns:the payload class
post_build(p, pay)

DEV: called right after the current layer is build.

Parameters:
  • pkt (str) – the current packet (build by self_buil function)
  • pay (str) – the packet payload (build by do_build_payload function)
Returns:

a string of the packet with the payload

class scapy.contrib.ikev2.IKEv2_Key_Length_Attribute(name)

Bases: scapy.fields.IntField

h2i(pkt, x)

Convert human value to internal value

i2h(pkt, x)

Convert internal value to human value

class scapy.contrib.ikev2.IKEv2_class

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.contrib.ikev2.IKEv2_class'>, <class 'scapy.packet.Packet'>]
guess_payload_class(payload)

DEV: Guesses the next payload class from layer bonds. Can be overloaded to use a different mechanism.

Parameters:payload (str) – the layer’s payload
Returns:the payload class
class scapy.contrib.ikev2.IKEv2_payload

Bases: scapy.contrib.ikev2.IKEv2_class

aliastypes = [<class 'scapy.contrib.ikev2.IKEv2_payload'>, <class 'scapy.contrib.ikev2.IKEv2_class'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (IKEv2_payload).next_payload>, <Field (IKEv2_payload).flags>, <Field (IKEv2_payload).length>, <Field (IKEv2_payload).load>]
class scapy.contrib.ikev2.IKEv2_payload_AUTH

Bases: scapy.contrib.ikev2.IKEv2_class

aliastypes = [<class 'scapy.contrib.ikev2.IKEv2_payload_AUTH'>, <class 'scapy.contrib.ikev2.IKEv2_class'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (IKEv2_payload_AUTH).next_payload>, <Field (IKEv2_payload_AUTH).res>, <Field (IKEv2_payload_AUTH).length>, <Field (IKEv2_payload_AUTH).auth_type>, <Field (IKEv2_payload_AUTH).res2>, <Field (IKEv2_payload_AUTH).load>]
class scapy.contrib.ikev2.IKEv2_payload_CERT

Bases: scapy.contrib.ikev2.IKEv2_class

aliastypes = [<class 'scapy.contrib.ikev2.IKEv2_payload_CERT'>, <class 'scapy.contrib.ikev2.IKEv2_class'>, <class 'scapy.packet.Packet'>]
classmethod dispatch_hook(_pkt=None, *args, **kargs)
class scapy.contrib.ikev2.IKEv2_payload_CERTREQ

Bases: scapy.contrib.ikev2.IKEv2_class

aliastypes = [<class 'scapy.contrib.ikev2.IKEv2_payload_CERTREQ'>, <class 'scapy.contrib.ikev2.IKEv2_class'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (IKEv2_payload_CERTREQ).next_payload>, <Field (IKEv2_payload_CERTREQ).res>, <Field (IKEv2_payload_CERTREQ).length>, <Field (IKEv2_payload_CERTREQ).cert_type>, <Field (IKEv2_payload_CERTREQ).cert_data>]
class scapy.contrib.ikev2.IKEv2_payload_CERT_CRL

Bases: scapy.contrib.ikev2.IKEv2_payload_CERT

aliastypes = [<class 'scapy.contrib.ikev2.IKEv2_payload_CERT_CRL'>, <class 'scapy.contrib.ikev2.IKEv2_payload_CERT'>, <class 'scapy.contrib.ikev2.IKEv2_class'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (IKEv2_payload_CERT_CRL).next_payload>, <Field (IKEv2_payload_CERT_CRL).res>, <Field (IKEv2_payload_CERT_CRL).length>, <Field (IKEv2_payload_CERT_CRL).cert_type>, <Field (IKEv2_payload_CERT_CRL).x509CRL>]
class scapy.contrib.ikev2.IKEv2_payload_CERT_CRT

Bases: scapy.contrib.ikev2.IKEv2_payload_CERT

aliastypes = [<class 'scapy.contrib.ikev2.IKEv2_payload_CERT_CRT'>, <class 'scapy.contrib.ikev2.IKEv2_payload_CERT'>, <class 'scapy.contrib.ikev2.IKEv2_class'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (IKEv2_payload_CERT_CRT).next_payload>, <Field (IKEv2_payload_CERT_CRT).res>, <Field (IKEv2_payload_CERT_CRT).length>, <Field (IKEv2_payload_CERT_CRT).cert_type>, <Field (IKEv2_payload_CERT_CRT).x509Cert>]
class scapy.contrib.ikev2.IKEv2_payload_CERT_STR

Bases: scapy.contrib.ikev2.IKEv2_payload_CERT

aliastypes = [<class 'scapy.contrib.ikev2.IKEv2_payload_CERT_STR'>, <class 'scapy.contrib.ikev2.IKEv2_payload_CERT'>, <class 'scapy.contrib.ikev2.IKEv2_class'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (IKEv2_payload_CERT_STR).next_payload>, <Field (IKEv2_payload_CERT_STR).res>, <Field (IKEv2_payload_CERT_STR).length>, <Field (IKEv2_payload_CERT_STR).cert_type>, <Field (IKEv2_payload_CERT_STR).cert_data>]
class scapy.contrib.ikev2.IKEv2_payload_Delete

Bases: scapy.contrib.ikev2.IKEv2_class

aliastypes = [<class 'scapy.contrib.ikev2.IKEv2_payload_Delete'>, <class 'scapy.contrib.ikev2.IKEv2_class'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (IKEv2_payload_Delete).next_payload>, <Field (IKEv2_payload_Delete).res>, <Field (IKEv2_payload_Delete).length>, <Field (IKEv2_payload_Delete).vendorID>]
class scapy.contrib.ikev2.IKEv2_payload_Encrypted

Bases: scapy.contrib.ikev2.IKEv2_class

aliastypes = [<class 'scapy.contrib.ikev2.IKEv2_payload_Encrypted'>, <class 'scapy.contrib.ikev2.IKEv2_class'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (IKEv2_payload_Encrypted).next_payload>, <Field (IKEv2_payload_Encrypted).res>, <Field (IKEv2_payload_Encrypted).length>, <Field (IKEv2_payload_Encrypted).load>]
class scapy.contrib.ikev2.IKEv2_payload_Encrypted_Fragment

Bases: scapy.contrib.ikev2.IKEv2_class

aliastypes = [<class 'scapy.contrib.ikev2.IKEv2_payload_Encrypted_Fragment'>, <class 'scapy.contrib.ikev2.IKEv2_class'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (IKEv2_payload_Encrypted_Fragment).next_payload>, <Field (IKEv2_payload_Encrypted_Fragment).res>, <Field (IKEv2_payload_Encrypted_Fragment).length>, <Field (IKEv2_payload_Encrypted_Fragment).frag_number>, <Field (IKEv2_payload_Encrypted_Fragment).frag_total>, <Field (IKEv2_payload_Encrypted_Fragment).load>]
class scapy.contrib.ikev2.IKEv2_payload_IDi

Bases: scapy.contrib.ikev2.IKEv2_class

aliastypes = [<class 'scapy.contrib.ikev2.IKEv2_payload_IDi'>, <class 'scapy.contrib.ikev2.IKEv2_class'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (IKEv2_payload_IDi).next_payload>, <Field (IKEv2_payload_IDi).res>, <Field (IKEv2_payload_IDi).length>, <Field (IKEv2_payload_IDi).IDtype>, <Field (IKEv2_payload_IDi).ProtoID>, <Field (IKEv2_payload_IDi).Port>, <Field (IKEv2_payload_IDi).load>]
class scapy.contrib.ikev2.IKEv2_payload_IDr

Bases: scapy.contrib.ikev2.IKEv2_class

aliastypes = [<class 'scapy.contrib.ikev2.IKEv2_payload_IDr'>, <class 'scapy.contrib.ikev2.IKEv2_class'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (IKEv2_payload_IDr).next_payload>, <Field (IKEv2_payload_IDr).res>, <Field (IKEv2_payload_IDr).length>, <Field (IKEv2_payload_IDr).IDtype>, <Field (IKEv2_payload_IDr).ProtoID>, <Field (IKEv2_payload_IDr).Port>, <Field (IKEv2_payload_IDr).load>]
class scapy.contrib.ikev2.IKEv2_payload_KE

Bases: scapy.contrib.ikev2.IKEv2_class

aliastypes = [<class 'scapy.contrib.ikev2.IKEv2_payload_KE'>, <class 'scapy.contrib.ikev2.IKEv2_class'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (IKEv2_payload_KE).next_payload>, <Field (IKEv2_payload_KE).res>, <Field (IKEv2_payload_KE).length>, <Field (IKEv2_payload_KE).group>, <Field (IKEv2_payload_KE).res2>, <Field (IKEv2_payload_KE).load>]
class scapy.contrib.ikev2.IKEv2_payload_Nonce

Bases: scapy.contrib.ikev2.IKEv2_class

aliastypes = [<class 'scapy.contrib.ikev2.IKEv2_payload_Nonce'>, <class 'scapy.contrib.ikev2.IKEv2_class'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (IKEv2_payload_Nonce).next_payload>, <Field (IKEv2_payload_Nonce).res>, <Field (IKEv2_payload_Nonce).length>, <Field (IKEv2_payload_Nonce).load>]
class scapy.contrib.ikev2.IKEv2_payload_Notify

Bases: scapy.contrib.ikev2.IKEv2_class

aliastypes = [<class 'scapy.contrib.ikev2.IKEv2_payload_Notify'>, <class 'scapy.contrib.ikev2.IKEv2_class'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (IKEv2_payload_Notify).next_payload>, <Field (IKEv2_payload_Notify).res>, <Field (IKEv2_payload_Notify).length>, <Field (IKEv2_payload_Notify).proto>, <Field (IKEv2_payload_Notify).SPIsize>, <Field (IKEv2_payload_Notify).type>, <Field (IKEv2_payload_Notify).SPI>, <Field (IKEv2_payload_Notify).load>]
class scapy.contrib.ikev2.IKEv2_payload_Proposal

Bases: scapy.contrib.ikev2.IKEv2_class

aliastypes = [<class 'scapy.contrib.ikev2.IKEv2_payload_Proposal'>, <class 'scapy.contrib.ikev2.IKEv2_class'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (IKEv2_payload_Proposal).next_payload>, <Field (IKEv2_payload_Proposal).res>, <Field (IKEv2_payload_Proposal).length>, <Field (IKEv2_payload_Proposal).proposal>, <Field (IKEv2_payload_Proposal).proto>, <Field (IKEv2_payload_Proposal).SPIsize>, <Field (IKEv2_payload_Proposal).trans_nb>, <Field (IKEv2_payload_Proposal).SPI>, <Field (IKEv2_payload_Proposal).trans>]
class scapy.contrib.ikev2.IKEv2_payload_SA

Bases: scapy.contrib.ikev2.IKEv2_class

aliastypes = [<class 'scapy.contrib.ikev2.IKEv2_payload_SA'>, <class 'scapy.contrib.ikev2.IKEv2_class'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (IKEv2_payload_SA).next_payload>, <Field (IKEv2_payload_SA).res>, <Field (IKEv2_payload_SA).length>, <Field (IKEv2_payload_SA).prop>]
class scapy.contrib.ikev2.IKEv2_payload_TSi

Bases: scapy.contrib.ikev2.IKEv2_class

aliastypes = [<class 'scapy.contrib.ikev2.IKEv2_payload_TSi'>, <class 'scapy.contrib.ikev2.IKEv2_class'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (IKEv2_payload_TSi).next_payload>, <Field (IKEv2_payload_TSi).res>, <Field (IKEv2_payload_TSi).length>, <Field (IKEv2_payload_TSi).number_of_TSs>, <Field (IKEv2_payload_TSi).res2>, <Field (IKEv2_payload_TSi).traffic_selector>]
class scapy.contrib.ikev2.IKEv2_payload_TSr

Bases: scapy.contrib.ikev2.IKEv2_class

aliastypes = [<class 'scapy.contrib.ikev2.IKEv2_payload_TSr'>, <class 'scapy.contrib.ikev2.IKEv2_class'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (IKEv2_payload_TSr).next_payload>, <Field (IKEv2_payload_TSr).res>, <Field (IKEv2_payload_TSr).length>, <Field (IKEv2_payload_TSr).number_of_TSs>, <Field (IKEv2_payload_TSr).res2>, <Field (IKEv2_payload_TSr).traffic_selector>]
class scapy.contrib.ikev2.IKEv2_payload_Transform

Bases: scapy.contrib.ikev2.IKEv2_class

aliastypes = [<class 'scapy.contrib.ikev2.IKEv2_payload_Transform'>, <class 'scapy.contrib.ikev2.IKEv2_class'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (IKEv2_payload_Transform).next_payload>, <Field (IKEv2_payload_Transform).res>, <Field (IKEv2_payload_Transform).length>, <Field (IKEv2_payload_Transform).transform_type>, <Field (IKEv2_payload_Transform).res2>, <Field (IKEv2_payload_Transform).transform_id>, <scapy.fields.ConditionalField object>]
class scapy.contrib.ikev2.IKEv2_payload_VendorID

Bases: scapy.contrib.ikev2.IKEv2_class

aliastypes = [<class 'scapy.contrib.ikev2.IKEv2_payload_VendorID'>, <class 'scapy.contrib.ikev2.IKEv2_class'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (IKEv2_payload_VendorID).next_payload>, <Field (IKEv2_payload_VendorID).res>, <Field (IKEv2_payload_VendorID).length>, <Field (IKEv2_payload_VendorID).vendorID>]
class scapy.contrib.ikev2.IPv4TrafficSelector

Bases: scapy.contrib.ikev2.TrafficSelector

aliastypes = [<class 'scapy.contrib.ikev2.IPv4TrafficSelector'>, <class 'scapy.contrib.ikev2.TrafficSelector'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (IPv4TrafficSelector).TS_type>, <Field (IPv4TrafficSelector).IP_protocol_ID>, <Field (IPv4TrafficSelector).length>, <Field (IPv4TrafficSelector).start_port>, <Field (IPv4TrafficSelector).end_port>, <Field (IPv4TrafficSelector).starting_address_v4>, <Field (IPv4TrafficSelector).ending_address_v4>]
class scapy.contrib.ikev2.IPv6TrafficSelector

Bases: scapy.contrib.ikev2.TrafficSelector

aliastypes = [<class 'scapy.contrib.ikev2.IPv6TrafficSelector'>, <class 'scapy.contrib.ikev2.TrafficSelector'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (IPv6TrafficSelector).TS_type>, <Field (IPv6TrafficSelector).IP_protocol_ID>, <Field (IPv6TrafficSelector).length>, <Field (IPv6TrafficSelector).start_port>, <Field (IPv6TrafficSelector).end_port>, <Field (IPv6TrafficSelector).starting_address_v6>, <Field (IPv6TrafficSelector).ending_address_v6>]
class scapy.contrib.ikev2.RawTrafficSelector

Bases: scapy.contrib.ikev2.TrafficSelector

aliastypes = [<class 'scapy.contrib.ikev2.RawTrafficSelector'>, <class 'scapy.contrib.ikev2.TrafficSelector'>, <class 'scapy.packet.Packet'>]
fields_desc = [<Field (RawTrafficSelector).TS_type>, <Field (RawTrafficSelector).IP_protocol_ID>, <Field (RawTrafficSelector).length>, <Field (RawTrafficSelector).load>]
class scapy.contrib.ikev2.TrafficSelector

Bases: scapy.packet.Packet

aliastypes = [<class 'scapy.contrib.ikev2.TrafficSelector'>, <class 'scapy.packet.Packet'>]
classmethod dispatch_hook(_pkt=None, *args, **kargs)
scapy.contrib.ikev2.ikev2scan(ip, **kwargs)

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