Skip to content

Commit 5e20468

Browse files
committed
2.2.5: PMKID timeout changed to 30sec. --pmkid-timeout option to change.
For #134
1 parent 838ea43 commit 5e20468

File tree

3 files changed

+20
-7
lines changed

3 files changed

+20
-7
lines changed

wifite/args.py

+13-5
Original file line numberDiff line numberDiff line change
@@ -301,11 +301,13 @@ def _add_wpa_args(self, wpa):
301301
wpa.add_argument('-pmkid', action='store_true', dest='use_pmkid_only',
302302
help=argparse.SUPPRESS)
303303

304-
wpa.add_argument('--new-hs',
305-
action='store_true',
306-
dest='ignore_old_handshakes',
307-
help=Color.s('Captures new handshakes, ignores existing handshakes ' +
308-
'in ./hs (default: {G}off{W})'))
304+
wpa.add_argument('--pmkid-timeout',
305+
action='store',
306+
dest='pmkid_timeout',
307+
metavar='[sec]',
308+
type=int,
309+
help=self._verbose('Time to wait for PMKID capture ' +
310+
'(default: {G}%d{W} seconds)' % self.config.pmkid_timeout))
309311

310312
wpa.add_argument('--hs-dir',
311313
action='store',
@@ -317,6 +319,12 @@ def _add_wpa_args(self, wpa):
317319
wpa.add_argument('-hs-dir', help=argparse.SUPPRESS, action='store',
318320
dest='wpa_handshake_dir', type=str)
319321

322+
wpa.add_argument('--new-hs',
323+
action='store_true',
324+
dest='ignore_old_handshakes',
325+
help=Color.s('Captures new handshakes, ignores existing handshakes ' +
326+
'in {C}%s{W} (default: {G}off{W})' % self.config.wpa_handshake_dir))
327+
320328
wpa.add_argument('--dict',
321329
action='store',
322330
dest='wordlist',

wifite/attack/pmkid.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ def capture_pmkid(self):
108108
The PMKID hash (str) if found, otherwise None.
109109
'''
110110
self.keep_capturing = True
111-
self.timer = Timer(15)
111+
self.timer = Timer(Configuration.pmkid_timeout)
112112

113113
# Start hcxdumptool
114114
t = Thread(target=self.dumptool_thread)

wifite/config.py

+6-1
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88

99
class Configuration(object):
1010
''' Stores configuration variables and functions for Wifite. '''
11-
version = '2.2.4'
11+
version = '2.2.5'
1212

1313
initialized = False # Flag indicating config has been initialized
1414
temp_dir = None # Temporary directory
@@ -79,6 +79,7 @@ def initialize(cls, load_interface=True):
7979
cls.wpa_strip_handshake = False # Strip non-handshake packets
8080
cls.ignore_old_handshakes = False # Always fetch a new handshake
8181
cls.use_pmkid_only = False # Only use PMKID Capture+Crack attack
82+
cls.pmkid_timeout = 30 # Time to wait for PMKID capture
8283

8384
# Default dictionary for cracking
8485
cls.wordlist = None
@@ -307,6 +308,10 @@ def parse_wpa_args(cls, args):
307308
cls.use_pmkid_only = True
308309
Color.pl('{+} {C}option:{W} will ONLY use {C}PMKID{W} attack on WPA networks')
309310

311+
if args.pmkid_timeout:
312+
cls.pmkid_timeout = args.pmkid_timeout
313+
Color.pl('{+} {C}option:{W} will wait {G}%d{W} seconds during {C}PMKID{W} capture')
314+
310315
if args.wpa_handshake_dir:
311316
cls.wpa_handshake_dir = args.wpa_handshake_dir
312317
Color.pl('{+} {C}option:{W} will store handshakes to ' +

0 commit comments

Comments
 (0)