Fix monitor interface consistency issue

This commit is contained in:
derv82
2015-06-01 09:11:20 -07:00
parent c298be6bd2
commit 9a8dec818e
2 changed files with 9 additions and 5 deletions

View File

@@ -3,6 +3,7 @@
from Interface import Interface from Interface import Interface
from Process import Process from Process import Process
from Color import Color from Color import Color
from Configuration import Configuration
class Airmon(object): class Airmon(object):
''' Wrapper around the 'airmon-ng' program ''' ''' Wrapper around the 'airmon-ng' program '''
@@ -99,6 +100,9 @@ class Airmon(object):
# No errors found; the device 'mon_iface' was put into MM. # No errors found; the device 'mon_iface' was put into MM.
Color.pl("{G}enabled {C}%s{W}" % mon_iface) Color.pl("{G}enabled {C}%s{W}" % mon_iface)
Configuration.interface = mon_iface
return mon_iface return mon_iface
@@ -159,7 +163,7 @@ class Airmon(object):
if a.get(choice).name in mon_ifaces: if a.get(choice).name in mon_ifaces:
Color.pl('{+} {G}%s{W} is already in monitor mode' % iface.name) Color.pl('{+} {G}%s{W} is already in monitor mode' % iface.name)
else: else:
Airmon.start(iface) iface.name = Airmon.start(iface)
return iface.name return iface.name

View File

@@ -39,10 +39,10 @@ class Scanner(object):
[len(t.clients) [len(t.clients)
for t in self.targets]) for t in self.targets])
Color.p( Color.p(
"\r{+} scanning, " + '\r{+} scanning, found' +
"found {G}%d{W} target(s)," % target_count + ' {G}%d{W} target(s),' % target_count +
" {G}%d{W} clients" % client_count + ' {G}%d{W} clients.' % client_count +
". {O}Ctrl+C{W} when ready") ' {O}Ctrl+C{W} when ready')
sleep(1) sleep(1)
self.targets = airodump.get_targets() self.targets = airodump.get_targets()
self.print_targets() self.print_targets()