From 0c52330285b4a3b505a4f74ebf71d0e57e8c826f Mon Sep 17 00:00:00 2001 From: david Date: Sat, 31 Mar 2012 03:00:25 +0000 Subject: [PATCH] Strip blank lines from the output of targets-asn.nse. Patch by John Bond. --- scripts/targets-asn.nse | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/scripts/targets-asn.nse b/scripts/targets-asn.nse index 643b2bb42..7970ab71e 100644 --- a/scripts/targets-asn.nse +++ b/scripts/targets-asn.nse @@ -84,10 +84,12 @@ action = function(host, port) break else for i, prefix in ipairs(stdnse.strsplit("\n",data)) do - table.insert(prefixes,prefix) - if target.ALLOW_NEW_TARGETS then - stdnse.print_debug("Added targets: "..prefix) - local status,err = target.add(prefix) + if ( #prefix > 1 ) then + table.insert(prefixes,prefix) + if target.ALLOW_NEW_TARGETS then + stdnse.print_debug("Added targets: "..prefix) + local status,err = target.add(prefix) + end end end end