fix: added handshake information for wifi aps in api.rest

This commit is contained in:
evilsocket 2019-03-16 17:24:37 +01:00
parent 8317aded14
commit 9c171735da
No known key found for this signature in database
GPG key ID: 1564D7F30393A456

View file

@ -16,7 +16,8 @@ type AccessPoint struct {
type apJSON struct { type apJSON struct {
*Station *Station
Clients []*Station `json:"clients"` Clients []*Station `json:"clients"`
Handshake bool `json:"handshake"`
} }
func NewAccessPoint(essid, bssid string, frequency int, rssi int8) *AccessPoint { func NewAccessPoint(essid, bssid string, frequency int, rssi int8) *AccessPoint {
@ -31,8 +32,9 @@ func (ap *AccessPoint) MarshalJSON() ([]byte, error) {
defer ap.Unlock() defer ap.Unlock()
doc := apJSON{ doc := apJSON{
Station: ap.Station, Station: ap.Station,
Clients: make([]*Station, 0), Clients: make([]*Station, 0),
Handshake: ap.withKeyMaterial,
} }
for _, c := range ap.clients { for _, c := range ap.clients {