fix: make macOS ALTQ and firewall related messages silent (fixes #162)

This commit is contained in:
evilsocket 2018-03-09 14:33:29 +01:00
commit 68167b3f7c
No known key found for this signature in database
GPG key ID: 1564D7F30393A456
2 changed files with 22 additions and 9 deletions

View file

@ -41,6 +41,20 @@ func UniqueInts(a []int, sorted bool) []int {
return uniq
}
func ExecSilent(executable string, args []string) (string, error) {
path, err := exec.LookPath(executable)
if err != nil {
return "", err
}
raw, err := exec.Command(path, args...).CombinedOutput()
if err != nil {
return "", err
} else {
return Trim(string(raw)), nil
}
}
func Exec(executable string, args []string) (string, error) {
path, err := exec.LookPath(executable)
if err != nil {