Skip to content

Commit

Permalink
Fixed DNS resolving A records when -ports is set (#1347)
Browse files Browse the repository at this point in the history
* Fixed DNS resolving A records when -ports is set

* fixed ineffectual assignment

* fmt

---------

Co-authored-by: kzoltan <[email protected]>
Co-authored-by: mzack <[email protected]>
  • Loading branch information
3 people authored Sep 13, 2023
1 parent 9e26204 commit cb522ce
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion runner/runner.go
Original file line number Diff line number Diff line change
Expand Up @@ -1630,7 +1630,12 @@ retry:
builder.WriteString(fmt.Sprintf(" [%s]", ip))
}

ips, cnames, err := getDNSData(hp, URL.Host)
var onlyHost string
onlyHost, _, err = net.SplitHostPort(URL.Host)
if err != nil {
onlyHost = URL.Host
}
ips, cnames, err := getDNSData(hp, onlyHost)
if err != nil {
ips = append(ips, ip)
}
Expand Down

0 comments on commit cb522ce

Please sign in to comment.