gateway_windows : chcp 437
This commit is contained in:
parent
7d0f0cdbd5
commit
2339fcd264
|
@ -6,8 +6,10 @@ import (
|
|||
)
|
||||
|
||||
func DiscoverGateway() (ip net.IP, iface string, err error) {
|
||||
routeCmd := exec.Command("route", "print", "0.0.0.0")
|
||||
output, err := routeCmd.CombinedOutput()
|
||||
output, err := exec.Command("cmd.exe", "/C", "chcp 437 && route print 0.0.0.0").CombinedOutput()
|
||||
if err != nil {
|
||||
panic(err)
|
||||
}
|
||||
if err != nil {
|
||||
return nil, "", err
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user