mirror of
https://github.com/bettercap/bettercap
synced 2025-08-14 02:36:57 -07:00
fix: start pcap handle for wifi.deauth if wifi.recon module is not running already
This commit is contained in:
parent
626c274e5d
commit
25f6380c01
1 changed files with 9 additions and 0 deletions
|
@ -286,6 +286,15 @@ func (w *WiFiRecon) sendDeauthPacket(ap net.HardwareAddr, client net.HardwareAdd
|
|||
}
|
||||
|
||||
func (w *WiFiRecon) startDeauth() error {
|
||||
// if not already running, temporarily enable the pcap handle
|
||||
// for packet injection
|
||||
if w.Running() == false {
|
||||
if err := w.Configure(); err != nil {
|
||||
return err
|
||||
}
|
||||
defer w.handle.Close()
|
||||
}
|
||||
|
||||
if w.isApSelected() {
|
||||
if w.isClientSelected() {
|
||||
// deauth a specific client
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue