misc: small fix or general refactoring i did not bother commenting

This commit is contained in:
evilsocket 2018-08-14 13:46:13 +02:00
commit b7a9712e52
No known key found for this signature in database
GPG key ID: 1564D7F30393A456

View file

@ -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())