scapy.layers.eap

可扩展身份验证协议(EAP)

class scapy.layers.eap.EAP

Bases: scapy.packet.Packet

RFC 3748-可扩展身份验证协议(EAP)

FAILURE = 4
FINISH = 6
INITIATE = 5
REQUEST = 1
RESPONSE = 2
SUCCESS = 3
aliastypes
answers(other)
classmethod dispatch_hook(_pkt=None, *args, **kargs)
fields_desc
EAP字段

code

ByteEnumField

4

id

ByteField

0

len

ShortField

None

type

ByteEnumField (Cond)

0

desired_auth_types

FieldListField (Cond)

[]

identity

StrLenField (Cond)

b''

message

StrLenField (Cond)

b''

getlayer(cls, nb=1, _track=None, _subclass=True, **flt)
guess_payload_class(_)
haslayer(cls)
mysummary()
post_build(p, pay)
classmethod register_variant()
registered_methods = {0: <class 'scapy.layers.eap.EAP'>, 4: <class 'scapy.layers.eap.EAP_MD5'>, 13: <class 'scapy.layers.eap.EAP_TLS'>, 17: <class 'scapy.layers.eap.LEAP'>, 21: <class 'scapy.layers.eap.EAP_TTLS'>, 25: <class 'scapy.layers.eap.EAP_PEAP'>, 43: <class 'scapy.layers.eap.EAP_FAST'>}
class scapy.layers.eap.EAPOL

Bases: scapy.packet.Packet

EAPOL-IEEE标准802.1X-2010

ASF = 4
EAP_PACKET = 0
KEY = 3
LOGOFF = 2
START = 1
aliastypes
answers(other)
extract_padding(s)
fields_desc
EAPOL字段

version

ByteEnumField

1

type

ByteEnumField

0

len

LenField

None

hashret()
mysummary()
payload_guess

可能的子层: WPA_keyEAPMKAPDU

class scapy.layers.eap.EAP_FAST

Bases: scapy.layers.eap.EAP

RFC 4851-"通过安全隧道可扩展身份验证协议方法(EAP-FAST)进行的灵活身份验证"

aliastypes
fields_desc
EAP_FAST字段

code

ByteEnumField

1

id

ByteField

0

len

FieldLenField

None

type

ByteEnumField

43

L

BitField (1位)

0

M

BitField (1 bit)

0

S

BitField (1位)

0

reserved

BitField (2位)

0

version

BitField (3位)

0

message_len

IntField (Cond)

0

data

XStrLenField

b''

class scapy.layers.eap.EAP_MD5

Bases: scapy.layers.eap.EAP

RFC 3748-"可扩展身份验证协议(EAP)"

aliastypes
fields_desc
EAP_MD5字段

code

ByteEnumField

1

id

ByteField

0

len

FieldLenField

None

type

ByteEnumField

4

value_size

FieldLenField

None

value

XStrLenField

b''

optional_name

XStrLenField

b''

class scapy.layers.eap.EAP_PEAP

Bases: scapy.layers.eap.EAP

draft-josefsson-pppext-eap-tls-eap-05.txt-"受保护的EAP协议(PEAP)"

aliastypes
fields_desc
EAP_PEAP字段

code

ByteEnumField

1

id

ByteField

0

len

FieldLenField

None

type

ByteEnumField

25

L

BitField (1位)

0

M

BitField (1位)

0

S

BitField (1位)

0

reserved

BitField (3 bits)

0

version

BitField (2位)

1

tls_message_len

IntField (Cond)

0

tls_data

XStrLenField

b''

class scapy.layers.eap.EAP_TLS

Bases: scapy.layers.eap.EAP

RFC 5216-" EAP-TLS身份验证协议"

aliastypes
fields_desc
EAP_TLS字段

code

ByteEnumField

1

id

ByteField

0

len

FieldLenField

None

type

ByteEnumField

13

L

BitField (1位)

0

M

BitField (1位)

0

S

BitField (1位)

0

reserved

BitField (5位)

0

tls_message_len

IntField (Cond)

0

tls_data

XStrLenField

b''

class scapy.layers.eap.EAP_TTLS

Bases: scapy.layers.eap.EAP

RFC 5281-"可扩展身份验证协议隧道传输层安全性已验证协议版本0(EAP-TTLSv0)"

aliastypes
fields_desc
EAP_TTLS字段

code

ByteEnumField

1

id

ByteField

0

len

FieldLenField

None

type

ByteEnumField

21

L

BitField (1位)

0

M

BitField (1位)

0

S

BitField (1位)

0

reserved

BitField (2位)

0

version

BitField (3位)

0

message_len

IntField (Cond)

0

data

XStrLenField

b''

class scapy.layers.eap.LEAP

Bases: scapy.layers.eap.EAP

思科LEAP(轻量级EAP) https://freeradius.org/rfc/leap.txt

aliastypes
fields_desc
LEAP字段

code

ByteEnumField

1

id

ByteField

0

len

ShortField

None

type

ByteEnumField

17

version

ByteField

1

unused

XByteField

0

count

FieldLenField

None

challenge_response

XStrLenField

b''

username

StrLenField

b''

class scapy.layers.eap.MACsecSCI

Bases: scapy.packet.Packet

安全通道标识符.

aliastypes
extract_padding(s)
fields_desc
MACsecSCI字段

system_identifier

SourceMACField

None

port_identifier

ShortField

0

class scapy.layers.eap.MKABasicParamSet

Bases: scapy.packet.Packet

基本参数集(802.1X-2010,第11.11节).

aliastypes
extract_padding(s)
fields_desc
MKABasicParamSet字段

mka_version_id

ByteField

0

key_server_priority

ByteField

0

key_server

BitField (1位)

0

macsec_desired

BitField (1位)

0

macsec_capability

BitField (2位)

0

param_set_body_len

BitField (12位)

0

SCI

PacketField

<MACsecSCI  |>

actor_member_id

XStrFixedLenField

b''

actor_message_number

XIntField

0

algorithm_agility

XIntField

0

cak_name

PadField

b''

class scapy.layers.eap.MKADistributedCAKParamSet

Bases: scapy.layers.eap.MKAParamSet

分布式CAK参数集(802.1X-2010,第11.11节).

aliastypes
fields_desc
MKADistributedCAKParamSet字段

param_set_type

PadField

5

param_set_body_len

ShortField

0

cak_aes_key_wrap

XStrFixedLenField

b''

cak_key_name

XStrField

b''

class scapy.layers.eap.MKADistributedSAKParamSet

Bases: scapy.layers.eap.MKAParamSet

分布式SAK参数集(802.1X-2010,第11.11节).

aliastypes
fields_desc
MKADistributedSAKParamSet字段

param_set_type

ByteEnumField

4

distributed_an

BitField (2位)

0

confidentiality_offset

BitField (2位)

0

unused

BitField (4位)

0

param_set_body_len

ShortField

0

key_number

XStrFixedLenField

b''

macsec_cipher_suite

XStrFixedLenField (Cond)

b''

sak_aes_key_wrap

XStrFixedLenField

b''

class scapy.layers.eap.MKAICVSet

Bases: scapy.layers.eap.MKAParamSet

ICV(802.1X-2010,第11.11节).

aliastypes
fields_desc
MKAICVSet字段

param_set_type

PadField

255

param_set_body_len

ShortField

0

icv

XStrFixedLenField

b''

class scapy.layers.eap.MKALivePeerListParamSet

Bases: scapy.layers.eap.MKAParamSet

实时对等列表参数集(802.1X-2010,第11.11节).

aliastypes
fields_desc
MKALivePeerListParamSet字段

param_set_type

PadField

1

param_set_body_len

ShortField

0

member_id_message_num

PacketListField

[]

class scapy.layers.eap.MKAPDU

Bases: scapy.packet.Packet

MACsec密钥协商协议数据单元.

aliastypes
extract_padding(s)
fields_desc
MKAPDU字段

basic_param_set

PacketField

b''

parameter_sets

MKAParamSetPacketListField

[]

class scapy.layers.eap.MKAParamSet

Bases: scapy.packet.Packet

每个参数集类都继承自的类(MKABasicParamSet除外,该类没有"参数集类型"字段,并且必须在参数集列表中排在第一位).

EAPOL_MKA_DEFAULT_KEY_WRAP_LEN = 24
MACSEC_DEFAULT_ICV_LEN = 16
aliastypes
classmethod dispatch_hook(_pkt=None, *args, **kargs)

返回正确的参数集类.

class scapy.layers.eap.MKAParamSetPacketListField(name, default, cls=None, count_from=None, length_from=None, next_cls_cb=None)

Bases: scapy.fields.PacketListField

PacketListField处理参数集.

PARAM_SET_LEN_MASK = 4095
getfield(pkt, s)
m2i(pkt, m)
class scapy.layers.eap.MKAPeerListTuple

Bases: scapy.packet.Packet

实时/潜在对等列表参数设置元组(802.1X-2010,第11.11节). #noqa:E501

aliastypes
fields_desc
MKAPeerListTuple字段

member_id

XStrFixedLenField

b''

message_number

XStrFixedLenField

b''

class scapy.layers.eap.MKAPotentialPeerListParamSet

Bases: scapy.layers.eap.MKAParamSet

潜在对等列表参数集(802.1X-2010,第11.11节).

aliastypes
fields_desc
MKAPotentialPeerListParamSet字段

param_set_type

PadField

2

param_set_body_len

ShortField

0

member_id_message_num

PacketListField

[]

class scapy.layers.eap.MKASAKUseParamSet

Bases: scapy.layers.eap.MKAParamSet

SAK使用参数集(802.1X-2010,第11.11节).

aliastypes
fields_desc
MKASAKUseParamSet字段

param_set_type

ByteEnumField

3

latest_key_an

BitField (2位)

0

latest_key_tx

BitField (1位)

0

latest_key_rx

BitField (1位)

0

old_key_an

BitField (2位)

0

old_key_tx

BitField (1位)

0

old_key_rx

BitField (1位)

0

plain_tx

BitField (1位)

0

plain_rx

BitField (1位)

0

X

BitField (1位)

0

delay_protect

BitField (1位)

0

param_set_body_len

BitField (12位)

0

latest_key_key_server_member_id

XStrFixedLenField

b''

latest_key_key_number

XStrFixedLenField

b''

latest_key_lowest_acceptable_pn

XStrFixedLenField

b''

old_key_key_server_member_id

XStrFixedLenField

b''

old_key_key_number

XStrFixedLenField

b''

old_key_lowest_acceptable_pn

XStrFixedLenField

b''