Fixing logic with switches, updating README.
Some switches are not compatible (--wps-only + --pmkid). Wifite detects & stops if options are incompatible. README was oudated (said no PIN attack), updated some URLs.
This commit is contained in:
@@ -58,21 +58,27 @@ class AttackAll(object):
|
||||
# WPA can have multiple attack vectors:
|
||||
|
||||
# WPS
|
||||
if target.wps != False and AttackWPS.can_attack_wps():
|
||||
if Configuration.wps_pixie:
|
||||
attacks.append(AttackWPS(target, pixie_dust=True))
|
||||
if Configuration.wps_pin:
|
||||
attacks.append(AttackWPS(target, pixie_dust=False))
|
||||
if not Configuration.use_pmkid_only:
|
||||
if target.wps != False and AttackWPS.can_attack_wps():
|
||||
# Pixie-Dust
|
||||
if Configuration.wps_pixie:
|
||||
attacks.append(AttackWPS(target, pixie_dust=True))
|
||||
|
||||
# PMKID
|
||||
attacks.append(AttackPMKID(target))
|
||||
# PIN attack
|
||||
if Configuration.wps_pin:
|
||||
attacks.append(AttackWPS(target, pixie_dust=False))
|
||||
|
||||
# Handshake capture
|
||||
attacks.append(AttackWPA(target))
|
||||
if not Configuration.wps_only:
|
||||
# PMKID
|
||||
attacks.append(AttackPMKID(target))
|
||||
|
||||
# Handshake capture
|
||||
if not Configuration.use_pmkid_only:
|
||||
attacks.append(AttackWPA(target))
|
||||
|
||||
if len(attacks) == 0:
|
||||
Color.pl('{!} {R}Error: {O}Unable to attack: encryption not WEP or WPA')
|
||||
return
|
||||
Color.pl('{!} {R}Error: {O}Unable to attack: no attacks available')
|
||||
return True # Keep attacking other targets (skip)
|
||||
|
||||
while len(attacks) > 0:
|
||||
attack = attacks.pop(0)
|
||||
|
||||
@@ -62,12 +62,6 @@ class AttackPMKID(Attack):
|
||||
Returns:
|
||||
True if handshake is captured. False otherwise.
|
||||
'''
|
||||
# Skip if user only wants to attack WPS targets
|
||||
if Configuration.wps_only and self.target.wps == False:
|
||||
Color.pl('\r{!} {O}Skipping PMKID attack on {R}%s{O} because {R}--wps-only{O} is set{W}' % self.target.essid)
|
||||
self.success = False
|
||||
return False
|
||||
|
||||
from ..util.process import Process
|
||||
# Check that we have all hashcat programs
|
||||
dependencies = [
|
||||
@@ -174,7 +168,6 @@ class AttackPMKID(Attack):
|
||||
Color.clear_entire_line()
|
||||
Color.pattack('PMKID', self.target, '{R}CRACK',
|
||||
'{R}Failed {O}Passphrase not found in dictionary.\n')
|
||||
Color.pl('')
|
||||
return False
|
||||
else:
|
||||
# Successfully cracked.
|
||||
|
||||
Reference in New Issue
Block a user