Hide keyboard shortcuts

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 

12 

13 

14from impacket.helper import ProtocolPacket, Byte, Word, Long, ThreeBytesBigEndian 

15 

16DOT1X_AUTHENTICATION = 0x888E 

17 

18class EAPExpanded(ProtocolPacket): 

19 """EAP expanded data according to RFC 3748, section 5.7""" 

20 

21 WFA_SMI = 0x00372a 

22 SIMPLE_CONFIG = 0x00000001 

23 

24 header_size = 7 

25 tail_size = 0 

26 

27 vendor_id = ThreeBytesBigEndian(0) 

28 vendor_type = Long(3, ">") 

29 

30class EAPR(ProtocolPacket): 

31 """It represents a request or a response in EAP (codes 1 and 2)""" 

32 

33 IDENTITY = 0x01 

34 EXPANDED = 0xfe 

35 

36 header_size = 1 

37 tail_size = 0 

38 

39 type = Byte(0) 

40 

41class EAP(ProtocolPacket): 

42 REQUEST = 0x01 

43 RESPONSE = 0x02 

44 SUCCESS = 0x03 

45 FAILURE = 0x04 

46 

47 header_size = 4 

48 tail_size = 0 

49 

50 code = Byte(0) 

51 identifier = Byte(1) 

52 length = Word(2, ">") 

53 

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 

60 

61 DOT1X_VERSION = 0x01 

62 

63 header_size = 4 

64 tail_size = 0 

65 

66 version = Byte(0) 

67 packet_type = Byte(1) 

68 body_length = Word(2, ">")