new: new wifi.ap module

This commit is contained in:
evilsocket 2018-03-19 14:36:40 +01:00
commit 77f8e070bc
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
7 changed files with 518 additions and 451 deletions

View file

@ -27,6 +27,7 @@ func (w *WiFiModule) channelHopper() {
defer w.reads.Done()
log.Info("Channel hopper started.")
for w.Running() == true {
delay := w.hopPeriod
// if we have both 2.4 and 5ghz capabilities, we have
@ -45,6 +46,8 @@ func (w *WiFiModule) channelHopper() {
channel = w.stickChan
}
log.Debug("Hopping on channel %d", channel)
if err := network.SetInterfaceChannel(w.Session.Interface.Name(), channel); err != nil {
log.Warning("Error while hopping to channel %d: %s", channel, err)
}