fix for retrieving version of backend OS on MSSQL

This commit is contained in:
Miroslav Stampar 2012-02-03 15:42:36 +00:00
parent a48fc4efec
commit 22f4d5650f

View File

@ -152,11 +152,11 @@ class Fingerprint(GenericFingerprint):
# Get back-end DBMS underlying operating system version # Get back-end DBMS underlying operating system version
for version, data in versions.items(): for version, data in versions.items():
query = "SELECT LEN(%s) FROM %s WHERE %s " % (self.tblField, self.fileTblName, self.tblField) query = "(SELECT LEN(%s) FROM %s WHERE %s " % (self.tblField, self.fileTblName, self.tblField)
query += "LIKE '%Windows NT " + data[0] + "%'" query += "LIKE '%Windows NT " + data[0] + "%')>0"
result = inject.goStacked(query) result = inject.checkBooleanExpression(query)
if result is not None and len(result) > 0 and result[0].isdigit(): if result:
Backend.setOsVersion(version) Backend.setOsVersion(version)
infoMsg += " %s" % Backend.getOsVersion() infoMsg += " %s" % Backend.getOsVersion()
break break