From 325775509458caa249440a445ab2717f25773e0c Mon Sep 17 00:00:00 2001 From: derv82 Date: Sat, 10 Mar 2018 15:58:36 -0500 Subject: [PATCH] Some "hidden" helper switches (-nd --no-deauths --nodeauths) When skipping an attack (WPA/WPS), explain why and mention the AP ESSID --- py/Arguments.py | 14 +++++++++++--- py/AttackWPA.py | 9 ++++----- py/AttackWPS.py | 5 +---- py/Configuration.py | 2 +- 4 files changed, 17 insertions(+), 13 deletions(-) diff --git a/py/Arguments.py b/py/Arguments.py index 6518594..36ece63 100644 --- a/py/Arguments.py +++ b/py/Arguments.py @@ -68,6 +68,14 @@ class Arguments(object): action='store_true', dest='no_deauth', help=Color.s('Do not deauthenticate clients *EVER* (default: {G}off{W})')) + glob.add_argument('--no-deauths', + action='store_true', + dest='no_deauth', + help=argparse.SUPPRESS) + glob.add_argument('-nd', + action='store_true', + dest='no_deauth', + help=argparse.SUPPRESS) glob.add_argument('--num-deauths', action='store', type=int, @@ -242,12 +250,12 @@ class Arguments(object): dest='wps_only', help=Color.s('{G}ALWAYS{W} use WPS attacks (Pixie-Dust) on WPA networks (default: {G}off{W})')) - # --pixie is IGNORED: PIN attack no longer available in Wifite + # Same as --wps-only wps.add_argument('--pixie', help=argparse.SUPPRESS, action='store_true', - dest='pixie_only', - help=Color.s('Only use the WPS Pixie-Dust attack (no PIN) (default: {G}off{W})')) + dest='wps_only') + wps.add_argument('--pixiet', action='store', dest='wps_pixie_timeout', diff --git a/py/AttackWPA.py b/py/AttackWPA.py index 1493005..d2e273c 100644 --- a/py/AttackWPA.py +++ b/py/AttackWPA.py @@ -29,8 +29,8 @@ class AttackWPA(Attack): ''' # Check if user only wants to run PixieDust attack - if Configuration.pixie_only and self.target.wps: - Color.pl('{!} {O}--pixie{R} set, ignoring WPA-handshake attack') + if Configuration.wps_only and self.target.wps: + Color.pl('\r{!} {O}--wps-only{R} set, ignoring WPA-handshake attack on {O}%s{W}' % self.target.essid) self.success = False return self.success @@ -81,9 +81,8 @@ class AttackWPA(Attack): essid = airodump_target.essid if airodump_target.essid_known else None handshake = self.load_handshake(bssid=bssid, essid=essid) if handshake: - Color.clear_entire_line() - Color.pl('{+} found {G}existing handshake{W} for {C}%s{W}' % handshake.essid) - Color.pl('{+} from {C}%s{W}' % handshake.capfile) + Color.pattack("WPA", self.target, "Handshake capture", "found {G}existing handshake{W} for {C}%s{W}" % handshake.essid) + Color.pl('\n{+} Using handshake from {C}%s{W}' % handshake.capfile) return handshake timeout_timer = Timer(Configuration.wpa_attack_timeout) diff --git a/py/AttackWPS.py b/py/AttackWPS.py index effc289..85f97a8 100644 --- a/py/AttackWPS.py +++ b/py/AttackWPS.py @@ -18,6 +18,7 @@ class AttackWPS(Attack): # Drop out if user specified to not use Reaver/Bully if Configuration.no_wps: + Color.pl('\r{!} {O}--no-wps{R} set, ignoring WPS attack on {O}%s{W}' % self.target.essid) self.success = False return self.success @@ -43,8 +44,4 @@ class AttackWPS(Attack): else: Color.pl("{!} {R}your version of 'reaver' does not support the {O}WPS pixie-dust attack{W}") - if Configuration.pixie_only: - Color.pl('\r{!} {O}--pixie{R} set, ignoring WPS-PIN attack{W}') - return False - return False diff --git a/py/Configuration.py b/py/Configuration.py index 4891336..5c07ebe 100644 --- a/py/Configuration.py +++ b/py/Configuration.py @@ -203,7 +203,7 @@ class Configuration(object): if args.wps_filter: Configuration.wps_filter = args.wps_filter if args.wps_only: - Configuration.wps_only = args.wps_only + Configuration.wps_only = True Color.pl('{+} {C}option:{W} will *only* attack non-WEP networks with {G}WPS attacks{W} (no handshake capture)') if args.no_wps: Configuration.no_wps = args.no_wps