mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 02:36:57 -07:00
misc: small fix or general refactoring i did not bother commenting
This commit is contained in:
parent
e36ea214a1
commit
447aaede5b
2 changed files with 38 additions and 33 deletions
29
packets/dot11.go
Normal file
29
packets/dot11.go
Normal file
|
@ -0,0 +1,29 @@
|
|||
package packets
|
||||
|
||||
import (
|
||||
"net"
|
||||
|
||||
"github.com/google/gopacket/layers"
|
||||
)
|
||||
|
||||
func NewDot11Deauth(a1 net.HardwareAddr, a2 net.HardwareAddr, a3 net.HardwareAddr, t layers.Dot11Type, reason layers.Dot11Reason, seq uint16) (error, []byte) {
|
||||
var (
|
||||
deauth layers.Dot11MgmtDeauthentication
|
||||
dot11Layer layers.Dot11
|
||||
radioTapLayer layers.RadioTap
|
||||
)
|
||||
|
||||
deauth.Reason = reason
|
||||
|
||||
dot11Layer.Address1 = a1
|
||||
dot11Layer.Address2 = a2
|
||||
dot11Layer.Address3 = a3
|
||||
dot11Layer.Type = t
|
||||
dot11Layer.SequenceNumber = seq
|
||||
|
||||
return Serialize(
|
||||
&radioTapLayer,
|
||||
&dot11Layer,
|
||||
&deauth,
|
||||
)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue