diff --git a/scripts/ip-forwarding.nse b/scripts/ip-forwarding.nse index d1912cf9a..0ae222a9b 100644 --- a/scripts/ip-forwarding.nse +++ b/scripts/ip-forwarding.nse @@ -101,6 +101,10 @@ action = function(host) target = arg_target 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 return ("\n The host has ip forwarding enabled, tried ping against (%s)"):format(arg_target) end