@@ -69,7 +69,7 @@ def run(self):
6969 # Use our interface's MAC address for the attacks.
7070 client_mac = Ifconfig .get_mac (Configuration .interface )
7171 # Keep us authenticated
72- fakeauth_proc = Aireplay (self .target , " fakeauth" )
72+ fakeauth_proc = Aireplay (self .target , ' fakeauth' )
7373 elif len (airodump_target .clients ) == 0 :
7474 # Failed to fakeauth, can't use our MAC.
7575 # And there are no associated clients. Use one and tell the user.
@@ -108,16 +108,16 @@ def run(self):
108108 current_ivs = airodump_target .ivs
109109 total_ivs = previous_ivs + current_ivs
110110
111- status = " %d/{C}%d{W} IVs" % (total_ivs , Configuration .wep_crack_at_ivs )
111+ status = ' %d/{C}%d{W} IVs' % (total_ivs , Configuration .wep_crack_at_ivs )
112112 if fakeauth_proc :
113113 if fakeauth_proc and fakeauth_proc .status :
114- status += " , {G}fakeauth{W}"
114+ status += ' , {G}fakeauth{W}'
115115 else :
116- status += " , {R}no-auth{W}"
116+ status += ' , {R}no-auth{W}'
117117 if aireplay .status is not None :
118- status += " , %s" % aireplay .status
118+ status += ' , %s' % aireplay .status
119119 Color .clear_entire_line ()
120- Color .pattack (" WEP" , airodump_target , "%s" % attack_name , status )
120+ Color .pattack (' WEP' , airodump_target , '%s' % attack_name , status )
121121
122122 # Check if we cracked it.
123123 if aircrack and aircrack .is_cracked ():
@@ -141,7 +141,7 @@ def run(self):
141141
142142 if aircrack and aircrack .is_running ():
143143 # Aircrack is running in the background.
144- Color .p (" and {C}cracking{W}" )
144+ Color .p (' and {C}cracking{W}' )
145145
146146 # Check number of IVs, crack if necessary
147147 if total_ivs > Configuration .wep_crack_at_ivs :
@@ -180,7 +180,7 @@ def run(self):
180180 # If .xor is not there, the process failed.
181181 Color .pl ('\n {!} {O}%s attack{R} did not generate a .xor file' % attack_name )
182182 # XXX: For debugging
183- Color .pl ('{?} {O}Command: {R}%s{W}' % " " .join (aireplay .cmd ))
183+ Color .pl ('{?} {O}Command: {R}%s{W}' % ' ' .join (aireplay .cmd ))
184184 Color .pl ('{?} {O}Output:\n {R}%s{W}' % aireplay .get_output ())
185185 break
186186
@@ -193,8 +193,8 @@ def run(self):
193193 if replay_file :
194194 Color .pl ('{+} {C}forged packet{W},' +
195195 ' {G}replaying...{W}' )
196- wep_attack_type = WEPAttackType (" forgedreplay" )
197- attack_name = " forgedreplay"
196+ wep_attack_type = WEPAttackType (' forgedreplay' )
197+ attack_name = ' forgedreplay'
198198 aireplay = Aireplay (self .target ,
199199 'forgedreplay' ,
200200 client_mac = client_mac ,
@@ -206,7 +206,7 @@ def run(self):
206206 break
207207 else :
208208 Color .pl ('\n {!} {O}aireplay-ng exited unexpectedly{W}' )
209- Color .pl ('{?} {O}Command: {R}%s{W}' % " " .join (aireplay .cmd ))
209+ Color .pl ('{?} {O}Command: {R}%s{W}' % ' ' .join (aireplay .cmd ))
210210 Color .pl ('{?} {O}Output:\n {R}%s{W}' % aireplay .get_output ())
211211 break # Continue to other attacks
212212
@@ -268,29 +268,29 @@ def user_wants_to_stop(self, current_attack, attacks_remaining, target):
268268 or if we should stop attacking this target (returns True).
269269 '''
270270 if target is None :
271- Color .pl ("" )
271+ Color .pl ('' )
272272 return True
273273 target_name = target .essid if target .essid_known else target .bssid
274274
275- Color .pl (" \n \n {!} {O}Interrupted" )
276- Color .pl (" {+} {W}Next steps:" )
275+ Color .pl (' \n \n {!} {O}Interrupted' )
276+ Color .pl (' {+} {W}Next steps:' )
277277
278278 # Deauth clients & retry
279279 attack_index = 1
280- Color .pl (" {G}1{W}: {O}Deauth clients{W} and {G}retry{W} {C}%s attack{W} against {G}%s{W}" % (current_attack , target_name ))
280+ Color .pl (' {G}1{W}: {O}Deauth clients{W} and {G}retry{W} {C}%s attack{W} against {G}%s{W}' % (current_attack , target_name ))
281281
282282 # Move onto a different WEP attack
283283 for attack_name in attacks_remaining :
284284 attack_index += 1
285- Color .pl (" {G}%d{W}: Start new {C}%s attack{W} against {G}%s{W}" % (attack_index , attack_name , target_name ))
285+ Color .pl (' {G}%d{W}: Start new {C}%s attack{W} against {G}%s{W}' % (attack_index , attack_name , target_name ))
286286
287287 # Stop attacking entirely
288288 attack_index += 1
289- Color .pl (" {G}%d{W}: {R}Stop attacking, {O}Move onto next target{W}" % attack_index )
289+ Color .pl (' {G}%d{W}: {R}Stop attacking, {O}Move onto next target{W}' % attack_index )
290290 while True :
291- answer = raw_input (Color .s (" {?} Select an option ({G}1-%d{W}): " % attack_index ))
291+ answer = raw_input (Color .s (' {?} Select an option ({G}1-%d{W}): ' % attack_index ))
292292 if not answer .isdigit () or int (answer ) < 1 or int (answer ) > attack_index :
293- Color .pl (" {!} {R}Invalid input: {O}Must enter a number between {G}1-%d{W}" % attack_index )
293+ Color .pl (' {!} {R}Invalid input: {O}Must enter a number between {G}1-%d{W}' % attack_index )
294294 continue
295295 answer = int (answer )
296296 break
@@ -300,7 +300,7 @@ def user_wants_to_stop(self, current_attack, attacks_remaining, target):
300300 deauth_count = 1
301301 Color .clear_entire_line ()
302302
303- Color .p (" \r {+} {O}Deauthenticating *broadcast*{W} (all clients)..." )
303+ Color .p (' \r {+} {O}Deauthenticating *broadcast*{W} (all clients)...' )
304304 Aireplay .deauth (target .bssid , essid = target .essid )
305305
306306 attacking_mac = Ifconfig .get_mac (Configuration .interface )
@@ -309,13 +309,13 @@ def user_wants_to_stop(self, current_attack, attacks_remaining, target):
309309 continue # Don't deauth ourselves.
310310
311311 Color .clear_entire_line ()
312- Color .p (" \r {+} {O}Deauthenticating client {C}%s{W}..." % client .station )
312+ Color .p (' \r {+} {O}Deauthenticating client {C}%s{W}...' % client .station )
313313
314314 Aireplay .deauth (target .bssid , client_mac = client .station , essid = target .essid )
315315 deauth_count += 1
316316
317317 Color .clear_entire_line ()
318- Color .pl (" \r {+} Sent {C}%d {O}deauths{W}" % deauth_count )
318+ Color .pl (' \r {+} Sent {C}%d {O}deauths{W}' % deauth_count )
319319
320320 # Re-insert current attack to top of list of attacks remaining
321321 attacks_remaining .insert (0 , current_attack )
@@ -357,7 +357,7 @@ def fake_auth(self):
357357if __name__ == '__main__' :
358358 Configuration .initialize (True )
359359 from ..model .target import Target
360- fields = " A4:2B:8C:16:6B:3A, 2015-05-27 19:28:44, 2015-05-27 19:28:46, 6, 54e,WEP, WEP, , -58, 2, 0, 0. 0. 0. 0, 9, Test Router Please Ignore, " .split (',' )
360+ fields = ' A4:2B:8C:16:6B:3A, 2015-05-27 19:28:44, 2015-05-27 19:28:46, 6, 54e,WEP, WEP, , -58, 2, 0, 0. 0. 0. 0, 9, Test Router Please Ignore, ' .split (',' )
361361 target = Target (fields )
362362 wep = AttackWEP (target )
363363 wep .run ()
0 commit comments