From 488a89c84a07a450259c90c52bff0cdc2945b3c4 Mon Sep 17 00:00:00 2001 From: xuc2 Date: Mon, 11 Jan 2021 19:09:34 +0800 Subject: [PATCH] fix_removeWildcard --- v2/pkg/resolve/resolve.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/v2/pkg/resolve/resolve.go b/v2/pkg/resolve/resolve.go index e33785a..0f59f82 100644 --- a/v2/pkg/resolve/resolve.go +++ b/v2/pkg/resolve/resolve.go @@ -106,14 +106,18 @@ func (r *ResolutionPool) resolveWorker() { continue } + var skip bool for _, host := range hosts { // Ignore the host if it exists in wildcard ips map if _, ok := r.wildcardIPs[host]; ok { //nolint:staticcheck //search alternatives for "comma ok" - continue + skip = true + break } } - r.Results <- Result{Type: Subdomain, Host: task.Host, IP: hosts[0], Source: task.Source} + if !skip { + r.Results <- Result{Type: Subdomain, Host: task.Host, IP: hosts[0], Source: task.Source} + } } r.wg.Done() }