MCPcopy Index your code
hub / github.com/SummerSec/SpringExploit / Start

Function Start

cmd/commons/core/runner.go:138–165  ·  view source on GitHub ↗
(u string, hashmap map[string]interface{}, i int, c chan int)

Source from the content-addressed store, hash-verified

136}
137
138func Start(u string, hashmap map[string]interface{}, i int, c chan int) {
139 log.Info("Runner started")
140 log.Infoln("Pen-testing URL: ", u)
141 //for k, v := range hashmap {
142 // log.Debugln("key: ", k, " value: ", v)
143 //}
144 r, err := url.Parse(u)
145 if err != nil {
146 log.Info("URL parse error")
147 log.Errorln(err)
148 return
149 }
150 var target string
151 if r.Path == "" {
152 target = r.Scheme + "://" + r.Host + "/"
153 } else {
154 target = r.Scheme + "://" + r.Host + r.Path
155 }
156 attack.Sevice(target, hashmap)
157 defer func() {
158 if errs := recover(); errs != nil {
159 log.Debug("Runner panic: ", errs)
160 }
161 }()
162 // 放到最后,不然无法生效
163 c <- i + 1
164
165}
166
167func Start2(u string, hashmap map[string]interface{}) {
168 log.Infof("%s Runner started", u)

Callers

nothing calls this directly

Calls 1

SeviceFunction · 0.92

Tested by

no test coverage detected