From 9c887eb457e54e91ea1a2cd336b067a83d9ed429 Mon Sep 17 00:00:00 2001 From: HD Moore Date: Sat, 10 Dec 2011 08:17:24 -0600 Subject: [PATCH] Fix displayed host name for IPv6 targets --- lib/msf/core/auxiliary/crawler.rb | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/msf/core/auxiliary/crawler.rb b/lib/msf/core/auxiliary/crawler.rb index 7449e8fe9c..b3ccd8e513 100644 --- a/lib/msf/core/auxiliary/crawler.rb +++ b/lib/msf/core/auxiliary/crawler.rb @@ -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