mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 13:09:49 -07:00
misc: small fix or general refactoring i did not bother commenting
This commit is contained in:
parent
10727cff85
commit
252645dd4e
1 changed files with 9 additions and 6 deletions
|
@ -11,8 +11,11 @@ import (
|
||||||
)
|
)
|
||||||
|
|
||||||
var (
|
var (
|
||||||
openFlags = 1057
|
openFlags = 1057
|
||||||
wpaFlags = 1041
|
wpaFlags = 1041
|
||||||
|
durationID = uint16(0x013a)
|
||||||
|
capabilityInfo = uint16(0x0411)
|
||||||
|
listenInterval = uint16(3)
|
||||||
//1-54 Mbit
|
//1-54 Mbit
|
||||||
fakeApRates = []byte{0x82, 0x84, 0x8b, 0x96, 0x24, 0x30, 0x48, 0x6c, 0x03, 0x01}
|
fakeApRates = []byte{0x82, 0x84, 0x8b, 0x96, 0x24, 0x30, 0x48, 0x6c, 0x03, 0x01}
|
||||||
fakeApWpaRSN = []byte{
|
fakeApWpaRSN = []byte{
|
||||||
|
@ -112,7 +115,7 @@ func NewDot11Auth(sta net.HardwareAddr, apBSSID net.HardwareAddr, seq uint16) (e
|
||||||
Type: layers.Dot11TypeMgmtAuthentication,
|
Type: layers.Dot11TypeMgmtAuthentication,
|
||||||
SequenceNumber: seq,
|
SequenceNumber: seq,
|
||||||
FragmentNumber: 0,
|
FragmentNumber: 0,
|
||||||
DurationID: 0x013a,
|
DurationID: durationID,
|
||||||
},
|
},
|
||||||
&layers.Dot11MgmtAuthentication{
|
&layers.Dot11MgmtAuthentication{
|
||||||
Algorithm: layers.Dot11AlgorithmOpen,
|
Algorithm: layers.Dot11AlgorithmOpen,
|
||||||
|
@ -132,12 +135,12 @@ func NewDot11AssociationRequest(sta net.HardwareAddr, apBSSID net.HardwareAddr,
|
||||||
Type: layers.Dot11TypeMgmtAssociationReq,
|
Type: layers.Dot11TypeMgmtAssociationReq,
|
||||||
SequenceNumber: seq,
|
SequenceNumber: seq,
|
||||||
FragmentNumber: 0,
|
FragmentNumber: 0,
|
||||||
DurationID: 0x013a,
|
DurationID: durationID,
|
||||||
},
|
},
|
||||||
// as seen on wireshark ...
|
// as seen on wireshark ...
|
||||||
&layers.Dot11MgmtAssociationReq{
|
&layers.Dot11MgmtAssociationReq{
|
||||||
CapabilityInfo: 0x0411,
|
CapabilityInfo: capabilityInfo,
|
||||||
ListenInterval: 3,
|
ListenInterval: listenInterval,
|
||||||
},
|
},
|
||||||
Dot11Info(layers.Dot11InformationElementIDSSID, []byte(apESSID)),
|
Dot11Info(layers.Dot11InformationElementIDSSID, []byte(apESSID)),
|
||||||
Dot11Info(layers.Dot11InformationElementIDRates, assocRates),
|
Dot11Info(layers.Dot11InformationElementIDRates, assocRates),
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue