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# Impacket - Collection of Python classes for working with network protocols. 

2# 

3# SECUREAUTH LABS. Copyright (C) 2018 SecureAuth Corporation. All rights reserved. 

4# 

5# This software is provided under a slightly modified version 

6# of the Apache Software License. See the accompanying LICENSE file 

7# for more information. 

8# 

9# Description: 

10# EAP packets 

11# 

12# Author: 

13# Aureliano Calvo 

14# 

15 

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

17 

18DOT1X_AUTHENTICATION = 0x888E 

19 

20class EAPExpanded(ProtocolPacket): 

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

22 

23 WFA_SMI = 0x00372a 

24 SIMPLE_CONFIG = 0x00000001 

25 

26 header_size = 7 

27 tail_size = 0 

28 

29 vendor_id = ThreeBytesBigEndian(0) 

30 vendor_type = Long(3, ">") 

31 

32class EAPR(ProtocolPacket): 

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

34 

35 IDENTITY = 0x01 

36 EXPANDED = 0xfe 

37 

38 header_size = 1 

39 tail_size = 0 

40 

41 type = Byte(0) 

42 

43class EAP(ProtocolPacket): 

44 REQUEST = 0x01 

45 RESPONSE = 0x02 

46 SUCCESS = 0x03 

47 FAILURE = 0x04 

48 

49 header_size = 4 

50 tail_size = 0 

51 

52 code = Byte(0) 

53 identifier = Byte(1) 

54 length = Word(2, ">") 

55 

56class EAPOL(ProtocolPacket): 

57 EAP_PACKET = 0x00 

58 EAPOL_START = 0x01 

59 EAPOL_LOGOFF = 0x02 

60 EAPOL_KEY = 0x03 

61 EAPOL_ENCAPSULATED_ASF_ALERT = 0x04 

62 

63 DOT1X_VERSION = 0x01 

64 

65 header_size = 4 

66 tail_size = 0 

67 

68 version = Byte(0) 

69 packet_type = Byte(1) 

70 body_length = Word(2, ">")