new: added support for half WPA handshakes (https://hashcat.net/forum/thread-6745-post-36007.html)

This commit is contained in:
evilsocket 2019-08-17 22:33:26 -04:00
parent b57661a097
commit 9e9b984fec
No known key found for this signature in database
GPG key ID: 82E42E7F3B34C97E
2 changed files with 21 additions and 2 deletions

View file

@ -90,6 +90,25 @@ func (h *Handshake) Complete() bool {
return nChal > 0 && nResp > 0 && nConf > 0
}
func (h *Handshake) Half() bool {
h.Lock()
defer h.Unlock()
/*
* You can use every combination of the handshake to crack the net:
* M1/M2
* M2/M3
* M3/M4
* M1/M4 (if M4 snonce is not zero)
* We only have M1 (the challenge), M2 (the response) and M3 (the confirmation)
*/
nChal := len(h.Challenges)
nResp := len(h.Responses)
nConf := len(h.Confirmations)
return (nChal > 0 && nResp > 0) || (nResp > 0 && nConf > 0)
}
func (h *Handshake) HasPMKID() bool {
h.Lock()
defer h.Unlock()