From 04b818de40e6fd14ea0828d01bc7b4752b2db412 Mon Sep 17 00:00:00 2001 From: Simon Black Date: Fri, 14 Dec 2018 03:03:53 -0500 Subject: [PATCH] attack/pmkid: removed hashcat dependency for PMKID capture PR #159 --- wifite/attack/all.py | 1 - wifite/attack/pmkid.py | 17 ++++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/wifite/attack/all.py b/wifite/attack/all.py index 220b8150a..4ad73ac68 100755 --- a/wifite/attack/all.py +++ b/wifite/attack/all.py @@ -156,4 +156,3 @@ def user_wants_to_continue(cls, targets_remaining, attacks_remaining=0): return False # Exit else: return True # Continue - diff --git a/wifite/attack/pmkid.py b/wifite/attack/pmkid.py index 197832072..7c8dbd939 100755 --- a/wifite/attack/pmkid.py +++ b/wifite/attack/pmkid.py @@ -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 ] @@ -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' @@ -216,4 +220,3 @@ def save_pmkid(self, pmkid_hash): pmkid_handle.write('\n') return pmkid_file -