misc: both wifi.assoc and wifi.deauth will wait for wifi.hop.period*2 on the channel in order to improve key material capturing

This commit is contained in:
evilsocket 2019-02-15 12:48:32 +01:00
commit 3e7aa68184
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
2 changed files with 7 additions and 0 deletions

View file

@ -5,6 +5,7 @@ import (
"fmt"
"net"
"sort"
"time"
"github.com/bettercap/bettercap/network"
"github.com/bettercap/bettercap/packets"
@ -115,6 +116,9 @@ func (mod *WiFiModule) startAssoc(to net.HardwareAddr) error {
mod.onChannel(ap.Channel(), func() {
mod.sendAssocPacket(ap)
// let's stick to this channel for a while in order
// to capture key material from the AP
time.Sleep(mod.hopPeriod * 2)
})
}
}