From 939b94a322a198facc7eac388a8ec9bc09ed2b5e Mon Sep 17 00:00:00 2001 From: doug Date: Sat, 15 Dec 2007 23:47:31 +0000 Subject: [PATCH] Updated the IRC server info script to handle services named irc-serv as well as just irc because this name is present in nmap-services. --- scripts/ircServerInfo.nse | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/scripts/ircServerInfo.nse b/scripts/ircServerInfo.nse index b77cd8b5d..ab8f4c1a6 100644 --- a/scripts/ircServerInfo.nse +++ b/scripts/ircServerInfo.nse @@ -11,7 +11,12 @@ categories = {"discovery"} require("stdnse") require "shortport" -portrule = shortport.port_or_service(6667, "irc") +portrule = function(host, port) + return (port.number == 6666 or + port.number == 6667 or + port.service == "irc" or + port.service == "irc-serv") and port.protocol == "tcp" +end init = function() -- Start of MOTD, we'll take the server name from here