mirror of
https://github.com/taigrr/wtf
synced 2025-01-18 04:03:14 -08:00
parent
5ff80f309a
commit
f9db4cc990
@ -42,7 +42,8 @@ func dnsLinux() []string {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func dnsMacOS() []string {
|
func dnsMacOS() []string {
|
||||||
cmd := exec.Command("networksetup", "-getdnsservers", "Wi-Fi")
|
cmdString := `scutil --dns | grep -o '[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}\.[0-9]\{1,3\}'`
|
||||||
|
cmd := exec.Command("sh", "-c", cmdString)
|
||||||
out := wtf.ExecuteCommand(cmd)
|
out := wtf.ExecuteCommand(cmd)
|
||||||
|
|
||||||
lines := strings.Split(out, "\n")
|
lines := strings.Split(out, "\n")
|
||||||
|
Loading…
x
Reference in New Issue
Block a user