fix: better broadcast deauth logging message

This commit is contained in:
evilsocket 2018-07-29 16:02:25 +02:00
parent 024f14e3b6
commit c26775a112
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
2 changed files with 7 additions and 8 deletions

View file

@ -54,17 +54,16 @@ func (w *WiFiModule) startDeauth(to net.HardwareAddr) error {
// 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
}
log.Info("Broadcast deauth client %s from AP %s ...", c.String(), ap.ESSID())
w.sendDeauthPacket(ap.HW, c.HW)
}
})