diff --git a/Plugins/scanner.go b/Plugins/scanner.go index 9a4d475..b32c6d8 100644 --- a/Plugins/scanner.go +++ b/Plugins/scanner.go @@ -97,11 +97,11 @@ func AddScan(scantype string, info common.HostInfo, ch chan struct{}, wg *sync.W common.Num += 1 Mutex.Unlock() ScanFunc(PluginList, scantype, &info) - wg.Done() Mutex.Lock() common.End += 1 Mutex.Unlock() <-ch + wg.Done() }() ch <- struct{}{} } diff --git a/WebScan/lib/check.go b/WebScan/lib/check.go index 65fafd6..f2df092 100644 --- a/WebScan/lib/check.go +++ b/WebScan/lib/check.go @@ -194,7 +194,6 @@ func executePoc(oReq *http.Request, p *Poc) (bool, error, string) { for k, v := range rule.Headers { newRequest.Header.Set(k, v) } - resp, err := DoRequest(newRequest, rule.FollowRedirects) if err != nil { return false, err diff --git a/common/Parse.go b/common/Parse.go index ea8d0be..526e747 100644 --- a/common/Parse.go +++ b/common/Parse.go @@ -12,10 +12,10 @@ import ( ) func Parse(Info *HostInfo) { - ParseScantype(Info) ParseUser(Info) ParsePass(Info) ParseInput(Info) + ParseScantype(Info) } func ParseUser(Info *HostInfo) { diff --git a/common/ParsePort.go b/common/ParsePort.go index c9cb328..ac0e46d 100644 --- a/common/ParsePort.go +++ b/common/ParsePort.go @@ -11,7 +11,10 @@ func ParsePort(ports string) (scanPorts []int) { } slices := strings.Split(ports, ",") for _, port := range slices { - port = strings.Trim(port, " ") + port = strings.TrimSpace(port) + if port == "" { + continue + } upper := port if strings.Contains(port, "-") { ranges := strings.Split(port, "-") @@ -28,7 +31,6 @@ func ParsePort(ports string) (scanPorts []int) { port = ranges[1] upper = ranges[0] } - } start, _ := strconv.Atoi(port) end, _ := strconv.Atoi(upper)