mirror of
https://github.com/nmap/nmap.git
synced 2025-12-15 20:29:03 +00:00
Add checks for nmap.address_family == "inet" to scripts that require
that. Patch by Henri Doreau.
This commit is contained in:
@@ -38,6 +38,7 @@ categories = {"safe", "discovery"}
|
||||
|
||||
require 'bin'
|
||||
require 'packet'
|
||||
require 'nmap'
|
||||
require 'stdnse'
|
||||
|
||||
local IPPROTO_ICMP = packet.IPPROTO_ICMP
|
||||
@@ -279,6 +280,10 @@ hostrule = function(host)
|
||||
end
|
||||
return false
|
||||
end
|
||||
if nmap.address_family() ~= 'inet' then
|
||||
stdnse.print_debug("%s is IPv4 compatible only.", SCRIPT_NAME)
|
||||
return false
|
||||
end
|
||||
if not (host.interface and host.interface_mtu) then
|
||||
return false
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user