From ebb7cac91cb3723072ae23700f58ddf72df6f2c4 Mon Sep 17 00:00:00 2001 From: derv82 Date: Sat, 18 Aug 2018 03:01:52 -0700 Subject: [PATCH] Removing the last of the double-quoted strings (now single-quoted) --- wifite/attack/all.py | 4 ++-- wifite/attack/wep.py | 46 +++++++++++++++++++++--------------------- wifite/attack/wps.py | 2 +- wifite/util/scanner.py | 8 ++++---- 4 files changed, 30 insertions(+), 30 deletions(-) diff --git a/wifite/attack/all.py b/wifite/attack/all.py index eab2bcefe..ce77d59cb 100755 --- a/wifite/attack/all.py +++ b/wifite/attack/all.py @@ -19,7 +19,7 @@ def attack_multiple(cls, targets): targets_remaining -= 1 bssid = target.bssid - essid = target.essid if target.essid_known else "{O}ESSID unknown{W}" + essid = target.essid if target.essid_known else '{O}ESSID unknown{W}' Color.pl('\n{+} ({G}%d{W}/{G}%d{W})' % (index, len(targets)) + ' starting attacks against {C}%s{W} ({C}%s{W})' % (bssid, essid)) @@ -64,7 +64,7 @@ def attack_single(cls, target, targets_remaining): attacks.append(AttackWPA(target)) if len(attacks) == 0: - Color.pl("{!} {R}Error: {O}unable to attack: encryption not WEP or WPA") + Color.pl('{!} {R}Error: {O}unable to attack: encryption not WEP or WPA') return for attack in attacks: diff --git a/wifite/attack/wep.py b/wifite/attack/wep.py index 2b83ef182..cef71cfd9 100755 --- a/wifite/attack/wep.py +++ b/wifite/attack/wep.py @@ -69,7 +69,7 @@ def run(self): # Use our interface's MAC address for the attacks. client_mac = Ifconfig.get_mac(Configuration.interface) # Keep us authenticated - fakeauth_proc = Aireplay(self.target, "fakeauth") + fakeauth_proc = Aireplay(self.target, 'fakeauth') elif len(airodump_target.clients) == 0: # Failed to fakeauth, can't use our MAC. # And there are no associated clients. Use one and tell the user. @@ -108,16 +108,16 @@ def run(self): current_ivs = airodump_target.ivs total_ivs = previous_ivs + current_ivs - status = "%d/{C}%d{W} IVs" % (total_ivs, Configuration.wep_crack_at_ivs) + status = '%d/{C}%d{W} IVs' % (total_ivs, Configuration.wep_crack_at_ivs) if fakeauth_proc: if fakeauth_proc and fakeauth_proc.status: - status += ", {G}fakeauth{W}" + status += ', {G}fakeauth{W}' else: - status += ", {R}no-auth{W}" + status += ', {R}no-auth{W}' if aireplay.status is not None: - status += ", %s" % aireplay.status + status += ', %s' % aireplay.status Color.clear_entire_line() - Color.pattack("WEP", airodump_target, "%s" % attack_name, status) + Color.pattack('WEP', airodump_target, '%s' % attack_name, status) # Check if we cracked it. if aircrack and aircrack.is_cracked(): @@ -141,7 +141,7 @@ def run(self): if aircrack and aircrack.is_running(): # Aircrack is running in the background. - Color.p("and {C}cracking{W}") + Color.p('and {C}cracking{W}') # Check number of IVs, crack if necessary if total_ivs > Configuration.wep_crack_at_ivs: @@ -180,7 +180,7 @@ def run(self): # If .xor is not there, the process failed. Color.pl('\n{!} {O}%s attack{R} did not generate a .xor file' % attack_name) # XXX: For debugging - Color.pl('{?} {O}Command: {R}%s{W}' % " ".join(aireplay.cmd)) + Color.pl('{?} {O}Command: {R}%s{W}' % ' '.join(aireplay.cmd)) Color.pl('{?} {O}Output:\n{R}%s{W}' % aireplay.get_output()) break @@ -193,8 +193,8 @@ def run(self): if replay_file: Color.pl('{+} {C}forged packet{W},' + ' {G}replaying...{W}') - wep_attack_type = WEPAttackType("forgedreplay") - attack_name = "forgedreplay" + wep_attack_type = WEPAttackType('forgedreplay') + attack_name = 'forgedreplay' aireplay = Aireplay(self.target, 'forgedreplay', client_mac=client_mac, @@ -206,7 +206,7 @@ def run(self): break else: Color.pl('\n{!} {O}aireplay-ng exited unexpectedly{W}') - Color.pl('{?} {O}Command: {R}%s{W}' % " ".join(aireplay.cmd)) + Color.pl('{?} {O}Command: {R}%s{W}' % ' '.join(aireplay.cmd)) Color.pl('{?} {O}Output:\n{R}%s{W}' % aireplay.get_output()) break # Continue to other attacks @@ -268,29 +268,29 @@ def user_wants_to_stop(self, current_attack, attacks_remaining, target): or if we should stop attacking this target (returns True). ''' if target is None: - Color.pl("") + Color.pl('') return True target_name = target.essid if target.essid_known else target.bssid - Color.pl("\n\n{!} {O}Interrupted") - Color.pl("{+} {W}Next steps:") + Color.pl('\n\n{!} {O}Interrupted') + Color.pl('{+} {W}Next steps:') # Deauth clients & retry attack_index = 1 - 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)) + 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)) # Move onto a different WEP attack for attack_name in attacks_remaining: attack_index += 1 - Color.pl(" {G}%d{W}: Start new {C}%s attack{W} against {G}%s{W}" % (attack_index, attack_name, target_name)) + Color.pl(' {G}%d{W}: Start new {C}%s attack{W} against {G}%s{W}' % (attack_index, attack_name, target_name)) # Stop attacking entirely attack_index += 1 - Color.pl(" {G}%d{W}: {R}Stop attacking, {O}Move onto next target{W}" % attack_index) + Color.pl(' {G}%d{W}: {R}Stop attacking, {O}Move onto next target{W}' % attack_index) while True: - answer = raw_input(Color.s("{?} Select an option ({G}1-%d{W}): " % attack_index)) + answer = raw_input(Color.s('{?} Select an option ({G}1-%d{W}): ' % attack_index)) if not answer.isdigit() or int(answer) < 1 or int(answer) > attack_index: - Color.pl("{!} {R}Invalid input: {O}Must enter a number between {G}1-%d{W}" % attack_index) + Color.pl('{!} {R}Invalid input: {O}Must enter a number between {G}1-%d{W}' % attack_index) continue answer = int(answer) break @@ -300,7 +300,7 @@ def user_wants_to_stop(self, current_attack, attacks_remaining, target): deauth_count = 1 Color.clear_entire_line() - Color.p("\r{+} {O}Deauthenticating *broadcast*{W} (all clients)...") + Color.p('\r{+} {O}Deauthenticating *broadcast*{W} (all clients)...') Aireplay.deauth(target.bssid, essid=target.essid) attacking_mac = Ifconfig.get_mac(Configuration.interface) @@ -309,13 +309,13 @@ def user_wants_to_stop(self, current_attack, attacks_remaining, target): continue # Don't deauth ourselves. Color.clear_entire_line() - Color.p("\r{+} {O}Deauthenticating client {C}%s{W}..." % client.station) + Color.p('\r{+} {O}Deauthenticating client {C}%s{W}...' % client.station) Aireplay.deauth(target.bssid, client_mac=client.station, essid=target.essid) deauth_count += 1 Color.clear_entire_line() - Color.pl("\r{+} Sent {C}%d {O}deauths{W}" % deauth_count) + Color.pl('\r{+} Sent {C}%d {O}deauths{W}' % deauth_count) # Re-insert current attack to top of list of attacks remaining attacks_remaining.insert(0, current_attack) @@ -357,7 +357,7 @@ def fake_auth(self): if __name__ == '__main__': Configuration.initialize(True) from ..model.target import Target - 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(',') + 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(',') target = Target(fields) wep = AttackWEP(target) wep.run() diff --git a/wifite/attack/wps.py b/wifite/attack/wps.py index a0bd82df0..afd25d377 100755 --- a/wifite/attack/wps.py +++ b/wifite/attack/wps.py @@ -43,7 +43,7 @@ def run_reaver(self): from ..tools.reaver import Reaver reaver = Reaver(self.target) if not reaver.is_pixiedust_supported(): - Color.pl("{!} {R}your version of 'reaver' does not support the {O}WPS pixie-dust attack{W}") + Color.pl('{!} {R}your version of "reaver" does not support the {O}WPS pixie-dust attack{W}') return False else: # Reaver: Pixie-dust diff --git a/wifite/util/scanner.py b/wifite/util/scanner.py index bbfbf78c1..568fd3427 100755 --- a/wifite/util/scanner.py +++ b/wifite/util/scanner.py @@ -112,7 +112,7 @@ def print_targets(self): return if self.previous_target_count > 0: - # We need to "overwrite" the previous list of targets. + # We need to 'overwrite' the previous list of targets. if Configuration.verbose <= 1: # Don't clear screen buffer in verbose mode. if self.previous_target_count > len(self.targets) or \ @@ -125,7 +125,7 @@ def print_targets(self): Process.call('clear') else: # We can fit the targets in the terminal without scrolling - # "Move" cursor up so we will print over the previous list + # 'Move' cursor up so we will print over the previous list Color.pl(Scanner.UP_CHAR * (3 + self.previous_target_count)) self.previous_target_count = len(self.targets) @@ -188,7 +188,7 @@ def select_targets(self): + ' You may need to wait longer,' + ' or you may have issues with your wifi card') - # Return all targets if user specified a wait time ("pillage"). + # Return all targets if user specified a wait time ('pillage'). if Configuration.scan_time > 0: return self.targets @@ -224,7 +224,7 @@ def select_targets(self): if __name__ == '__main__': - # "Test" script will display targets and selects the appropriate one + # 'Test' script will display targets and selects the appropriate one Configuration.initialize() try: s = Scanner()