WPS max_failures is honored now.
Handshake attack copies .cap file to temp for consistency.
This commit is contained in:
@@ -65,20 +65,26 @@ class AttackWPA(Attack):
|
|||||||
# No cap files yet
|
# No cap files yet
|
||||||
continue
|
continue
|
||||||
cap_file = cap_files[0]
|
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
|
bssid = airodump_target.bssid
|
||||||
essid = None
|
essid = None
|
||||||
if airodump_target.essid_known:
|
if airodump_target.essid_known:
|
||||||
essid = airodump_target.essid
|
essid = airodump_target.essid
|
||||||
handshake = Handshake(cap_file, bssid=bssid, essid=essid)
|
handshake = Handshake(temp_file, bssid=bssid, essid=essid)
|
||||||
if handshake.has_handshake():
|
if handshake.has_handshake():
|
||||||
# We got a handshake
|
# We got a handshake
|
||||||
Color.pl('\n\n{+} {G}successfully captured handshake{W}')
|
Color.pl('\n\n{+} {G}successfully captured handshake{W}')
|
||||||
break
|
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
|
# Check status of deauth process
|
||||||
if deauth_proc and deauth_proc.poll() == None:
|
if deauth_proc and deauth_proc.poll() == None:
|
||||||
|
|||||||
@@ -197,6 +197,10 @@ class AttackWPS(Attack):
|
|||||||
Color.p('{R}%d/%d failures{W}) ' % (failures, \
|
Color.p('{R}%d/%d failures{W}) ' % (failures, \
|
||||||
Configuration.wps_fail_threshold))
|
Configuration.wps_fail_threshold))
|
||||||
|
|
||||||
|
if failures >= Configuration.wps_fail_threshold:
|
||||||
|
Color.pl('{R}failed: {O}too many failures{W}' % failures)
|
||||||
|
break
|
||||||
|
|
||||||
# Get output
|
# Get output
|
||||||
out = self.get_stdout()
|
out = self.get_stdout()
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user