mirror of
https://github.com/nmap/nmap.git
synced 2026-08-27 03:48:14 +00:00
Make sure port.service exists before passing it to string.match. This
bug was reported by Brandon.
This commit is contained in:
parent
c2a4f8b442
commit
ffb34b2259
1 changed files with 1 additions and 1 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue