Skip to content

Commit

Permalink
2.2.5: PMKID timeout changed to 30sec. --pmkid-timeout option to change.
Browse files Browse the repository at this point in the history
For #134
  • Loading branch information
derv82 committed Sep 3, 2018
1 parent 838ea43 commit 5e20468
Show file tree
Hide file tree
Showing 3 changed files with 20 additions and 7 deletions.
18 changes: 13 additions & 5 deletions wifite/args.py
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand All @@ -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',
Expand Down
2 changes: 1 addition & 1 deletion wifite/attack/pmkid.py
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand Down
7 changes: 6 additions & 1 deletion wifite/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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 ' +
Expand Down

0 comments on commit 5e20468

Please sign in to comment.