Skip to content

Commit ebb7cac

Browse files
committed
Removing the last of the double-quoted strings (now single-quoted)
1 parent c4ed911 commit ebb7cac

File tree

4 files changed

+30
-30
lines changed

4 files changed

+30
-30
lines changed

wifite/attack/all.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def attack_multiple(cls, targets):
1919
targets_remaining -= 1
2020

2121
bssid = target.bssid
22-
essid = target.essid if target.essid_known else "{O}ESSID unknown{W}"
22+
essid = target.essid if target.essid_known else '{O}ESSID unknown{W}'
2323

2424
Color.pl('\n{+} ({G}%d{W}/{G}%d{W})' % (index, len(targets)) +
2525
' starting attacks against {C}%s{W} ({C}%s{W})' % (bssid, essid))
@@ -64,7 +64,7 @@ def attack_single(cls, target, targets_remaining):
6464
attacks.append(AttackWPA(target))
6565

6666
if len(attacks) == 0:
67-
Color.pl("{!} {R}Error: {O}unable to attack: encryption not WEP or WPA")
67+
Color.pl('{!} {R}Error: {O}unable to attack: encryption not WEP or WPA')
6868
return
6969

7070
for attack in attacks:

wifite/attack/wep.py

Lines changed: 23 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -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):
357357
if __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()

wifite/attack/wps.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ def run_reaver(self):
4343
from ..tools.reaver import Reaver
4444
reaver = Reaver(self.target)
4545
if not reaver.is_pixiedust_supported():
46-
Color.pl("{!} {R}your version of 'reaver' does not support the {O}WPS pixie-dust attack{W}")
46+
Color.pl('{!} {R}your version of "reaver" does not support the {O}WPS pixie-dust attack{W}')
4747
return False
4848
else:
4949
# Reaver: Pixie-dust

wifite/util/scanner.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def print_targets(self):
112112
return
113113

114114
if self.previous_target_count > 0:
115-
# We need to "overwrite" the previous list of targets.
115+
# We need to 'overwrite' the previous list of targets.
116116
if Configuration.verbose <= 1:
117117
# Don't clear screen buffer in verbose mode.
118118
if self.previous_target_count > len(self.targets) or \
@@ -125,7 +125,7 @@ def print_targets(self):
125125
Process.call('clear')
126126
else:
127127
# We can fit the targets in the terminal without scrolling
128-
# "Move" cursor up so we will print over the previous list
128+
# 'Move' cursor up so we will print over the previous list
129129
Color.pl(Scanner.UP_CHAR * (3 + self.previous_target_count))
130130

131131
self.previous_target_count = len(self.targets)
@@ -188,7 +188,7 @@ def select_targets(self):
188188
+ ' You may need to wait longer,'
189189
+ ' or you may have issues with your wifi card')
190190

191-
# Return all targets if user specified a wait time ("pillage").
191+
# Return all targets if user specified a wait time ('pillage').
192192
if Configuration.scan_time > 0:
193193
return self.targets
194194

@@ -224,7 +224,7 @@ def select_targets(self):
224224

225225

226226
if __name__ == '__main__':
227-
# "Test" script will display targets and selects the appropriate one
227+
# 'Test' script will display targets and selects the appropriate one
228228
Configuration.initialize()
229229
try:
230230
s = Scanner()

0 commit comments

Comments
 (0)