mirror of
https://github.com/nmap/nmap.git
synced 2026-01-04 05:39:01 +00:00
Add checks for nmap.address_family == "inet" to scripts that require
that. Patch by Henri Doreau.
This commit is contained in:
@@ -67,7 +67,14 @@ require 'shortport'
|
||||
require 'stdnse'
|
||||
|
||||
-- We want to run against a specific host if UDP/67 is open
|
||||
portrule = shortport.portnumber(67, "udp")
|
||||
function portrule(host, port)
|
||||
if nmap.address_family() ~= 'inet' then
|
||||
stdnse.print_debug("%s is IPv4 compatible only.", SCRIPT_NAME)
|
||||
return false
|
||||
end
|
||||
|
||||
return shortport.portnumber(67, "udp")(host, port)
|
||||
end
|
||||
|
||||
-- We will want to run as a prerule any time
|
||||
--prerule = function()
|
||||
|
||||
Reference in New Issue
Block a user