mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 02:36:57 -07:00
new: new wifi.clear command to clear access points collected by wifi.recon
This commit is contained in:
parent
223af913b8
commit
dbd4590654
2 changed files with 10 additions and 2 deletions
|
@ -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 {
|
||||
|
|
|
@ -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 {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue