Coverage for /root/GitHubProjects/impacket/impacket/eap.py : 100%

Hot-keys on this page
r m x p toggle line displays
j k next/prev highlighted chunk
0 (zero) top of page
1 (one) first highlighted chunk
1# SECUREAUTH LABS. Copyright 2018 SecureAuth Corporation. All rights reserved.
2#
3# This software is provided under under a slightly modified version
4# of the Apache Software License. See the accompanying LICENSE file
5# for more information.
6#
7# Description:
8# EAP packets
9#
10# Author:
11# Aureliano Calvo
14from impacket.helper import ProtocolPacket, Byte, Word, Long, ThreeBytesBigEndian
16DOT1X_AUTHENTICATION = 0x888E
18class EAPExpanded(ProtocolPacket):
19 """EAP expanded data according to RFC 3748, section 5.7"""
21 WFA_SMI = 0x00372a
22 SIMPLE_CONFIG = 0x00000001
24 header_size = 7
25 tail_size = 0
27 vendor_id = ThreeBytesBigEndian(0)
28 vendor_type = Long(3, ">")
30class EAPR(ProtocolPacket):
31 """It represents a request or a response in EAP (codes 1 and 2)"""
33 IDENTITY = 0x01
34 EXPANDED = 0xfe
36 header_size = 1
37 tail_size = 0
39 type = Byte(0)
41class EAP(ProtocolPacket):
42 REQUEST = 0x01
43 RESPONSE = 0x02
44 SUCCESS = 0x03
45 FAILURE = 0x04
47 header_size = 4
48 tail_size = 0
50 code = Byte(0)
51 identifier = Byte(1)
52 length = Word(2, ">")
54class EAPOL(ProtocolPacket):
55 EAP_PACKET = 0x00
56 EAPOL_START = 0x01
57 EAPOL_LOGOFF = 0x02
58 EAPOL_KEY = 0x03
59 EAPOL_ENCAPSULATED_ASF_ALERT = 0x04
61 DOT1X_VERSION = 0x01
63 header_size = 4
64 tail_size = 0
66 version = Byte(0)
67 packet_type = Byte(1)
68 body_length = Word(2, ">")