@@ -299,9 +299,8 @@ if __name__ == '__main__':
|
|||||||
from Color import Color
|
from Color import Color
|
||||||
|
|
||||||
targets = airodump.get_targets()
|
targets = airodump.get_targets()
|
||||||
Target.print_header()
|
|
||||||
for idx, target in enumerate(targets, start=1):
|
for idx, target in enumerate(targets, start=1):
|
||||||
Color.pl(' {G}%s %s' % (str(idx).rjust(3), target))
|
Color.pl(' {G}%s %s' % (str(idx).rjust(3), target.to_str()))
|
||||||
|
|
||||||
Configuration.delete_temp()
|
Configuration.delete_temp()
|
||||||
|
|
||||||
|
|||||||
@@ -54,6 +54,10 @@ class Arguments(object):
|
|||||||
type=str,
|
type=str,
|
||||||
help=Color.s('ESSID (e.g. {GR}NETGEAR07{W}) of access point to attack'))
|
help=Color.s('ESSID (e.g. {GR}NETGEAR07{W}) of access point to attack'))
|
||||||
glob.add_argument('--essid', help=argparse.SUPPRESS, action='store', dest='target_essid', type=str)
|
glob.add_argument('--essid', help=argparse.SUPPRESS, action='store', dest='target_essid', type=str)
|
||||||
|
glob.add_argument('--showb',
|
||||||
|
action='store_true',
|
||||||
|
dest='show_bssids',
|
||||||
|
help=Color.s('Show BSSIDs of targets while scanning'))
|
||||||
glob.add_argument('-v',
|
glob.add_argument('-v',
|
||||||
'--verbose',
|
'--verbose',
|
||||||
action='count',
|
action='count',
|
||||||
|
|||||||
@@ -37,6 +37,7 @@ class Configuration(object):
|
|||||||
Configuration.target_essid = None # User-defined AP name
|
Configuration.target_essid = None # User-defined AP name
|
||||||
Configuration.target_bssid = None # User-defined AP BSSID
|
Configuration.target_bssid = None # User-defined AP BSSID
|
||||||
Configuration.five_ghz = False # Scan 5Ghz channels
|
Configuration.five_ghz = False # Scan 5Ghz channels
|
||||||
|
Configuration.show_bssids = False # Show BSSIDs in targets list
|
||||||
Configuration.random_mac = False # Should generate a random Mac address at startup.
|
Configuration.random_mac = False # Should generate a random Mac address at startup.
|
||||||
Configuration.no_deauth = False # Deauth hidden networks & WPA handshake targets
|
Configuration.no_deauth = False # Deauth hidden networks & WPA handshake targets
|
||||||
Configuration.num_deauths = 1 # Number of deauth packets to send to each target.
|
Configuration.num_deauths = 1 # Number of deauth packets to send to each target.
|
||||||
@@ -133,6 +134,9 @@ class Configuration(object):
|
|||||||
if args.five_ghz == True:
|
if args.five_ghz == True:
|
||||||
Configuration.five_ghz = True
|
Configuration.five_ghz = True
|
||||||
Color.pl('{+} {C}option:{W} including {G}5Ghz networks{W} in scans')
|
Color.pl('{+} {C}option:{W} including {G}5Ghz networks{W} in scans')
|
||||||
|
if args.show_bssids == True:
|
||||||
|
Configuration.show_bssids = True
|
||||||
|
Color.pl('{+} {C}option:{W} showing {G}bssids{W} of targets during scan')
|
||||||
if args.no_deauth == True:
|
if args.no_deauth == True:
|
||||||
Configuration.no_deauth = True
|
Configuration.no_deauth = True
|
||||||
Color.pl('{+} {C}option:{W} will {R}not{W} {O}deauth{W} clients during scans or captures')
|
Color.pl('{+} {C}option:{W} will {R}not{W} {O}deauth{W} clients during scans or captures')
|
||||||
|
|||||||
@@ -132,10 +132,25 @@ class Scanner(object):
|
|||||||
# Overwrite the current line
|
# Overwrite the current line
|
||||||
Color.p('\r')
|
Color.p('\r')
|
||||||
|
|
||||||
Target.print_header()
|
# First row: columns
|
||||||
|
Color.p(' NUM')
|
||||||
|
Color.p(' ESSID')
|
||||||
|
if Configuration.show_bssids:
|
||||||
|
Color.p(' BSSID')
|
||||||
|
Color.pl(' CH ENCR POWER WPS? CLIENT')
|
||||||
|
|
||||||
|
# Second row: separator
|
||||||
|
Color.p(' ---')
|
||||||
|
Color.p(' -------------------------')
|
||||||
|
if Configuration.show_bssids:
|
||||||
|
Color.p(' -----------------')
|
||||||
|
Color.pl(' --- ---- ----- ---- ------')
|
||||||
|
|
||||||
|
# Remaining rows: targets
|
||||||
for idx, target in enumerate(self.targets, start=1):
|
for idx, target in enumerate(self.targets, start=1):
|
||||||
Color.clear_entire_line()
|
Color.clear_entire_line()
|
||||||
Color.pl(' {G}%s %s' % (str(idx).rjust(3), target))
|
Color.p(' {G}%s ' % str(idx).rjust(3))
|
||||||
|
Color.pl(target.to_str(Configuration.show_bssids))
|
||||||
|
|
||||||
@staticmethod
|
@staticmethod
|
||||||
def get_terminal_height():
|
def get_terminal_height():
|
||||||
|
|||||||
21
py/Target.py
21
py/Target.py
@@ -78,7 +78,7 @@ class Target(object):
|
|||||||
if bssid_multicast.match(self.bssid):
|
if bssid_multicast.match(self.bssid):
|
||||||
raise Exception("Ignoring target with Multicast BSSID (%s)" % self.bssid)
|
raise Exception("Ignoring target with Multicast BSSID (%s)" % self.bssid)
|
||||||
|
|
||||||
def __str__(self):
|
def to_str(self, show_bssid=False):
|
||||||
'''
|
'''
|
||||||
*Colored* string representation of this Target.
|
*Colored* string representation of this Target.
|
||||||
Specifically formatted for the "scanning" table view.
|
Specifically formatted for the "scanning" table view.
|
||||||
@@ -99,6 +99,11 @@ class Target(object):
|
|||||||
# Unknown ESSID
|
# Unknown ESSID
|
||||||
essid = Color.s("{O}%s" % essid)
|
essid = Color.s("{O}%s" % essid)
|
||||||
|
|
||||||
|
if show_bssid:
|
||||||
|
bssid = Color.s('{O}%s ' % self.bssid)
|
||||||
|
else:
|
||||||
|
bssid = ''
|
||||||
|
|
||||||
channel_color = "{G}"
|
channel_color = "{G}"
|
||||||
if int(self.channel) > 14:
|
if int(self.channel) > 14:
|
||||||
channel_color = "{C}"
|
channel_color = "{C}"
|
||||||
@@ -131,24 +136,16 @@ class Target(object):
|
|||||||
if len(self.clients) > 0:
|
if len(self.clients) > 0:
|
||||||
clients = Color.s('{G} ' + str(len(self.clients)))
|
clients = Color.s('{G} ' + str(len(self.clients)))
|
||||||
|
|
||||||
result = '%s %s %s %s %s %s' % (essid, channel,
|
result = '%s %s%s %s %s %s %s' % (
|
||||||
encryption, power,
|
essid, bssid, channel, encryption, power, wps, clients)
|
||||||
wps, clients)
|
|
||||||
result += Color.s("{W}")
|
result += Color.s("{W}")
|
||||||
return result
|
return result
|
||||||
|
|
||||||
@staticmethod
|
|
||||||
def print_header():
|
|
||||||
''' Prints header rows for "scanning" table view '''
|
|
||||||
print ' NUM ESSID CH ENCR POWER WPS? CLIENT'
|
|
||||||
print ' --- ------------------------- --- ---- ----- ---- ------'
|
|
||||||
|
|
||||||
|
|
||||||
if __name__ == '__main__':
|
if __name__ == '__main__':
|
||||||
fields = 'AA:BB:CC:DD:EE:FF,2015-05-27 19:28:44,2015-05-27 19:28:46,1,54,WPA2,CCMP TKIP,PSK,-58,2,0,0.0.0.0,9,HOME-ABCD,'.split(',')
|
fields = 'AA:BB:CC:DD:EE:FF,2015-05-27 19:28:44,2015-05-27 19:28:46,1,54,WPA2,CCMP TKIP,PSK,-58,2,0,0.0.0.0,9,HOME-ABCD,'.split(',')
|
||||||
t = Target(fields)
|
t = Target(fields)
|
||||||
t.clients.append("asdf")
|
t.clients.append("asdf")
|
||||||
t.clients.append("asdf")
|
t.clients.append("asdf")
|
||||||
Target.print_header()
|
print t.to_str()
|
||||||
Color.pl(' {G}%s %s' % ('1'.rjust(3), t))
|
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user