MCPcopy Create free account
hub / github.com/evilsocket/shellz / viewStats

Function viewStats

cmd/shellz/run.go:202–221  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

200}
201
202func viewStats() {
203 log.Raw(tui.Dim("_______________________"))
204 log.Raw(tui.Bold("Statistics\n"))
205
206 totTime := stats.Done.Sub(stats.Started)
207 avgTime := time.Duration(0)
208 if stats.Success > 0 {
209 avgTime = time.Duration(uint64(totTime) / stats.Success)
210 }
211
212 log.Raw("total shells : %d", stats.Shells)
213 log.Raw("total time : %s (%s/shell avg)", totTime, avgTime)
214 log.Raw("total output : %s", humanize.Bytes(stats.Output))
215 log.Raw(tui.Green("ok : %d"), stats.Success)
216 if stats.Failed > 0 {
217 log.Raw(tui.Red("ko : %d ( %d connect / %d exec )"), stats.Failed, stats.FailedConnect, stats.FailedExec)
218 } else {
219 log.Raw(tui.Dim("ko : 0"))
220 }
221}
222
223func runCommand() {
224 log.Debug("onFilter = %s", onFilter)

Callers 1

runCommandFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected