Skip to content

Commit 87a4899

Browse files
author
HD Moore
committed
Place an IPv6 proxy IP between brackets
1 parent 259db26 commit 87a4899

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

modules/payloads/stagers/windows/reverse_https_proxy.rb

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -84,6 +84,11 @@ def generate
8484
# patch proxy info
8585
proxyhost = datastore['PROXY_HOST'].to_s
8686
proxyport = datastore['PROXY_PORT'].to_s || "8080"
87+
88+
if Rex::Socket.is_ipv6?(proxyhost)
89+
proxyhost = "[#{proxyhost}]"
90+
end
91+
8792
proxyinfo = proxyhost + ":" + proxyport
8893
if proxyport == "80"
8994
proxyinfo = proxyhost

0 commit comments

Comments
 (0)