Adding 5ghz support

This commit is contained in:
derv82
2015-12-28 12:52:29 -05:00
parent 95b7296444
commit 746da03580
6 changed files with 21 additions and 7 deletions

View File

@@ -67,7 +67,7 @@ class Wifite(object):
if not os.path.exists(capfile):
Color.pl('{!} {O}.cap file {C}%s{O} not found{W}' % capfile)
return
hs = Handshake(capfile)
hs = Handshake(capfile, bssid=Configuration.target_bssid, essid=Configuration.target_essid)
hs.analyze()

View File

@@ -31,6 +31,7 @@ class Airodump(object):
if channel == None:
channel = Configuration.target_channel
self.channel = channel
self.five_ghz = Configuration.five_ghz
self.encryption = encryption
self.wps = wps
@@ -59,6 +60,9 @@ class Airodump(object):
]
if self.channel:
command.extend(['-c', str(self.channel)])
elif self.five_ghz:
command.extend(['--band', 'abg'])
if self.encryption:
command.extend(['--enc', self.encryption])
if self.wps:

View File

@@ -28,6 +28,11 @@ class Arguments(object):
metavar='[channel]',
type=int,
help=Color.s('Wireless channel to scan (default: {G}all channels{W})'))
glob.add_argument('-5',
'--5ghz',
action='store_true',
dest='five_ghz',
help=Color.s('Include 5Ghz channels (default: {G}off{W})'))
glob.add_argument('-b',
action='store',
dest='target_bssid',

View File

@@ -19,7 +19,7 @@ class AttackWPS(Attack):
def run(self):
''' Run all WPS-related attacks '''
# Drop out if user specified to not user Reaver
# Drop out if user specified to not use Reaver
if Configuration.no_reaver:
self.success = False
return self.success

View File

@@ -30,6 +30,7 @@ class Configuration(object):
Configuration.target_channel = None # User-defined channel to scan
Configuration.target_essid = None # User-defined AP name
Configuration.target_bssid = None # User-defined AP BSSID
Configuration.five_ghz = False # Scan 5Ghz channels
Configuration.pillage = False # "All" mode to attack everything
Configuration.encryption_filter = ['WEP', 'WPA', 'WPS']
@@ -113,6 +114,9 @@ class Configuration(object):
if args.target_bssid:
Configuration.target_bssid = args.target_bssid
Color.pl('{+} {C}option:{W} targeting BSSID {G}%s{W}' % args.target_bssid)
if args.five_ghz == True:
Configuration.five_ghz = True
Color.pl('{+} {C}option:{W} including {G}5Ghz networks{W} in scans')
if args.target_essid:
Configuration.target_essid = args.target_essid
Color.pl('{+} {C}option:{W} targeting ESSID {G}%s{W}' % args.target_essid)

View File

@@ -81,9 +81,10 @@ class Target(object):
# Unknown ESSID
essid = Color.s("{O}%s" % essid)
channel = str(self.channel)
if len(channel) == 1:
channel = Color.s("{G} %s" % channel)
channel_color = "{G}"
if int(self.channel) > 14:
channel_color = "{C}"
channel = Color.s("%s%s" % (channel_color, str(self.channel).rjust(3)))
encryption = self.encryption.rjust(4)
if 'WEP' in encryption:
@@ -122,7 +123,7 @@ class Target(object):
def print_header():
''' Prints header rows for "scanning" table view '''
print ' NUM ESSID CH ENCR POWER WPS? CLIENT'
print ' --- ------------------------- -- ---- ----- ---- ------'
print ' --- ------------------------- --- ---- ----- ---- ------'
if __name__ == '__main__':