Skip to content

Commit 4e4980e

Browse files
committed
handshake: check if any tools detects a handshake, not only tshark
1 parent 377948d commit 4e4980e

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

wifite/model/handshake.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,12 @@ def has_handshake(self):
6565
if not self.bssid or not self.essid:
6666
self.divine_bssid_and_essid()
6767

68-
return len(self.tshark_handshakes()) > 0
68+
# Check if ANY validator detects a handshake
69+
# Tshark is strict (requires all 4 messages), but cowpatty/aircrack
70+
# can work with just messages 2&3, which is sufficient for cracking
71+
return (len(self.tshark_handshakes()) > 0 or
72+
len(self.cowpatty_handshakes()) > 0 or
73+
len(self.aircrack_handshakes()) > 0)
6974

7075
def tshark_handshakes(self):
7176
"""Returns list[tuple] of BSSID & ESSID pairs (ESSIDs are always `None`)."""

0 commit comments

Comments
 (0)