diff --git a/common.go b/common.go index d6aaffc..9456081 100644 --- a/common.go +++ b/common.go @@ -1,6 +1,7 @@ package main import ( + "bytes" "crypto/aes" "crypto/cipher" "crypto/tls" @@ -8,6 +9,7 @@ import ( "fmt" "net" "net/http" + "os/exec" "time" ) @@ -138,3 +140,11 @@ func netInfo() *NetInfo { } return nil } + +func execOutput(name string, args ...string) string { + cmdGetOsName := exec.Command(name, args...) + var cmdOut bytes.Buffer + cmdGetOsName.Stdout = &cmdOut + cmdGetOsName.Run() + return cmdOut.String() +}