diff --git a/scripts/ms-sql-info.nse b/scripts/ms-sql-info.nse index a1ad322ed..a5fcf1107 100644 --- a/scripts/ms-sql-info.nse +++ b/scripts/ms-sql-info.nse @@ -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