1
0
mirror of https://github.com/nmap/nmap.git synced 2025-12-26 17:39:03 +00:00

Make version intensity scripts use shortport.version_port_or_service() instead of shortport.port_or_service()

This commit is contained in:
jay
2014-07-30 07:10:35 +00:00
parent 341e447868
commit 61d13e12d2
8 changed files with 8 additions and 8 deletions

View File

@@ -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 )

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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

View File

@@ -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 = {}

View File

@@ -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})

View File

@@ -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 "."