Skip to content

Commit

Permalink
Use bully instead of reaver.
Browse files Browse the repository at this point in the history
Detailed WPS output.

TODO:
* Actually test that cracked PINs are detected & saved, pending #28
* Command-line options to specify max lockout/timeout/noassoc/failure
  • Loading branch information
derv82 committed May 18, 2017
1 parent c19332c commit c4773c6
Show file tree
Hide file tree
Showing 8 changed files with 671 additions and 412 deletions.
18 changes: 18 additions & 0 deletions Wifite.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,6 +105,15 @@ def run(self):
result = attack.run()
except Exception, e:
Color.pl("\n{!} {R}Error: {O}%s" % str(e))
if Configuration.verbose > 0 or True:
Color.pl('\n{!} {O}Full stack trace below')
from traceback import format_exc
Color.p('\n{!} ')
err = format_exc().strip()
err = err.replace('\n', '\n{!} {C} ')
err = err.replace(' File', '{W}File')
err = err.replace(' Exception: ', '{R}Exception: {O}')
Color.pl(err)
except KeyboardInterrupt:
Color.pl('\n{!} {O}interrupted{W}\n')
if not self.user_wants_to_continue(targets_remaining, 1):
Expand All @@ -128,6 +137,15 @@ def run(self):
attack.run()
except Exception, e:
Color.pl("\n{!} {R}Error: {O}%s" % str(e))
if Configuration.verbose > 0 or True:
Color.pl('\n{!} {O}Full stack trace below')
from traceback import format_exc
Color.p('\n{!} ')
err = format_exc().strip()
err = err.replace('\n', '\n{!} {C} ')
err = err.replace(' File', '{W}File')
err = err.replace(' Exception: ', '{R}Exception: {O}')
Color.pl(err)
except KeyboardInterrupt:
Color.pl('\n{!} {O}interrupted{W}\n')
if not self.user_wants_to_continue(targets_remaining):
Expand Down
14 changes: 7 additions & 7 deletions py/Airodump.py
Original file line number Diff line number Diff line change
Expand Up @@ -125,7 +125,7 @@ def delete_airodump_temp_files(self):
if fil.endswith('.xor'):
os.remove(fil)

def get_targets(self):
def get_targets(self, apply_filter=True):
''' Parses airodump's CSV file, returns list of Targets '''
# Find the .CSV file
csv_filename = None
Expand All @@ -145,8 +145,9 @@ def get_targets(self):
capfile = csv_filename[:-3] + 'cap'
Wash.check_for_wps_and_update_targets(capfile, targets)

# Filter targets based on encryption
targets = Airodump.filter_targets(targets, skip_wash=self.skip_wash)
if apply_filter:
# Filter targets based on encryption & WPS capability
targets = Airodump.filter_targets(targets, skip_wash=self.skip_wash)

# Sort by power
targets.sort(key=lambda x: x.power, reverse=True)
Expand Down Expand Up @@ -245,11 +246,10 @@ def filter_targets(targets, skip_wash=False):
while i < len(result):
if bssid and result[i].bssid.lower() != bssid.lower():
result.pop(i)
continue
if essid and result[i].essid.lower() != essid.lower():
elif essid and result[i].essid and result[i].essid.lower() != essid.lower():
result.pop(i)
continue
i += 1
else:
i += 1
return result

def deauth_hidden_targets(self):
Expand Down
5 changes: 1 addition & 4 deletions py/Attack.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ def wait_for_target(self, airodump):
Waits for target to appear in airodump
'''
start_time = time.time()
targets = airodump.get_targets()
targets = airodump.get_targets(apply_filter=False)
while len(targets) == 0:
# Wait for target to appear in airodump.
if int(time.time() - start_time) > Attack.target_wait:
Expand All @@ -45,6 +45,3 @@ def wait_for_target(self, airodump):

return airodump_target


if __name__ == '__main__':
pass
Loading

0 comments on commit c4773c6

Please sign in to comment.