1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-27 01:49:03 +00:00

Make sure port.service exists before passing it to string.match. This

bug was reported by Brandon.
This commit is contained in:
david
2010-02-27 00:16:29 +00:00
parent c2a4f8b442
commit ffb34b2259

View File

@@ -22,7 +22,7 @@ categories = {"default", "safe", "auth"}
portrule = function(host, port)
return ((port.number >= 6000 and port.number <= 6009)
or string.match(port.service, "^X11"))
or (port.service and 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