mirror of
https://github.com/nmap/nmap.git
synced 2026-01-02 04:49:02 +00:00
Limit ventrilo-info to port 3784 (TCP or UDP).
Cf. r30460. We may want to run on more port numbers than just this one, because the server can be configured to run on other ports. But we don't want it to run for every open|filtered UDP port by default. We don't ahve a good way to express anything in between.
This commit is contained in:
@@ -519,15 +519,7 @@ local o_str = function(info)
|
||||
return strbuf.dump(buf, "")
|
||||
end
|
||||
|
||||
portrule = function(host, port)
|
||||
-- run if no service other than 'ventrilo' detected on port
|
||||
return (port.service == nil or port.service == "" or
|
||||
port.service == "unknown" or port.service == "tcpwrapped" or
|
||||
port.service == "ventrilo" or port.number == 3784 or
|
||||
port.state == "open|filtered")
|
||||
and (port.state == "open" or port.state == "open|filtered")
|
||||
and not shortport.port_is_excluded(port.number, "udp")
|
||||
end
|
||||
portrule = shortport.version_port_or_service({3784}, "ventrilo", {"tcp", "udp"})
|
||||
|
||||
action = function(host, port)
|
||||
local socket = nmap.new_socket()
|
||||
|
||||
Reference in New Issue
Block a user