From b9a1f0d49e1b263206ae2870b549bd2f351f2653 Mon Sep 17 00:00:00 2001 From: gorjan Date: Tue, 2 Aug 2011 03:45:59 +0000 Subject: [PATCH] Small fix for script output not to include the newtargets comment when no output is produced. --- scripts/broadcast-ping.nse | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/broadcast-ping.nse b/scripts/broadcast-ping.nse index 37dfa4251..22e0952e8 100755 --- a/scripts/broadcast-ping.nse +++ b/scripts/broadcast-ping.nse @@ -267,7 +267,9 @@ action = function() for ip_addr, mac_addr in pairs(icmp_responders) do table.insert(output,"IP: "..ip_addr..string.rep(" ",15-#ip_addr).." MAC: "..mac_addr) end - table.insert(output,"Use the newtargets script-arg to add the results as targets") + if #output>0 then + table.insert(output,"Use the newtargets script-arg to add the results as targets") + end end return stdnse.format_output( (#output>0), output )