new: new wifi.clear command to clear access points collected by wifi.recon

This commit is contained in:
evilsocket 2019-02-19 11:17:50 +01:00
commit dbd4590654
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
2 changed files with 10 additions and 2 deletions

View file

@ -87,6 +87,13 @@ func NewWiFiModule(s *session.Session) *WiFiModule {
return mod.Stop()
}))
mod.AddHandler(session.NewModuleHandler("wifi.clear", "",
"Clear all access points collected by the WiFi discovery module.",
func(args []string) error {
mod.Session.WiFi.Clear()
return nil
}))
mod.AddHandler(session.NewModuleHandler("wifi.recon MAC", "wifi.recon ((?:[0-9A-Fa-f]{2}[:-]){5}(?:[0-9A-Fa-f]{2}))",
"Set 802.11 base station address to filter for.",
func(args []string) error {

View file

@ -179,9 +179,10 @@ func (w *WiFi) GetClient(mac string) (*Station, bool) {
return nil, false
}
func (w *WiFi) Clear() error {
func (w *WiFi) Clear() {
w.Lock()
defer w.Unlock()
w.aps = make(map[string]*AccessPoint)
return nil
}
func (w *WiFi) NumHandshakes() int {