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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user