mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 02:36:57 -07:00
refact: using global wifi objects in order to expose them from the api.rest module
This commit is contained in:
parent
9390a580fd
commit
e895dc6ab2
5 changed files with 29 additions and 46 deletions
28
network/wifi_station.go
Normal file
28
network/wifi_station.go
Normal file
|
@ -0,0 +1,28 @@
|
|||
package network
|
||||
|
||||
type WiFiStation struct {
|
||||
*Endpoint
|
||||
IsAP bool
|
||||
Channel int
|
||||
RSSI int8
|
||||
Sent uint64
|
||||
Received uint64
|
||||
Encryption string
|
||||
}
|
||||
|
||||
func NewWiFiStation(essid, bssid string, isAp bool, channel int, rssi int8) *WiFiStation {
|
||||
return &WiFiStation{
|
||||
Endpoint: NewEndpointNoResolve(MonitorModeAddress, bssid, essid, 0),
|
||||
IsAP: isAp,
|
||||
Channel: channel,
|
||||
RSSI: rssi,
|
||||
}
|
||||
}
|
||||
|
||||
func (s WiFiStation) BSSID() string {
|
||||
return s.HwAddress
|
||||
}
|
||||
|
||||
func (s *WiFiStation) ESSID() string {
|
||||
return s.Hostname
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue