mirror of
https://github.com/byReqz/probehost2.git
synced 2024-11-21 14:23:15 +00:00
cleanup nping commands
This commit is contained in:
parent
955f1253af
commit
2b8510c5ee
10
main.go
10
main.go
@ -151,13 +151,13 @@ func prerunner(req *http.Request, cmd string, cmdopts map[string]string, default
|
||||
remoteaddr = req.RemoteAddr
|
||||
}
|
||||
for i, host := range hosts {
|
||||
runargs := append(args, opts...)
|
||||
if ports[i] != "0" && cmd == "nping" {
|
||||
args = append(args, "-p"+ports[i])
|
||||
runargs = append(runargs, "-p"+ports[i])
|
||||
}
|
||||
args = append(args, opts...)
|
||||
args = append(args, host)
|
||||
fmt.Println(remoteaddr, cmd, args)
|
||||
res = fmt.Sprint(res, runner(remoteaddr, cmd, args...), "\n")
|
||||
runargs = append(runargs, host)
|
||||
fmt.Println(remoteaddr, cmd, runargs)
|
||||
res = fmt.Sprint(res, runner(remoteaddr, cmd, runargs...), "\n")
|
||||
}
|
||||
return res
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user