Skip to content

Commit

Permalink
Rewording some printed text.
Browse files Browse the repository at this point in the history
  • Loading branch information
derv82 committed Aug 25, 2018
1 parent 2e671e0 commit 7f0197e
Show file tree
Hide file tree
Showing 4 changed files with 19 additions and 17 deletions.
2 changes: 1 addition & 1 deletion wifite/__main__.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,7 +96,7 @@ def entry_point():
Color.pl('\n{!} {R}Exiting{W}\n')

except KeyboardInterrupt:
Color.pl('\n{!} {O}interrupted, shutting down...{W}')
Color.pl('\n{!} {O}Interrupted, Shutting down...{W}')

Configuration.exit_gracefully(0)

Expand Down
5 changes: 3 additions & 2 deletions wifite/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -446,8 +446,9 @@ def exit_gracefully(cls, code=0):
Macchanger.reset_if_changed()
from .tools.airmon import Airmon
if cls.interface is not None and Airmon.base_interface is not None:
Color.pl('{!} Leaving interface {C}%s{W} in Monitor Mode.' % cls.interface)
Color.pl('{!} You can disable Monitor Mode when finished ({C}airmon-ng stop %s{W})' % cls.interface)
Color.pl('{!} {O}Note:{W} Leaving interface in Monitor Mode!')
Color.pl('{!} To disable Monitor Mode when finished: ' +
'{C}airmon-ng stop %s{W}' % cls.interface)

# Stop monitor mode
#Airmon.stop(cls.interface)
Expand Down
25 changes: 13 additions & 12 deletions wifite/tools/airmon.py
Original file line number Diff line number Diff line change
Expand Up @@ -277,27 +277,28 @@ def ask():

Airmon.terminate_conflicting_processes()

Color.pl('\n{+} looking for {C}wireless interfaces{W}')
Color.p('\n{+} Looking for {C}wireless interfaces{W}...')
monitor_interfaces = Iwconfig.get_interfaces(mode='Monitor')
if len(monitor_interfaces) == 1:
# Assume we're using the device already in montior mode
iface = monitor_interfaces[0]
Color.pl(' using interface {G}%s{W} (already in monitor mode)' % iface);
Color.pl(' you can specify the wireless interface using {C}-i wlan0{W}')
Color.clear_entire_line()
Color.pl('{+} Using {G}%s{W} already in monitor mode' % iface);
Airmon.base_interface = None
return iface

Color.clear_entire_line()
Color.p('{+} Checking {C}airmon-ng{W}...')
a = Airmon()
count = len(a.interfaces)
if count == 0:
# No interfaces found
Color.pl('\n{!} {O}airmon-ng did not find {R}any{O} wireless interfaces')
Color.pl('{!} {O}make sure your wireless device is connected')
Color.pl('{!} {O}see {C}http://www.aircrack-ng.org/doku.php?id=airmon-ng{O} for more info{W}')
Color.pl('{!} {O}Make sure your wireless device is connected')
Color.pl('{!} {O}See {C}http://www.aircrack-ng.org/doku.php?id=airmon-ng{O} for more info{W}')
raise Exception('airmon-ng did not find any wireless interfaces')

Color.pl('')

Color.clear_entire_line()
a.print_menu()

Color.pl('')
Expand All @@ -307,7 +308,7 @@ def ask():
choice = 1
else:
# Multiple interfaces found
question = Color.s('{+} select interface ({G}1-%d{W}): ' % (count))
question = Color.s('{+} Select wireless interface ({G}1-%d{W}): ' % (count))
choice = raw_input(question)

iface = a.get(choice)
Expand Down Expand Up @@ -347,19 +348,19 @@ def terminate_conflicting_processes():
'{R}%s{O} (PID {R}%s{O})' % (pname, pid)
for pid, pname in pid_pnames
])
Color.pl('{!} {O}conflicting processes: %s' % names_and_pids)
Color.pl('{!} {O}if you have problems: {R}kill -9 PID{O} or re-run wifite with {R}--kill{O}){W}')
Color.pl('{!} {O}Conflicting processes: %s' % names_and_pids)
Color.pl('{!} {O}If you have problems: {R}kill -9 PID{O} or re-run wifite with {R}--kill{O}){W}')
return

Color.pl('{!} {O}killing {R}%d {O}conflicting processes' % len(pid_pnames))
Color.pl('{!} {O}Killing {R}%d {O}conflicting processes' % len(pid_pnames))
for pid, pname in pid_pnames:
if pname == 'NetworkManager' and Process.exists('service'):
Color.pl('{!} {O}stopping network-manager ({R}service network-manager stop{O})')
# Can't just pkill network manager; it's a service
Process(['service', 'network-manager', 'stop']).wait()
Airmon.killed_network_manager = True
else:
Color.pl('{!} {R}terminating {O}conflicting process {R}%s{O} (PID {R}%s{O})' % (pname, pid))
Color.pl('{!} {R}Terminating {O}conflicting process {R}%s{O} (PID {R}%s{O})' % (pname, pid))
try:
os.kill(int(pid), signal.SIGTERM)
except:
Expand Down
4 changes: 2 additions & 2 deletions wifite/util/scanner.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ def print_targets(self):
self.previous_target_count = len(self.targets)

# Overwrite the current line
Color.p('\r')
Color.p('\r{W}{D}')

# First row: columns
Color.p(' NUM')
Expand All @@ -145,7 +145,7 @@ def print_targets(self):
Color.p(' -------------------------')
if Configuration.show_bssids:
Color.p(' -----------------')
Color.pl(' --- ---- ----- ---- ------')
Color.pl(' --- ---- ----- ---- ------{W}')

# Remaining rows: targets
for idx, target in enumerate(self.targets, start=1):
Expand Down

0 comments on commit 7f0197e

Please sign in to comment.