mirror of
https://github.com/nmap/nmap.git
synced 2025-12-06 04:31:29 +00:00
Make sure to use version_intensity checks for version category scripts
This commit is contained in:
@@ -60,7 +60,7 @@ categories = {"discovery", "version"}
|
||||
--
|
||||
--
|
||||
|
||||
portrule = shortport.port_or_service(47808, "bacnet", {"udp","tcp"})
|
||||
portrule = shortport.version_port_or_service(47808, "bacnet", {"udp","tcp"})
|
||||
|
||||
---
|
||||
-- Table to look up the Vendor Name based on Vendor ID
|
||||
|
||||
@@ -43,6 +43,8 @@ categories = {"version"}
|
||||
|
||||
portrule = function (host, port)
|
||||
-- Run for any port that has a service fingerprint indicating an unknown service
|
||||
-- OK to run at any version intensity (e.g. not checking nmap.version_intensity)
|
||||
-- because no traffic is sent and lower intensity is more likely to not match.
|
||||
return port.version and port.version.service_fp
|
||||
end
|
||||
|
||||
|
||||
@@ -52,7 +52,7 @@ license = "Same as Nmap--See https://nmap.org/book/man-legal.html"
|
||||
categories = {"discovery", "version"}
|
||||
|
||||
|
||||
portrule = shortport.port_or_service({1911, 4911}, "niagara-fox", "tcp")
|
||||
portrule = shortport.version_port_or_service({1911, 4911}, "niagara-fox", "tcp")
|
||||
|
||||
-- Action Function that is used to run the NSE. This function will send the
|
||||
-- initial query to the host and port that were passed in via nmap. The
|
||||
|
||||
@@ -60,7 +60,9 @@ categories = {
|
||||
}
|
||||
|
||||
|
||||
portrule = shortport.http
|
||||
portrule = function(host, port)
|
||||
return (shortport.http(host,port) and nmap.version_intensity() >= 7)
|
||||
end
|
||||
|
||||
local ELEMENTS = {["Type"] = "Type",
|
||||
["DeviceName"] = "Device",
|
||||
|
||||
@@ -51,7 +51,7 @@ categories = {"discovery", "version"}
|
||||
-- Function to define the portrule as per nmap standards
|
||||
--
|
||||
--
|
||||
portrule = shortport.port_or_service(9600, "fins", {"tcp", "udp"})
|
||||
portrule = shortport.version_port_or_service(9600, "fins", {"tcp", "udp"})
|
||||
|
||||
---
|
||||
-- Function to set the nmap output for the host, if a valid OMRON FINS packet
|
||||
|
||||
@@ -81,7 +81,10 @@ categories = {"discovery", "default", "safe", "version"}
|
||||
|
||||
|
||||
-- don't match "rpcbind" because that's what version scan labels any RPC service
|
||||
portrule = shortport.portnumber(111, {"tcp", "udp"} )
|
||||
portrule = function(host, port)
|
||||
return nmap.version_intensity() >= 7 and
|
||||
shortport.portnumber(111, {"tcp", "udp"})(host, port)
|
||||
end
|
||||
|
||||
action = function(host, port)
|
||||
|
||||
|
||||
@@ -50,7 +50,7 @@ categories = {"discovery", "version"}
|
||||
|
||||
|
||||
-- port rule for devices running on TCP/102
|
||||
portrule = shortport.port_or_service(102, "iso-tsap", "tcp")
|
||||
portrule = shortport.version_port_or_service(102, "iso-tsap", "tcp")
|
||||
|
||||
---
|
||||
-- Function to send and receive the S7COMM Packet
|
||||
|
||||
Reference in New Issue
Block a user