mirror of
https://github.com/bettercap/bettercap
synced 2025-08-22 06:23:18 -07:00
Added shakefile string for use in the UI
Added shakefile string for use in the UI
This commit is contained in:
parent
8acf81f61d
commit
8ccb7c7396
2 changed files with 11 additions and 0 deletions
|
@ -119,6 +119,7 @@ func (mod *WiFiModule) discoverHandshakes(radiotap *layers.RadioTap, dot11 *laye
|
|||
// make sure the info that we have key material for this AP
|
||||
// is persisted even after stations are pruned due to inactivity
|
||||
ap.WithKeyMaterial(true)
|
||||
ap.ShakeFile(shakesFileName)
|
||||
}
|
||||
// if we added ourselves as a client station but we didn't get any
|
||||
// PMKID, just remove it from the list of clients of this AP.
|
||||
|
|
|
@ -15,12 +15,14 @@ type AccessPoint struct {
|
|||
aliases *data.UnsortedKV
|
||||
clients map[string]*Station
|
||||
withKeyMaterial bool
|
||||
shakeFile string
|
||||
}
|
||||
|
||||
type apJSON struct {
|
||||
*Station
|
||||
Clients []*Station `json:"clients"`
|
||||
Handshake bool `json:"handshake"`
|
||||
shakeFile string `json:"shakefile"`
|
||||
}
|
||||
|
||||
func NewAccessPoint(essid, bssid string, frequency int, rssi int8, aliases *data.UnsortedKV) *AccessPoint {
|
||||
|
@ -39,6 +41,7 @@ func (ap *AccessPoint) MarshalJSON() ([]byte, error) {
|
|||
Station: ap.Station,
|
||||
Clients: make([]*Station, 0),
|
||||
Handshake: ap.withKeyMaterial,
|
||||
shakeFile: ap.shakeFile,
|
||||
}
|
||||
|
||||
for _, c := range ap.clients {
|
||||
|
@ -167,3 +170,10 @@ func (ap *AccessPoint) HasPMKID() bool {
|
|||
|
||||
return false
|
||||
}
|
||||
|
||||
func (ap *AccessPoint) ShakeFile(filename string) {
|
||||
ap.Lock()
|
||||
defer ap.Unlock()
|
||||
|
||||
ap.shakeFile = filename
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue