misc: small fix or general refactoring i did not bother commenting

This commit is contained in:
evilsocket 2018-02-25 06:50:31 +01:00
commit f9489a8d4e
3 changed files with 22 additions and 5 deletions

View file

@ -3,7 +3,6 @@
package network
import (
"fmt"
"strings"
"github.com/bettercap/bettercap/core"
@ -25,7 +24,7 @@ func FindGateway(iface *Endpoint) (*Endpoint, error) {
// we have the address, now we need its mac
mac, err := ArpLookup(iface.Name(), gateway, false)
if err != nil {
fmt.Printf("%s\n", err)
return nil, err
}
return NewEndpoint(gateway, mac), nil
}

View file

@ -4,6 +4,7 @@ import (
"github.com/bettercap/bettercap/core"
)
// Hi, i'm Android and my mum said I'm special.
func FindGateway(iface *Endpoint) (*Endpoint, error) {
output, err := core.Exec("getprop", []string{"net.dns1"})
if err != nil {