mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 05:23:19 -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)
|
isBcast := network.IsBroadcastMac(to)
|
||||||
found := isBcast
|
found := isBcast
|
||||||
for _, ap := range w.Session.WiFi.List() {
|
for _, ap := range w.Session.WiFi.List() {
|
||||||
|
isAP := bytes.Equal(ap.HW, to)
|
||||||
for _, client := range ap.Clients() {
|
for _, client := range ap.Clients() {
|
||||||
doDeauth := isBcast ||
|
if isBcast || isAP || bytes.Equal(client.HW, to) {
|
||||||
bytes.Equal(ap.HW, to) ||
|
|
||||||
bytes.Equal(client.HW, to)
|
|
||||||
|
|
||||||
if doDeauth {
|
|
||||||
found = true
|
found = true
|
||||||
if w.Running() {
|
if w.Running() {
|
||||||
log.Info("Deauthing client %s from AP %s ...", client.String(), ap.ESSID())
|
log.Info("Deauthing client %s from AP %s ...", client.String(), ap.ESSID())
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue