diff --git a/py/AttackWPA.py b/py/AttackWPA.py index ef8f002..6234632 100644 --- a/py/AttackWPA.py +++ b/py/AttackWPA.py @@ -65,20 +65,26 @@ class AttackWPA(Attack): # No cap files yet continue cap_file = cap_files[0] - # TODO: Copy .cap file to temp for consistency - # Check for Handshake + # Copy .cap file to temp for consistency + temp_file = Configuration.temp('handshake.cap.bak') + copy(cap_file, temp_file) + + # Check cap file in temp for Handshake bssid = airodump_target.bssid essid = None if airodump_target.essid_known: essid = airodump_target.essid - handshake = Handshake(cap_file, bssid=bssid, essid=essid) + handshake = Handshake(temp_file, bssid=bssid, essid=essid) if handshake.has_handshake(): # We got a handshake Color.pl('\n\n{+} {G}successfully captured handshake{W}') break - # TODO: Delete copied .cap file in temp to save space + # There is no handshake + handshake = None + # Delete copied .cap file in temp to save space + os.remove(temp_file) # Check status of deauth process if deauth_proc and deauth_proc.poll() == None: diff --git a/py/AttackWPS.py b/py/AttackWPS.py index 09dad16..fa6c476 100644 --- a/py/AttackWPS.py +++ b/py/AttackWPS.py @@ -197,6 +197,10 @@ class AttackWPS(Attack): Color.p('{R}%d/%d failures{W}) ' % (failures, \ Configuration.wps_fail_threshold)) + if failures >= Configuration.wps_fail_threshold: + Color.pl('{R}failed: {O}too many failures{W}' % failures) + break + # Get output out = self.get_stdout()