1
0
mirror of https://github.com/taigrr/wtf synced 2025-01-18 04:03:14 -08:00
wtf/security/dns_windows.go
2018-11-28 14:47:06 +01:00

15 lines
283 B
Go
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

// +build windows
package security
import (
"os/exec"
"github.com/wtfutil/wtf/wtf"
)
func DnsServers() []string {
cmd := exec.Command("powershell.exe", "Get-DnsClientServerAddress | Select-Object ExpandProperty ServerAddresses")
return []string{wtf.ExecuteCommand(cmd)}
}