From ffb34b225966af91eb36cc9a980f82121b661497 Mon Sep 17 00:00:00 2001 From: david Date: Sat, 27 Feb 2010 00:16:29 +0000 Subject: [PATCH] Make sure port.service exists before passing it to string.match. This bug was reported by Brandon. --- scripts/x11-access.nse | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/x11-access.nse b/scripts/x11-access.nse index 8da824994..f510d8779 100644 --- a/scripts/x11-access.nse +++ b/scripts/x11-access.nse @@ -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