Fix displayed host name for IPv6 targets
parent
a9db05e53b
commit
9c887eb457
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue