From 6a5a19faca00bf29454d7a538a34ca03c445f5fa Mon Sep 17 00:00:00 2001 From: Adam Cammack Date: Mon, 23 Jul 2018 14:02:14 -0500 Subject: [PATCH] Land #10364, Handle nil for shell_reverse_tcp_ipv6 This makes things like `msfvenom --list-options` or `info` when options are not set work. --- modules/payloads/singles/linux/x86/shell_reverse_tcp_ipv6.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/modules/payloads/singles/linux/x86/shell_reverse_tcp_ipv6.rb b/modules/payloads/singles/linux/x86/shell_reverse_tcp_ipv6.rb index 3457d06755..0108b176f1 100644 --- a/modules/payloads/singles/linux/x86/shell_reverse_tcp_ipv6.rb +++ b/modules/payloads/singles/linux/x86/shell_reverse_tcp_ipv6.rb @@ -39,7 +39,7 @@ def generate_stage # ipv6 address conversion # converts user's input into ipv6 hex representation - words = IPAddr.new(datastore['LHOST']).hton.scan(/..../).map {|i| i.unpack('V').first.to_s(16)} + words = IPAddr.new(datastore['LHOST'], Socket::AF_INET6).hton.scan(/..../).map {|i| i.unpack('V').first.to_s(16)} payload_data =<<-EOS xor ebx,ebx mul ebx