mirror of
https://github.com/nmap/nmap.git
synced 2026-01-05 14:09:02 +00:00
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."
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user