From b7a9712e52588527e78dc083c7344304ca230a57 Mon Sep 17 00:00:00 2001 From: evilsocket Date: Tue, 14 Aug 2018 13:46:13 +0200 Subject: [PATCH] misc: small fix or general refactoring i did not bother commenting --- modules/wifi_deauth.go | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/modules/wifi_deauth.go b/modules/wifi_deauth.go index c3394ac6..c3ce4990 100644 --- a/modules/wifi_deauth.go +++ b/modules/wifi_deauth.go @@ -56,12 +56,9 @@ func (w *WiFiModule) startDeauth(to net.HardwareAddr) error { isBcast := network.IsBroadcastMac(to) found := isBcast for _, ap := range w.Session.WiFi.List() { + isAP := bytes.Equal(ap.HW, to) for _, client := range ap.Clients() { - doDeauth := isBcast || - bytes.Equal(ap.HW, to) || - bytes.Equal(client.HW, to) - - if doDeauth { + if isBcast || isAP || bytes.Equal(client.HW, to) { found = true if w.Running() { log.Info("Deauthing client %s from AP %s ...", client.String(), ap.ESSID())