mirror of
https://github.com/bettercap/bettercap
synced 2025-08-13 18:26:57 -07:00
misc: small fix or general refactoring i did not bother commenting
This commit is contained in:
parent
1d55083f75
commit
ae223d7110
2 changed files with 8 additions and 5 deletions
|
@ -130,12 +130,15 @@ func (w *WiFiModule) startDeauth(to net.HardwareAddr) error {
|
|||
client := deauth.Client
|
||||
ap := deauth.Ap
|
||||
if w.Running() {
|
||||
logger := log.Info
|
||||
if w.isDeauthSilent() {
|
||||
logger = log.Debug
|
||||
}
|
||||
|
||||
if ap.IsOpen() && !w.doDeauthOpen() {
|
||||
log.Debug("skipping deauth for open network %s", ap.ESSID())
|
||||
logger("skipping deauth for open network %s (wifi.deauth.open is false)", ap.ESSID())
|
||||
} else {
|
||||
if !w.isDeauthSilent() {
|
||||
log.Info("deauthing client %s from AP %s (channel %d)", client.String(), ap.ESSID(), ap.Channel())
|
||||
}
|
||||
logger("deauthing client %s from AP %s (channel:%d encryption:%s)", client.String(), ap.ESSID(), ap.Channel(), ap.Encryption)
|
||||
|
||||
w.onChannel(ap.Channel(), func() {
|
||||
w.sendDeauthPacket(ap.HW, client.HW)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue