mirror of
https://github.com/bettercap/bettercap
synced 2025-07-07 21:42:06 -07:00
balls
This commit is contained in:
parent
37e5f6a6d0
commit
4f1c5012f4
1 changed files with 3 additions and 1 deletions
|
@ -10,6 +10,8 @@ import (
|
||||||
"github.com/evilsocket/bettercap-ng/core"
|
"github.com/evilsocket/bettercap-ng/core"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
const MonitorModeAddress = "0.0.0.0"
|
||||||
|
|
||||||
func FindInterface(name string) (*Endpoint, error) {
|
func FindInterface(name string) (*Endpoint, error) {
|
||||||
ifaces, err := net.Interfaces()
|
ifaces, err := net.Interfaces()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
@ -29,7 +31,7 @@ func FindInterface(name string) (*Endpoint, error) {
|
||||||
|
|
||||||
// interface is in monitor mode (or it's just down and the user is dumb)
|
// interface is in monitor mode (or it's just down and the user is dumb)
|
||||||
if len(addrs) == 0 {
|
if len(addrs) == 0 {
|
||||||
e = NewEndpointNoResolve("0.0.0.0", mac, iface.Name, 0)
|
e = NewEndpointNoResolve(MonitorModeAddress, mac, iface.Name, 0)
|
||||||
} else {
|
} else {
|
||||||
// For every address of the interface.
|
// For every address of the interface.
|
||||||
for _, addr := range addrs {
|
for _, addr := range addrs {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue