Skip to content

Commit 74bf4d1

Browse files
committed
Wpa personal vs enterprise PR derv82#163
1 parent 5c5d8c8 commit 74bf4d1

File tree

3 files changed

+17
-9
lines changed

3 files changed

+17
-9
lines changed

wifite/attack/all.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,9 @@ def attack_single(cls, target, targets_remaining):
4444
Attacks a single `target` (wifite.model.target).
4545
Returns: True if attacks should continue, False otherwise.
4646
'''
47+
if 'MGT' in target.authentication:
48+
Color.pl("\n{!}{O}Skipping. Target is using {C}WPA-Enterprise {O}and can not be cracked.")
49+
return True
4750

4851
attacks = []
4952

wifite/model/target.py

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,10 +38,10 @@ def __init__(self, fields):
3838
13 ESSID (HOME-ABCD)
3939
14 Key ()
4040
'''
41-
self.bssid = fields[0].strip()
42-
self.channel = fields[3].strip()
43-
44-
self.encryption = fields[5].strip()
41+
self.bssid = fields[0].strip()
42+
self.channel = fields[3].strip()
43+
self.encryption = fields[5].strip()
44+
self.authentication = fields[7].strip()
4545
if 'WPA' in self.encryption:
4646
self.encryption = 'WPA'
4747
elif 'WEP' in self.encryption:
@@ -137,11 +137,16 @@ def to_str(self, show_bssid=False, show_manufacturer=False):
137137
channel_color = '{C}'
138138
channel = Color.s('%s%s' % (channel_color, str(self.channel).rjust(3)))
139139

140-
encryption = self.encryption.rjust(4)
140+
encryption = self.encryption.rjust(3)
141141
if 'WEP' in encryption:
142142
encryption = Color.s('{G}%s' % encryption)
143143
elif 'WPA' in encryption:
144-
encryption = Color.s('{O}%s' % encryption)
144+
if 'PSK' in self.authentication:
145+
encryption = Color.s('{O}%s-P' % encryption)
146+
elif 'MGT' in self.authentication:
147+
encryption = Color.s('{R}%s-E' % encryption)
148+
else:
149+
encryption = Color.s('{O}%s ' % encryption)
145150

146151
power = '%sdb' % str(self.power).rjust(3)
147152
if self.power > 50:

wifite/util/scanner.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ def print_targets(self):
143143
Color.p(' MANUFACTURER')
144144

145145

146-
Color.pl(' CH ENCR POWER WPS? CLIENT')
146+
Color.pl(' CH ENCR POWER WPS? CLIENT')
147147

148148
# Second row: separator
149149
Color.p(' ---')
@@ -154,7 +154,7 @@ def print_targets(self):
154154
if Configuration.show_manufacturers:
155155
Color.p(' ---------------------')
156156

157-
Color.pl(' --- ---- ----- ---- ------{W}')
157+
Color.pl(' --- ----- ----- ---- ------{W}')
158158

159159
# Remaining rows: targets
160160
for idx, target in enumerate(self.targets, start=1):
@@ -227,7 +227,7 @@ def select_targets(self):
227227
break
228228
if '-' in choice:
229229
# User selected a range
230-
(lower,upper) = [int(x) - 1 for x in choice.split('-')]
230+
(lower, upper) = [int(x) - 1 for x in choice.split('-')]
231231
for i in xrange(lower, min(len(self.targets), upper + 1)):
232232
chosen_targets.append(self.targets[i])
233233
elif choice.isdigit():

0 commit comments

Comments
 (0)