From 42b6489312edbb4bda0cf4d9f9be450a1e1cf4e2 Mon Sep 17 00:00:00 2001 From: david Date: Wed, 16 Jan 2013 00:29:08 +0000 Subject: [PATCH] Limit ventrilo-info to port 3784 (TCP or UDP). Cf. r30460. We may want to run on more port numbers than just this one, because the server can be configured to run on other ports. But we don't want it to run for every open|filtered UDP port by default. We don't ahve a good way to express anything in between. --- scripts/ventrilo-info.nse | 10 +--------- 1 file changed, 1 insertion(+), 9 deletions(-) diff --git a/scripts/ventrilo-info.nse b/scripts/ventrilo-info.nse index a779a7785..d2c1fbec7 100644 --- a/scripts/ventrilo-info.nse +++ b/scripts/ventrilo-info.nse @@ -519,15 +519,7 @@ local o_str = function(info) return strbuf.dump(buf, "") end -portrule = function(host, port) - -- run if no service other than 'ventrilo' detected on port - return (port.service == nil or port.service == "" or - port.service == "unknown" or port.service == "tcpwrapped" or - port.service == "ventrilo" or port.number == 3784 or - port.state == "open|filtered") - and (port.state == "open" or port.state == "open|filtered") - and not shortport.port_is_excluded(port.number, "udp") -end +portrule = shortport.version_port_or_service({3784}, "ventrilo", {"tcp", "udp"}) action = function(host, port) local socket = nmap.new_socket()