This commit is contained in:
parent
dd7cdc30a6
commit
c86b7568f0
|
@ -18,7 +18,6 @@ package output
|
|||
import (
|
||||
"bufio"
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"io"
|
||||
"io/ioutil"
|
||||
"math/rand"
|
||||
|
@ -95,15 +94,6 @@ func RunHandler(w http.ResponseWriter, r *http.Request) {
|
|||
filePath := args["executable"].(string)
|
||||
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.Dir = curDir
|
||||
// XXX: keep move with Go 1.4 and later's
|
||||
|
|
Loading…
Reference in New Issue