From 9352fa4ea5c07f5a4cee6a51980af9bb52d2aa5e Mon Sep 17 00:00:00 2001 From: fyodor Date: Sat, 11 Aug 2007 05:32:08 +0000 Subject: [PATCH] merge soc07 r5118 - fix portrule bug --- scripts/showHTTPVersion.nse | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/scripts/showHTTPVersion.nse b/scripts/showHTTPVersion.nse index db93fcf81..ac867709e 100644 --- a/scripts/showHTTPVersion.nse +++ b/scripts/showHTTPVersion.nse @@ -19,7 +19,26 @@ runlevel = 1.0 require "shortport" -portrule = shortport.port_or_service(80, "http") +portrule = function(host, port) + + + if + -- remove next line if you really want to run this script + false and + ( port.number == 80 + or port.service == "http" ) + and port.protocol == "tcp" + and port.state == "open" + -- and host.name ~= nil + -- and string.match(host.name, "www.+") + then + return true + else + return false + end +end + +-- portrule = shortport.port_or_service(80, "http") action = function(host, port)