merge upstream

This commit is contained in:
Your Name 2020-12-11 17:23:11 +08:00
commit 820c7479d7
3 changed files with 6 additions and 4 deletions

View file

@ -216,8 +216,8 @@ func NewWiFiModule(s *session.Session) *WiFiModule {
return fmt.Errorf("%d is not a valid channel number",channel)
}
packet_count,_:=strconv.Atoi( args[2])
if packet_count>65535{
packet_count=65535
if packet_count>1000{
packet_count=1000
}
return mod.startCSA(bssid,int8(channel),packet_count)
})

View file

@ -28,7 +28,9 @@ func (mod *WiFiModule) sendBeaconWithCSA_Packet(ap *network.AccessPoint, to_chan
mod.Error("could not create beacon packet: %s", err)
continue
} else {
mod.onChannel(ap.Channel, func() {
mod.injectPacket(pkt)
})
}
}
}

View file

@ -19,7 +19,7 @@ func (mod *WiFiModule) injectPacket(data []byte) {
mod.Session.Queue.TrackSent(uint64(len(data)))
}
// let the network card breath a little
time.Sleep(10 * time.Millisecond)
time.Sleep(1 * time.Millisecond)
}
func (mod *WiFiModule) sendDeauthPacket(ap net.HardwareAddr, client net.HardwareAddr) {