mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 13:33:21 -07:00
fix: one beacon packet per handshake is saved in order to have both the ESSID and BSSID
This commit is contained in:
parent
a90f63b643
commit
1120f98be1
4 changed files with 28 additions and 4 deletions
|
@ -8,6 +8,7 @@ import (
|
|||
type Handshake struct {
|
||||
sync.Mutex
|
||||
|
||||
Beacon gopacket.Packet
|
||||
Challenges []gopacket.Packet
|
||||
Responses []gopacket.Packet
|
||||
Confirmations []gopacket.Packet
|
||||
|
@ -23,6 +24,16 @@ func NewHandshake() *Handshake {
|
|||
}
|
||||
}
|
||||
|
||||
func (h *Handshake) SetBeacon(pkt gopacket.Packet) {
|
||||
h.Lock()
|
||||
defer h.Unlock()
|
||||
|
||||
if h.Beacon == nil {
|
||||
h.Beacon = pkt
|
||||
h.unsaved = append(h.unsaved, pkt)
|
||||
}
|
||||
}
|
||||
|
||||
func (h *Handshake) AddFrame(n int, pkt gopacket.Packet) {
|
||||
h.Lock()
|
||||
defer h.Unlock()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue