new: new wifi.deauth.silent setting

This commit is contained in:
evilsocket 2019-01-19 17:51:20 +01:00
commit b2cd841ce8
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
2 changed files with 18 additions and 1 deletions

View file

@ -50,6 +50,15 @@ func (w *WiFiModule) skipDeauth(to net.HardwareAddr) bool {
return false
}
func (w *WiFiModule) isDeauthSilent() bool {
if err, is := w.BoolParam("wifi.deauth.silent"); err != nil {
log.Warning("%v", err)
} else {
w.deauthSilent = is
}
return w.deauthSilent
}
func (w *WiFiModule) startDeauth(to net.HardwareAddr) error {
// parse skip list
if err, deauthSkip := w.StringParam("wifi.deauth.skip"); err != nil {
@ -112,7 +121,9 @@ func (w *WiFiModule) startDeauth(to net.HardwareAddr) error {
client := deauth.Client
ap := deauth.Ap
if w.Running() {
log.Info("deauthing client %s from AP %s (channel %d)", client.String(), ap.ESSID(), ap.Channel())
if !w.isDeauthSilent() {
log.Info("deauthing client %s from AP %s (channel %d)", client.String(), ap.ESSID(), ap.Channel())
}
w.onChannel(ap.Channel(), func() {
w.sendDeauthPacket(ap.HW, client.HW)
})