Implememt 'pillage' argument for option to attack all targets

This commit is contained in:
kimocoder
2018-02-26 13:50:27 +01:00
parent f4fc57a407
commit 6a13d64c75
3 changed files with 35 additions and 23 deletions

View File

@@ -77,6 +77,11 @@ class Arguments(object):
metavar="[num]",
default=None,
help=Color.s('Number of deauth packets to send (default: {G}%d{W})' % Configuration.num_deauths))
glob.add_argument('-p',
action='store',
dest='pillage',
type=bool,
help=Color.s('Pillage "All" mode to attack everything (default: {G}ask{W})'))
# WEP
wep = parser.add_argument_group('WEP-RELATED')

View File

@@ -29,6 +29,7 @@ class Configuration(object):
Configuration.verbose = 0 # Verbosity level.
Configuration.scan_time = 0 # Scan time
Configuration.all_targets = False # Run attacks against all targets automatically
Configuration.tx_power = 0 # Wifi transmit power (0 is default)
Configuration.interface = None
@@ -143,6 +144,9 @@ class Configuration(object):
if args.scan_time:
Configuration.scan_time = args.scan_time
Color.pl('{+} {C}option:{W} scan time {G}%d{W}' % args.scan_time)
if args.pillage:
Configuration.verbose = args.pillage
Color.pl('{+} {C}option:{W} pillage {G}%d{W}' % args.verbose)
if args.verbose:
Configuration.verbose = args.verbose
Color.pl('{+} {C}option:{W} verbosity level {G}%d{W}' % args.verbose)

View File

@@ -157,6 +157,7 @@ class Scanner(object):
+ " You may need to wait longer,"
+ " or you may have issues with your wifi card")
if not (Configuration.pillage is True):
self.print_targets()
Color.clear_entire_line()
input_str = '{+} select target(s)'
@@ -165,6 +166,7 @@ class Scanner(object):
input_str += ' or {G}all{W}: '
chosen_targets = []
for choice in raw_input(Color.s(input_str)).split(','):
if choice == 'all':
chosen_targets = self.targets
@@ -180,7 +182,8 @@ class Scanner(object):
else:
pass
return chosen_targets
else:
return self.targets
if __name__ == '__main__':
# Example displays targets and selects the appropriate one