mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 13:09:49 -07:00
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:
parent
54a8888b13
commit
3e7aa68184
2 changed files with 7 additions and 0 deletions
|
@ -5,6 +5,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"net"
|
"net"
|
||||||
"sort"
|
"sort"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/bettercap/bettercap/network"
|
"github.com/bettercap/bettercap/network"
|
||||||
"github.com/bettercap/bettercap/packets"
|
"github.com/bettercap/bettercap/packets"
|
||||||
|
@ -115,6 +116,9 @@ func (mod *WiFiModule) startAssoc(to net.HardwareAddr) error {
|
||||||
|
|
||||||
mod.onChannel(ap.Channel(), func() {
|
mod.onChannel(ap.Channel(), func() {
|
||||||
mod.sendAssocPacket(ap)
|
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)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,6 +141,9 @@ func (mod *WiFiModule) startDeauth(to net.HardwareAddr) error {
|
||||||
|
|
||||||
mod.onChannel(ap.Channel(), func() {
|
mod.onChannel(ap.Channel(), func() {
|
||||||
mod.sendDeauthPacket(ap.HW, client.HW)
|
mod.sendDeauthPacket(ap.HW, client.HW)
|
||||||
|
// let's stick to this channel for a while in order
|
||||||
|
// to capture key material from the AP
|
||||||
|
time.Sleep(mod.hopPeriod * 2)
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue