mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 02:36:57 -07:00
fix: wifi.AccessPoint and wifi.Station now export the Channel field via JSON
This commit is contained in:
parent
4ae1ffd171
commit
78c341c2b3
5 changed files with 13 additions and 16 deletions
|
@ -121,7 +121,7 @@ func (mod *WiFiModule) startDeauth(to net.HardwareAddr) error {
|
|||
// deauth packet, let's sort by channel so we do the minimum
|
||||
// amount of hops possible
|
||||
sort.Slice(toDeauth, func(i, j int) bool {
|
||||
return toDeauth[i].Ap.Channel() < toDeauth[j].Ap.Channel()
|
||||
return toDeauth[i].Ap.Channel < toDeauth[j].Ap.Channel
|
||||
})
|
||||
|
||||
// send the deauth frames
|
||||
|
@ -137,9 +137,9 @@ func (mod *WiFiModule) startDeauth(to net.HardwareAddr) error {
|
|||
if ap.IsOpen() && !mod.doDeauthOpen() {
|
||||
mod.Debug("skipping deauth for open network %s (wifi.deauth.open is false)", ap.ESSID())
|
||||
} else {
|
||||
logger("deauthing client %s from AP %s (channel:%d encryption:%s)", client.String(), ap.ESSID(), ap.Channel(), ap.Encryption)
|
||||
logger("deauthing client %s from AP %s (channel:%d encryption:%s)", client.String(), ap.ESSID(), ap.Channel, ap.Encryption)
|
||||
|
||||
mod.onChannel(ap.Channel(), func() {
|
||||
mod.onChannel(ap.Channel, func() {
|
||||
mod.sendDeauthPacket(ap.HW, client.HW)
|
||||
})
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue