From 5e204686fa250342ffce6bc1ca3d67d9f095a5da Mon Sep 17 00:00:00 2001 From: derv82 Date: Mon, 3 Sep 2018 10:26:08 -0700 Subject: [PATCH] 2.2.5: PMKID timeout changed to 30sec. --pmkid-timeout option to change. For #134 --- wifite/args.py | 18 +++++++++++++----- wifite/attack/pmkid.py | 2 +- wifite/config.py | 7 ++++++- 3 files changed, 20 insertions(+), 7 deletions(-) diff --git a/wifite/args.py b/wifite/args.py index 3f3048d97..2be24bf00 100755 --- a/wifite/args.py +++ b/wifite/args.py @@ -301,11 +301,13 @@ def _add_wpa_args(self, wpa): wpa.add_argument('-pmkid', action='store_true', dest='use_pmkid_only', help=argparse.SUPPRESS) - wpa.add_argument('--new-hs', - action='store_true', - dest='ignore_old_handshakes', - help=Color.s('Captures new handshakes, ignores existing handshakes ' + - 'in ./hs (default: {G}off{W})')) + wpa.add_argument('--pmkid-timeout', + action='store', + dest='pmkid_timeout', + metavar='[sec]', + type=int, + help=self._verbose('Time to wait for PMKID capture ' + + '(default: {G}%d{W} seconds)' % self.config.pmkid_timeout)) wpa.add_argument('--hs-dir', action='store', @@ -317,6 +319,12 @@ def _add_wpa_args(self, wpa): wpa.add_argument('-hs-dir', help=argparse.SUPPRESS, action='store', dest='wpa_handshake_dir', type=str) + wpa.add_argument('--new-hs', + action='store_true', + dest='ignore_old_handshakes', + help=Color.s('Captures new handshakes, ignores existing handshakes ' + + 'in {C}%s{W} (default: {G}off{W})' % self.config.wpa_handshake_dir)) + wpa.add_argument('--dict', action='store', dest='wordlist', diff --git a/wifite/attack/pmkid.py b/wifite/attack/pmkid.py index e7ac5d318..01f3680a5 100755 --- a/wifite/attack/pmkid.py +++ b/wifite/attack/pmkid.py @@ -108,7 +108,7 @@ def capture_pmkid(self): The PMKID hash (str) if found, otherwise None. ''' self.keep_capturing = True - self.timer = Timer(15) + self.timer = Timer(Configuration.pmkid_timeout) # Start hcxdumptool t = Thread(target=self.dumptool_thread) diff --git a/wifite/config.py b/wifite/config.py index 010784102..47a4c8f3f 100755 --- a/wifite/config.py +++ b/wifite/config.py @@ -8,7 +8,7 @@ class Configuration(object): ''' Stores configuration variables and functions for Wifite. ''' - version = '2.2.4' + version = '2.2.5' initialized = False # Flag indicating config has been initialized temp_dir = None # Temporary directory @@ -79,6 +79,7 @@ def initialize(cls, load_interface=True): cls.wpa_strip_handshake = False # Strip non-handshake packets cls.ignore_old_handshakes = False # Always fetch a new handshake cls.use_pmkid_only = False # Only use PMKID Capture+Crack attack + cls.pmkid_timeout = 30 # Time to wait for PMKID capture # Default dictionary for cracking cls.wordlist = None @@ -307,6 +308,10 @@ def parse_wpa_args(cls, args): cls.use_pmkid_only = True Color.pl('{+} {C}option:{W} will ONLY use {C}PMKID{W} attack on WPA networks') + if args.pmkid_timeout: + cls.pmkid_timeout = args.pmkid_timeout + Color.pl('{+} {C}option:{W} will wait {G}%d{W} seconds during {C}PMKID{W} capture') + if args.wpa_handshake_dir: cls.wpa_handshake_dir = args.wpa_handshake_dir Color.pl('{+} {C}option:{W} will store handshakes to ' +