Changed order of adding default ports to add host correctly

This commit is contained in:
David Allen 2024-08-07 19:57:37 -06:00
parent 3d6daa757a
commit 4cc3f7f7ac
Signed by: towk
GPG key ID: 793B2924A49B3A3F
2 changed files with 10 additions and 9 deletions

View file

@ -155,8 +155,8 @@ func FormatIPUrls(ips []string, ports []int, scheme string, verbose bool) [][]st
}
// tidy up slashes and update arg with new value
uri.Path = strings.TrimSuffix(uri.Path, "/")
uri.Path = strings.ReplaceAll(uri.Path, "//", "/")
uri.Path = strings.TrimSuffix(uri.Path, "/")
// for hosts with unspecified ports, add ports to scan from flag
if uri.Port() == "" {