Skip to content

Commit 261672b

Browse files
committed
fix 域名转ip时错将ip带入的bug
1 parent c311f31 commit 261672b

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

pkg/naabu/v2/pkg/runner/targets.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import (
44
"bufio"
55
"flag"
66
"fmt"
7+
"github.com/asaskevich/govalidator"
78
"github.com/hktalent/scan4all/pkg"
89
"github.com/hktalent/scan4all/pkg/naabu/v2/pkg/privileges"
910
"github.com/hktalent/scan4all/pkg/naabu/v2/pkg/scan"
@@ -187,6 +188,9 @@ func (r *Runner) AddTarget(target string) error {
187188
}
188189

189190
func (r *Runner) DoDns(target string) {
191+
if govalidator.IsIP(target) {
192+
return
193+
}
190194
ips, err := r.resolveFQDN(target)
191195
if err != nil {
192196
return

0 commit comments

Comments
 (0)