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

Function onTestSuccess

cmd/shellz/run.go:93–102  ·  view source on GitHub ↗
(sh models.Shell)

Source from the content-addressed store, hash-verified

91}
92
93func onTestSuccess(sh models.Shell) {
94 log.Info("shell %s is working", tui.Bold(sh.Name))
95 if !sh.Enabled {
96 log.Debug("enabling shell %s", sh.Name)
97 sh.Enabled = true
98 if err := sh.Save(); err != nil {
99 log.Error("error while enabling shell %s: %s", sh.Name, err)
100 }
101 }
102}
103
104func trackSuccess() {
105 atomic.AddUint64(&stats.Success, 1)

Callers 1

cmdWorkerFunction · 0.85

Calls 4

InfoMethod · 0.80
DebugMethod · 0.80
SaveMethod · 0.80
ErrorMethod · 0.80

Tested by

no test coverage detected