From 77a4235fc4d0bb5697296930546529bbfdc543a9 Mon Sep 17 00:00:00 2001 From: david Date: Mon, 29 Nov 2010 19:16:49 +0000 Subject: [PATCH] Fixes to firewalk.nse from Henri Doreau: "The first one was due to my ignorance that the first index of lua arrays is 1 (and not 0). Because of that, I was setting a too high ttl value when retrieving it from traceroute results. The second one was a syntax error on a nmap.log_write() call." --- scripts/firewalk.nse | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/scripts/firewalk.nse b/scripts/firewalk.nse index 92b812397..fcd0fd45c 100644 --- a/scripts/firewalk.nse +++ b/scripts/firewalk.nse @@ -314,7 +314,7 @@ local function ttlmetric(host) -- look for the ttl value to use according to traceroute results for i, hop in pairs(host.traceroute) do if hop.ip == gateway then - return i + 2 + return i + 1 end end @@ -439,7 +439,7 @@ action = function(host) if not Protocol then if nmap.verbosity() > 1 then - nmap.log_write("FIREWALK: Unsupported protocol: " .. proto) + nmap.log_write("stdout", "FIREWALK: Unsupported protocol: " .. proto) end return end