Place an IPv6 proxy IP between brackets

This commit is contained in:
HD Moore 2014-12-15 14:48:09 -06:00
parent 259db269bd
commit 87a489907c
1 changed files with 5 additions and 0 deletions

View File

@ -84,6 +84,11 @@ module Metasploit3
# patch proxy info
proxyhost = datastore['PROXY_HOST'].to_s
proxyport = datastore['PROXY_PORT'].to_s || "8080"
if Rex::Socket.is_ipv6?(proxyhost)
proxyhost = "[#{proxyhost}]"
end
proxyinfo = proxyhost + ":" + proxyport
if proxyport == "80"
proxyinfo = proxyhost