1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-06 20:51:30 +00:00

Fixed a bug reported by Josh Greenwood that would incorrectly detect a host having IP

forwarding enabled if the scanned host was the same as the probe target.
This commit is contained in:
patrik
2012-05-05 19:44:46 +00:00
parent 9dbfcba8d2
commit cec2dd7816

View File

@@ -101,6 +101,10 @@ action = function(host)
target = arg_target target = arg_target
end end
if ( target == host.ip ) then
return ("\n ERROR: Target can not be the same as the scanned host")
end
if (icmpEchoRequest(ifname, host, target)) then if (icmpEchoRequest(ifname, host, target)) then
return ("\n The host has ip forwarding enabled, tried ping against (%s)"):format(arg_target) return ("\n The host has ip forwarding enabled, tried ping against (%s)"):format(arg_target)
end end