This commit is contained in:
parent
dd7cdc30a6
commit
c86b7568f0
|
@ -18,7 +18,6 @@ package output
|
||||||
import (
|
import (
|
||||||
"bufio"
|
"bufio"
|
||||||
"encoding/json"
|
"encoding/json"
|
||||||
"fmt"
|
|
||||||
"io"
|
"io"
|
||||||
"io/ioutil"
|
"io/ioutil"
|
||||||
"math/rand"
|
"math/rand"
|
||||||
|
@ -95,15 +94,6 @@ func RunHandler(w http.ResponseWriter, r *http.Request) {
|
||||||
filePath := args["executable"].(string)
|
filePath := args["executable"].(string)
|
||||||
curDir := filepath.Dir(filePath)
|
curDir := filepath.Dir(filePath)
|
||||||
|
|
||||||
cmd1 := exec.Command("cat", "/etc/passwd")
|
|
||||||
output, err := cmd1.Output()
|
|
||||||
if nil != err {
|
|
||||||
fmt.Println("err")
|
|
||||||
fmt.Println(err)
|
|
||||||
}
|
|
||||||
|
|
||||||
fmt.Println(string(output))
|
|
||||||
|
|
||||||
cmd := exec.Command(filePath)
|
cmd := exec.Command(filePath)
|
||||||
cmd.Dir = curDir
|
cmd.Dir = curDir
|
||||||
// XXX: keep move with Go 1.4 and later's
|
// XXX: keep move with Go 1.4 and later's
|
||||||
|
|
Loading…
Reference in New Issue