refact: using global wifi objects in order to expose them from the api.rest module

This commit is contained in:
evilsocket 2018-02-17 05:44:25 +01:00
commit e895dc6ab2
5 changed files with 29 additions and 46 deletions

28
network/wifi_station.go Normal file
View 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
}