Fix Ncat IPv6 HTTP CONNECT proxy syntax.

Patch by Joachim Henke.
http://seclists.org/nmap-dev/2013/q1/413
This commit is contained in:
david 2013-05-05 10:21:46 +00:00
parent dbbf2671ba
commit 21a8af6c08

View file

@ -277,7 +277,7 @@ static const char *sock_to_url(const union sockaddr_u *su)
if (su->storage.ss_family == AF_INET)
Snprintf(buf, sizeof(buf), "%s:%hu", host_str, port);
else if (su->storage.ss_family == AF_INET6)
Snprintf(buf, sizeof(buf), "[%s]:%hu]", host_str, port);
Snprintf(buf, sizeof(buf), "[%s]:%hu", host_str, port);
else
bye("Unknown address family in sock_to_url_host.");