mirror of
https://github.com/bettercap/bettercap
synced 2025-07-16 10:03:39 -07:00
fix: added handshake information for wifi aps in api.rest
This commit is contained in:
parent
8317aded14
commit
9c171735da
1 changed files with 5 additions and 3 deletions
|
@ -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 {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue