Fix displayed host name for IPv6 targets

unstable
HD Moore 2011-12-10 08:17:24 -06:00
parent a9db05e53b
commit 9c887eb457
1 changed files with 3 additions and 0 deletions

View File

@ -78,6 +78,9 @@ module Auxiliary::HttpCrawler
def to_url
proto = self[:ssl] ? "https" : "http"
host = self[:vhost] ? self[:vhost] : self[:host]
if Rex::Socket.is_ipv6?(host)
host = "[#{host}]"
end
"#{proto}://#{host}:#{self[:port]}#{self[:path]}"
end
end