mirror of
https://github.com/bettercap/bettercap
synced 2025-08-20 13:33:21 -07:00
fix: workaround for PCAP_SET_RFMON issue (fixes #819, https://github.com/the-tcpdump-group/libpcap/issues/1041, https://github.com/the-tcpdump-group/libpcap/issues/1033)
This commit is contained in:
parent
06623ddfb9
commit
b12ba7947b
4 changed files with 30 additions and 4 deletions
|
@ -21,7 +21,6 @@ import (
|
|||
"github.com/evilsocket/islazy/fs"
|
||||
"github.com/evilsocket/islazy/ops"
|
||||
"github.com/evilsocket/islazy/str"
|
||||
"github.com/evilsocket/islazy/tui"
|
||||
)
|
||||
|
||||
type WiFiModule struct {
|
||||
|
@ -581,9 +580,12 @@ func (mod *WiFiModule) Configure() error {
|
|||
// second fatal error, just bail
|
||||
return fmt.Errorf("error while activating handle: %s", err)
|
||||
} else {
|
||||
// first fatal error, try again without setting the interface in monitor mode
|
||||
mod.Warning("error while activating handle: %s, %s", err, tui.Bold("interface might already be monitoring. retrying!"))
|
||||
opts.Monitor = false
|
||||
// first fatal error, forcing monitor mode
|
||||
// https://github.com/bettercap/bettercap/issues/819
|
||||
opts.Monitor = false;
|
||||
if err := network.ForceMonitorMode(ifName); err != nil {
|
||||
return err
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue