Skip to content

Commit

Permalink
fix ipv6 address error (#226)
Browse files Browse the repository at this point in the history
  • Loading branch information
irabva authored Aug 16, 2024
1 parent e3aa858 commit bd641fd
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion cmd/nmap.go
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,12 @@ func getNmapURLs() (urls []string, err error) {
}

// process the port successfully
urls = append(urls, buildURI(address.Addr, port.PortId)...)
if address.AddrType == "ipv4" {
urls = append(urls, buildURI(address.Addr, port.PortId)...)
} else {
addr := fmt.Sprintf(`[%s]`, address.Addr)
urls = append(urls, buildURI(addr, port.PortId)...)
}
}
}
}
Expand Down

0 comments on commit bd641fd

Please sign in to comment.