mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 21:13:18 -07:00
misc: small fix or general refactoring i did not bother commenting
This commit is contained in:
parent
9e393e5bf4
commit
b7a9712e52
1 changed files with 2 additions and 5 deletions
|
@ -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())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue