mirror of
https://github.com/nmap/nmap.git
synced 2025-12-09 22:21:29 +00:00
Add version detection to quake3-info.nse, from Toni Ruottu.
This commit is contained in:
@@ -57,7 +57,7 @@ Extracts information from a Quake3-like game server.
|
|||||||
|
|
||||||
author = "Toni Ruottu"
|
author = "Toni Ruottu"
|
||||||
license = "Same as Nmap--See http://nmap.org/book/man-legal.html"
|
license = "Same as Nmap--See http://nmap.org/book/man-legal.html"
|
||||||
categories = {"default", "discovery", "safe"}
|
categories = {"default", "discovery", "safe", "version"}
|
||||||
|
|
||||||
require "shortport"
|
require "shortport"
|
||||||
require "stdnse"
|
require "stdnse"
|
||||||
@@ -216,6 +216,27 @@ action = function(host, port)
|
|||||||
|
|
||||||
local basic, other = assorted(fields)
|
local basic, other = assorted(fields)
|
||||||
|
|
||||||
|
-- Previously observed version strings:
|
||||||
|
-- "tremulous 1.1.0 linux-x86_64 Aug 5 2010"
|
||||||
|
-- "ioq3 1.36+svn1933-1/Ubuntu linux-x86_64 Apr 4 2011"
|
||||||
|
local versionline = basic["version"]
|
||||||
|
if versionline then
|
||||||
|
local fields = stdnse.strsplit(" ", versionline)
|
||||||
|
local product = fields[1]
|
||||||
|
local version = fields[2]
|
||||||
|
local osline = fields[3]
|
||||||
|
port.version.name = "quake3"
|
||||||
|
port.version.product = product
|
||||||
|
port.version.version = version
|
||||||
|
if string.find(osline, "linux") then
|
||||||
|
port.version.ostype = "Linux"
|
||||||
|
end
|
||||||
|
if string.find(osline, "win") then
|
||||||
|
port.version.ostype = "Windows"
|
||||||
|
end
|
||||||
|
nmap.set_port_version(host, port, "hardmatched")
|
||||||
|
end
|
||||||
|
|
||||||
local fraglimit = fields["fraglimit"]
|
local fraglimit = fields["fraglimit"]
|
||||||
if not fraglimit then
|
if not fraglimit then
|
||||||
fraglimit = "?"
|
fraglimit = "?"
|
||||||
|
|||||||
@@ -171,7 +171,7 @@ Entry { filename = "pop3-brute.nse", categories = { "auth", "intrusive", } }
|
|||||||
Entry { filename = "pop3-capabilities.nse", categories = { "default", "discovery", "safe", } }
|
Entry { filename = "pop3-capabilities.nse", categories = { "default", "discovery", "safe", } }
|
||||||
Entry { filename = "pptp-version.nse", categories = { "version", } }
|
Entry { filename = "pptp-version.nse", categories = { "version", } }
|
||||||
Entry { filename = "qscan.nse", categories = { "discovery", "safe", } }
|
Entry { filename = "qscan.nse", categories = { "discovery", "safe", } }
|
||||||
Entry { filename = "quake3-info.nse", categories = { "default", "discovery", "safe", } }
|
Entry { filename = "quake3-info.nse", categories = { "default", "discovery", "safe", "version", } }
|
||||||
Entry { filename = "quake3-master-getservers.nse", categories = { "default", "discovery", "safe", } }
|
Entry { filename = "quake3-master-getservers.nse", categories = { "default", "discovery", "safe", } }
|
||||||
Entry { filename = "realvnc-auth-bypass.nse", categories = { "auth", "default", "safe", } }
|
Entry { filename = "realvnc-auth-bypass.nse", categories = { "auth", "default", "safe", } }
|
||||||
Entry { filename = "resolveall.nse", categories = { "discovery", "safe", } }
|
Entry { filename = "resolveall.nse", categories = { "discovery", "safe", } }
|
||||||
|
|||||||
Reference in New Issue
Block a user