Skip to content

Commit

Permalink
attack/pmkid: removed hashcat dependency for PMKID capture PR derv82#159
Browse files Browse the repository at this point in the history
  • Loading branch information
simonblack committed Dec 14, 2018
1 parent 74bf4d1 commit 04b818d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
1 change: 0 additions & 1 deletion wifite/attack/all.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,4 +156,3 @@ def user_wants_to_continue(cls, targets_remaining, attacks_remaining=0):
return False # Exit
else:
return True # Continue

17 changes: 10 additions & 7 deletions wifite/attack/pmkid.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,6 @@ def run(self):
from ..util.process import Process
# Check that we have all hashcat programs
dependencies = [
Hashcat.dependency_name,
HcxDumpTool.dependency_name,
HcxPcapTool.dependency_name
]
Expand All @@ -97,12 +96,17 @@ def run(self):
return False # No hash found.

# Crack it.
try:
self.success = self.crack_pmkid_file(pmkid_file)
except KeyboardInterrupt:
Color.pl('\n{!} {R}Failed to crack PMKID: {O}Cracking interrupted by user{W}')
if Process.exists(Hashcat.dependency_name):
try:
self.success = self.crack_pmkid_file(pmkid_file)
except KeyboardInterrupt:
Color.pl('\n{!} {R}Failed to crack PMKID: {O}Cracking interrupted by user{W}')
self.success = False
return True
else:
self.success = False
return False
Color.pl('\n {O}[{R}!{O}] Note: PMKID attacks are not possible because you do not have {C}%s{O}.{W}'
% Hashcat.dependency_name)

return True # Even if we don't crack it, capturing a PMKID is 'successful'

Expand Down Expand Up @@ -216,4 +220,3 @@ def save_pmkid(self, pmkid_hash):
pmkid_handle.write('\n')

return pmkid_file

0 comments on commit 04b818d

Please sign in to comment.