Skip to content

Commit

Permalink
Minor changes PR derv82#181
Browse files Browse the repository at this point in the history
  • Loading branch information
simonblack committed Dec 14, 2018
1 parent 88a32e2 commit bd3fc8f
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 10 deletions.
7 changes: 5 additions & 2 deletions wifite/attack/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -114,7 +114,9 @@ def user_wants_to_continue(cls, targets_remaining, attacks_remaining=0):
'''
Asks user if attacks should continue onto other targets
Returns:
True if user wants to continue, False otherwise.
None if the user wants to skip the current target
True if the user wants to continue to the next attack on the current target
False if the user wants to stop the remaining attacks
'''
if attacks_remaining == 0 and targets_remaining == 0:
return # No targets or attacksleft, drop out
Expand Down Expand Up @@ -142,7 +144,8 @@ def user_wants_to_continue(cls, targets_remaining, attacks_remaining=0):
prompt += ' or {R}exit{W} %s? {C}' % options

from ..util.input import raw_input
answer = raw_input(Color.s(prompt)).lower()
Color.p(prompt)
answer = raw_input().lower()

if answer.startswith('s'):
return None # Skip
Expand Down
3 changes: 2 additions & 1 deletion wifite/attack/wep.py
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,8 @@ def user_wants_to_stop(self, current_attack, attacks_remaining, target):
attack_index += 1
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))
Color.p('{?} Select an option ({G}1-%d{W}): ' % attack_index)
answer = raw_input()
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)
continue
Expand Down
8 changes: 4 additions & 4 deletions wifite/attack/wps.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,14 +34,14 @@ def run(self):
return False

if not Configuration.wps_pixie and self.pixie_dust:
Color.pl('\r{!} {O}--no-pixie{R} was given, ignoring WPS PIN Attack on ' +
'{O}%s{W}' % self.target.essid)
Color.pl('\r{!} {O}--no-pixie{R} was given, ignoring WPS Pixie-Dust Attack ' +
'on {O}%s{W}' % self.target.essid)
self.success = False
return False

if not Configuration.wps_pin and not self.pixie_dust:
Color.pl('\r{!} {O}--no-pin{R} was given, ignoring WPS Pixie-Dust Attack ' +
'on {O}%s{W}' % self.target.essid)
Color.pl('\r{!} {O}--pixie{R} was given, ignoring WPS PIN Attack on ' +
'{O}%s{W}' % self.target.essid)
self.success = False
return False

Expand Down
4 changes: 2 additions & 2 deletions wifite/tools/airmon.py
Original file line number Diff line number Diff line change
Expand Up @@ -308,8 +308,8 @@ def ask():
choice = 1
else:
# Multiple interfaces found
question = Color.s('{+} Select wireless interface ({G}1-%d{W}): ' % (count))
choice = raw_input(question)
Color.p('{+} Select wireless interface ({G}1-%d{W}): ' % (count))
choice = raw_input()

iface = a.get(choice)

Expand Down
3 changes: 2 additions & 1 deletion wifite/util/scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -219,7 +219,8 @@ def select_targets(self):

chosen_targets = []

for choice in raw_input(Color.s(input_str)).split(','):
Color.p(input_str)
for choice in raw_input().split(','):
choice = choice.strip()
if choice.lower() == 'all':
chosen_targets = self.targets
Expand Down

0 comments on commit bd3fc8f

Please sign in to comment.