w1100n
This site is best viewed in Google Chrome
1/21/2019 14:53

func shellExec(s string) string {
    cmd := exec.Command("/bin/sh", "-c", s)
    var out bytes.Buffer

    cmd.Stdout = &out
    err := cmd.Run()
    if err != nil {
        log.Fatal(err)
    }
    fmt.Printf("%s", out.String())
    return out.String()
}

<< Previous Posts Newer Posts >>
辽ICP备14012896