1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-25 17:09:02 +00:00

In x11-access.nse, make the portrule run the script if the port number

is 6000-6009 *or* the service starts with "X11". In this case it didn't
matter because those ports do start with "X11" in nmap-services, but
this better matches the shortport.port_or_service model.
This commit is contained in:
david
2009-08-08 20:01:18 +00:00
parent 2f54cb191f
commit 1df23cd859

View File

@@ -21,15 +21,11 @@ license = "Same as Nmap--See http://nmap.org/book/man-legal.html"
categories = {"default", "safe"}
portrule = function( host, port )
if
port.number >= 6000 and port.number <= 6009
and string.match(port.service, "^X11")
return ((port.number >= 6000 and port.number <= 6009)
or string.match(port.service, "^X11"))
-- If port.version.product is not equal to nil, version
-- detection "-sV" has already done this X server test.
and port.version.product == nil
then
return true
end
end
action = function(host, port)