mirror of
https://github.com/bettercap/bettercap.git
synced 2024-11-08 06:30:13 -08:00
19 lines
389 B
Go
19 lines
389 B
Go
//go:build !darwin
|
|
|
|
package wifi
|
|
|
|
import (
|
|
"time"
|
|
)
|
|
|
|
func (mod *WiFiModule) injectPacket(data []byte) {
|
|
if err := mod.handle.WritePacketData(data); err != nil {
|
|
mod.Error("could not inject WiFi packet: %s", err)
|
|
mod.Session.Queue.TrackError()
|
|
} else {
|
|
mod.Session.Queue.TrackSent(uint64(len(data)))
|
|
}
|
|
// let the network card breath a little
|
|
time.Sleep(10 * time.Millisecond)
|
|
}
|