Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged tested pull requests and added manufacturer/oui functionality #186

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
Added --no-pmkid option PR #161
simonblack committed Dec 14, 2018
commit 5c5d8c8e1bdc0a99ac69281a94973a2847b3a464
5 changes: 5 additions & 0 deletions wifite/args.py
Original file line number Diff line number Diff line change
@@ -448,6 +448,11 @@ def _add_pmkid_args(self, pmkid):
dest='use_pmkid_only',
help=Color.s('{O}Only{W} use {C}PMKID capture{W}, avoids other WPS & ' +
'WPA attacks (default: {G}off{W})'))
pmkid.add_argument('--no-pmkid',
action='store_true',
dest='dont_use_pmkid',
help=Color.s('{O}Don\'t{W} use {C}PMKID capture{W} ' +
'(default: {G}off{W})'))
# Alias
pmkid.add_argument('-pmkid', help=argparse.SUPPRESS, action='store_true', dest='use_pmkid_only')

6 changes: 6 additions & 0 deletions wifite/attack/pmkid.py
Original file line number Diff line number Diff line change
@@ -62,6 +62,12 @@ def run(self):
Returns:
True if handshake is captured. False otherwise.
'''

# Skip if user doesn't want to run PMKID attack
if Configuration.dont_use_pmkid:
self.success = False
return False

from ..util.process import Process
# Check that we have all hashcat programs
dependencies = [
8 changes: 8 additions & 0 deletions wifite/config.py
Original file line number Diff line number Diff line change
@@ -85,6 +85,7 @@ def initialize(cls, load_interface=True):
# PMKID variables
cls.use_pmkid_only = False # Only use PMKID Capture+Crack attack
cls.pmkid_timeout = 30 # Time to wait for PMKID capture
cls.dont_use_pmkid = False # Don't use PMKID attack

# Default dictionary for cracking
cls.cracked_file = 'cracked.txt'
@@ -181,6 +182,9 @@ def validate(cls):
if cls.use_pmkid_only and cls.wps_only:
Color.pl('{!} {R}Bad Configuration:{O} --pmkid and --wps-only are not compatible')
raise RuntimeError('Unable to attack networks: --pmkid and --wps-only are not compatible together')
if cls.use_pmkid_only and cls.dont_use_pmkid:
Color.pl('{!} {R}Bad Configuration:{O} --pmkid and --no-pmkid are not compatible')
raise RuntimeError('Unable to attack networks: --pmkid and --no-pmkid are not compatible together')


@classmethod
@@ -419,6 +423,10 @@ def parse_pmkid_args(cls, args):
cls.pmkid_timeout = args.pmkid_timeout
Color.pl('{+} {C}option:{W} will wait {G}%d seconds{W} during {C}PMKID{W} capture' % args.pmkid_timeout)

if args.dont_use_pmkid:
cls.dont_use_pmkid = True
Color.pl('{+} {C}option:{W} will NOT use {C}PMKID{W} attack on WPA networks')

@classmethod
def parse_encryption(cls):
'''Adjusts encryption filter (WEP and/or WPA and/or WPS)'''