mirror of
https://github.com/bettercap/bettercap
synced 2025-08-19 21:13:18 -07:00
refact: i will just comment with 'Thank you Microsoft <3'
This commit is contained in:
parent
52d7ccf3cd
commit
8a5916c685
4 changed files with 53 additions and 39 deletions
|
@ -1,6 +1,9 @@
|
|||
package net
|
||||
|
||||
import "regexp"
|
||||
import (
|
||||
"net"
|
||||
"regexp"
|
||||
)
|
||||
|
||||
// only matches gateway lines
|
||||
var IPv4RouteParser = regexp.MustCompile("^(default|[0-9\\.]+)\\svia\\s([0-9\\.]+)\\sdev\\s(\\w+)\\s.*$")
|
||||
|
@ -18,3 +21,8 @@ func IPv4RouteIsGateway(ifname string, tokens []string, f func(gateway string) (
|
|||
|
||||
return nil, nil
|
||||
}
|
||||
|
||||
// see Windows version to understand why ....
|
||||
func getInterfaceName(iface net.Interface) string {
|
||||
return iface.Name
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue