This commit is contained in:
Liang Ding 2014-12-18 12:06:07 +08:00
parent dd7cdc30a6
commit c86b7568f0
1 changed files with 0 additions and 10 deletions

View File

@ -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