mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 05:23:19 -07:00
fix: collect additional frames for stations with key material (ref #810)
This commit is contained in:
parent
c68c88030d
commit
cea53b969e
3 changed files with 73 additions and 1 deletions
|
@ -79,6 +79,12 @@ func (h *Handshake) AddFrame(n int, pkt gopacket.Packet) {
|
|||
h.unsaved = append(h.unsaved, pkt)
|
||||
}
|
||||
|
||||
func (h *Handshake) AddExtra(pkt gopacket.Packet) {
|
||||
h.Lock()
|
||||
defer h.Unlock()
|
||||
h.unsaved = append(h.unsaved, pkt)
|
||||
}
|
||||
|
||||
func (h *Handshake) Complete() bool {
|
||||
h.RLock()
|
||||
defer h.RUnlock()
|
||||
|
@ -115,6 +121,10 @@ func (h *Handshake) HasPMKID() bool {
|
|||
return h.hasPMKID
|
||||
}
|
||||
|
||||
func (h *Handshake) Any() bool {
|
||||
return h.HasPMKID() || h.Half() || h.Complete()
|
||||
}
|
||||
|
||||
func (h *Handshake) NumUnsaved() int {
|
||||
h.RLock()
|
||||
defer h.RUnlock()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue