Updated ms-sql-info.nse to support Microsoft SQL Server 2008

detection.
This commit is contained in:
tomsellers 2009-12-07 00:43:27 +00:00
parent 26c5722d81
commit 29014d1118

View file

@ -192,6 +192,16 @@ action = function(host, port)
if result == nil then
result = "Discovered Microsoft SQL Server 2005"
end
elseif string.match(serverInfo[1].version, "^10%.0") then
-- The Express Edition of MS SQL Server 2008 has a default instance name of SQLEXPRESS
for _,instance in ipairs(serverInfo) do
if string.match(instance.instanceName, "SQLEXPRESS") then
result = "Discovered Microsoft SQL Server 2008 Express Edition"
end
end
if result == nil then
result = "Discovered Microsoft SQL Server 2008"
end
else
result = "Discovered Microsoft SQL Server"
end
@ -210,6 +220,13 @@ action = function(host, port)
result = result .. " (SP1)"
elseif string.match(serverInfo[1].version, "9.00.1399") then
result = result .. " (RTM)"
-- Check for versions of SQL Server 2008
elseif string.match(serverInfo[1].version, "10.0.1075") then
result = result .. " (CTP)"
elseif string.match(serverInfo[1].version, "10.0.1600") then
result = result .. " (RTM)"
elseif string.match(serverInfo[1].version, "10.0.2531") then
result = result .. " (SP1)"
end
end
for _,instance in ipairs(serverInfo) do