mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 04:59:25 -07:00
misc: small fix or general refactoring i did not bother commenting
This commit is contained in:
parent
81e412e870
commit
229704667f
1 changed files with 10 additions and 0 deletions
|
@ -299,11 +299,21 @@ func (w *WiFiRecon) startDeauth() error {
|
||||||
if w.isClientSelected() {
|
if w.isClientSelected() {
|
||||||
// deauth a specific client
|
// deauth a specific client
|
||||||
w.sendDeauthPacket(w.accessPoint, w.client)
|
w.sendDeauthPacket(w.accessPoint, w.client)
|
||||||
|
log.Info("Deauth packets sent for client station %s.", w.client.String())
|
||||||
} else {
|
} else {
|
||||||
|
n := len(w.wifi.Stations)
|
||||||
// deauth all AP's clients
|
// deauth all AP's clients
|
||||||
for _, station := range w.wifi.Stations {
|
for _, station := range w.wifi.Stations {
|
||||||
w.sendDeauthPacket(w.accessPoint, station.HW)
|
w.sendDeauthPacket(w.accessPoint, station.HW)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if n == 0 {
|
||||||
|
log.Warning("No associated clients detected yet, deauth packets not sent.")
|
||||||
|
} else if n == 1 {
|
||||||
|
log.Info("Deauth packets sent for 1 client station.")
|
||||||
|
} else {
|
||||||
|
log.Info("Deauth packets sent for %d client stations.", n)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue