diff --git a/scripts/amqp-info.nse b/scripts/amqp-info.nse index 23e5b1eff..15642be39 100644 --- a/scripts/amqp-info.nse +++ b/scripts/amqp-info.nse @@ -39,7 +39,7 @@ license = "Same as Nmap--See http://nmap.org/book/man-legal.html" categories = {"default", "discovery", "safe", "version"} -portrule = shortport.port_or_service(5672, "amqp", "tcp", "open") +portrule = shortport.version_port_or_service(5672, "amqp", "tcp", "open") action = function(host, port) local cli = amqp.AMQP:new( host.ip, port.number ) diff --git a/scripts/enip-info.nse b/scripts/enip-info.nse index 13e50726a..e8f68b625 100644 --- a/scripts/enip-info.nse +++ b/scripts/enip-info.nse @@ -56,7 +56,7 @@ categories = {"discovery", "version"} -- -- -- IANA replaced the historical EtherNet/IP-2 name with EtherNet-IP-2 -portrule = shortport.port_or_service(44818, {"EtherNet-IP-2", "EtherNet/IP-2"}, {"tcp","udp"}) +portrule = shortport.version_port_or_service(44818, {"EtherNet-IP-2", "EtherNet/IP-2"}, {"tcp","udp"}) --- -- Table to look up the Vendor Name based on Vendor ID diff --git a/scripts/ike-version.nse b/scripts/ike-version.nse index 4949ff391..cb44463bd 100644 --- a/scripts/ike-version.nse +++ b/scripts/ike-version.nse @@ -28,7 +28,7 @@ author = "Jesper Kueckelhahn" license = "Same as Nmap--See http://nmap.org/book/man-legal.html" categories = {"default", "discovery", "safe", "version"} -portrule = shortport.port_or_service(500, "isakmp", "udp") +portrule = shortport.version_port_or_service(500, "isakmp", "udp") -- Test different methods for getting version diff --git a/scripts/maxdb-info.nse b/scripts/maxdb-info.nse index 015de42a7..77cdbfb64 100644 --- a/scripts/maxdb-info.nse +++ b/scripts/maxdb-info.nse @@ -35,7 +35,7 @@ license = "Same as Nmap--See http://nmap.org/book/man-legal.html" categories = { "default", "version" } -portrule = shortport.port_or_service(7210, "maxdb", "tcp") +portrule = shortport.version_port_or_service(7210, "maxdb", "tcp") -- Sends and receive a MaxDB packet -- @param socket already connected to the server diff --git a/scripts/openlookup-info.nse b/scripts/openlookup-info.nse index e936babf1..7194906fb 100644 --- a/scripts/openlookup-info.nse +++ b/scripts/openlookup-info.nse @@ -28,7 +28,7 @@ license = "Same as Nmap--See http://nmap.org/book/man-legal.html" categories = {"default", "discovery", "safe", "version"} -portrule = shortport.port_or_service(5850, "openlookup") +portrule = shortport.version_port_or_service(5850, "openlookup") -- Netstring helpers -- http://cr.yp.to/proto/netstrings.txt diff --git a/scripts/quake3-info.nse b/scripts/quake3-info.nse index cc6dd5122..077825fd8 100644 --- a/scripts/quake3-info.nse +++ b/scripts/quake3-info.nse @@ -76,7 +76,7 @@ local function range(first, last) return list end -portrule = shortport.port_or_service(range(27960, 27970), {'quake3'}, 'udp') +portrule = shortport.version_port_or_service(range(27960, 27970), {'quake3'}, 'udp') local function parsefields(data) local fields = {} diff --git a/scripts/rfc868-time.nse b/scripts/rfc868-time.nse index e7e486db0..e025311b9 100644 --- a/scripts/rfc868-time.nse +++ b/scripts/rfc868-time.nse @@ -22,7 +22,7 @@ license = "Same as Nmap--See http://nmap.org/book/man-legal.html" categories = {"discovery", "safe", "version"} -portrule = shortport.port_or_service(37, "time", {"tcp", "udp"}) +portrule = shortport.version_port_or_service(37, "time", {"tcp", "udp"}) action = function(host, port) local status, result = comm.exchange(host, port, "", {bytes=4, proto=port.protocol}) diff --git a/scripts/xmpp-info.nse b/scripts/xmpp-info.nse index d2f50128d..23b3fb0a5 100644 --- a/scripts/xmpp-info.nse +++ b/scripts/xmpp-info.nse @@ -535,7 +535,7 @@ local factor = function( t1, t2 ) return both, t1only, t2only end -portrule = shortport.port_or_service({5222, 5269}, {"jabber", "xmpp-client", "xmpp-server"}) +portrule = shortport.version_port_or_service({5222, 5269}, {"jabber", "xmpp-client", "xmpp-server"}) action = function(host, port) local server_name = stdnse.get_script_args("xmpp-info.server_name") or host.targetname or host.name local alt_server_name = stdnse.get_script_args("xmpp-info.alt_server_name") or "."