This uses https://en.wikiversity.org/wiki/IPv6#Use_in_URLs and the information in several RFCs which specify that IPv6 addresses in URLs should be enclosed in [ ] and makes a function in Rex-Socket that makes it easy to identify if an address is an IPv6 address and convert it into a URL compatible string.
This came up after some discussion with @smcintyre-r7 about the lack of ability to do this in Metasploit and the increased need to support IPv6 in Metasploit.
This uses https://en.wikiversity.org/wiki/IPv6#Use_in_URLs and the information in several RFCs which specify that IPv6 addresses in URLs should be enclosed in
[ ]
and makes a function in Rex-Socket that makes it easy to identify if an address is an IPv6 address and convert it into a URL compatible string.This came up after some discussion with @smcintyre-r7 about the lack of ability to do this in Metasploit and the increased need to support IPv6 in Metasploit.