From a8d34b763512fefe4990bf75815f735a97c3682d Mon Sep 17 00:00:00 2001 From: dmiller Date: Fri, 8 Aug 2014 14:43:10 +0000 Subject: [PATCH] Prevent address-info from crashing when the IPv6 address is "not interesting" --- scripts/address-info.nse | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scripts/address-info.nse b/scripts/address-info.nse index 9c237692d..258e981c5 100644 --- a/scripts/address-info.nse +++ b/scripts/address-info.nse @@ -265,8 +265,6 @@ local function do_ipv6(addr) if matches(addr, "2002:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX:XXXX") then -- 6to4, RFC 3056. local ipv4 = { addr[3], addr[4], addr[5], addr[6] } - local mac = decode_eui_64({ addr[9], addr[10], addr[11], addr[12], - addr[13], addr[14], addr[15], addr[16] }) label = "6to4" output["IPv4 address"] = format_ipv4(ipv4) @@ -281,7 +279,10 @@ local function do_ipv6(addr) end end - return {[label]= output} + if label then + return {[label]= output} + end + -- else no match end action = function(host)