Merge branch 'master' into wifi.flood

This commit is contained in:
evilsocket 2018-03-13 15:13:37 +01:00
commit d6b9aa7b7f
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
24 changed files with 646 additions and 335 deletions

View file

@ -6,6 +6,7 @@ import (
"time"
"github.com/bettercap/bettercap/log"
"github.com/bettercap/bettercap/network"
"github.com/bettercap/bettercap/packets"
)
@ -62,7 +63,7 @@ func (w *WiFiModule) startDeauth(to net.HardwareAddr) error {
if ap, found := w.Session.WiFi.Get(bssid); found == true {
clients := ap.Clients()
log.Info("Deauthing %d clients from AP %s ...", len(clients), ap.ESSID())
w.onChannel(mhz2chan(ap.Frequency), func() {
w.onChannel(network.Dot11Freq2Chan(ap.Frequency), func() {
for _, c := range clients {
if w.Running() == false {
break
@ -81,7 +82,7 @@ func (w *WiFiModule) startDeauth(to net.HardwareAddr) error {
break
} else if c, found := ap.Get(bssid); found == true {
log.Info("Deauthing client %s from AP %s ...", c.HwAddress, ap.ESSID())
w.onChannel(mhz2chan(ap.Frequency), func() {
w.onChannel(network.Dot11Freq2Chan(ap.Frequency), func() {
w.sendDeauthPacket(ap.HW, c.HW)
})
return nil