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:
@@ -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
|
||||||
|
|||||||
Reference in New Issue
Block a user