diff --git a/lib/request/inject.py b/lib/request/inject.py index d1d97fd19..a3a8c23b2 100644 --- a/lib/request/inject.py +++ b/lib/request/inject.py @@ -468,6 +468,8 @@ def getValue(expression, blind=True, inband=True, error=True, time=True, fromUse if isinstance(value, basestring): if value.lower() in ("true", "false"): value = bool(value) + elif value.capitalize() == "None": + value = None else: value = value != "0" elif isinstance(value, int): diff --git a/plugins/dbms/maxdb/fingerprint.py b/plugins/dbms/maxdb/fingerprint.py index 6a62b9856..941d7d600 100644 --- a/plugins/dbms/maxdb/fingerprint.py +++ b/plugins/dbms/maxdb/fingerprint.py @@ -134,8 +134,6 @@ class Fingerprint(GenericFingerprint): if not conf.extensiveFp: return True - kb.dbmsVersion = None - return True else: warnMsg = "the back-end DBMS is not SAP MaxDB" diff --git a/plugins/dbms/mssqlserver/fingerprint.py b/plugins/dbms/mssqlserver/fingerprint.py index 572b41f62..19635a3e4 100644 --- a/plugins/dbms/mssqlserver/fingerprint.py +++ b/plugins/dbms/mssqlserver/fingerprint.py @@ -132,6 +132,16 @@ class Fingerprint(GenericFingerprint): break + if not kb.dbmsVersion or kb.dbmsVersion == ["Unknown"]: + for version, check in [\ + ("2000", "HOST_NAME()=HOST_NAME()"),\ + ("2005", "XACT_STATE()=XACT_STATE()"),\ + ("2008", "SYSDATETIME()>0") ]: + result = inject.checkBooleanExpression(check) + + if result: + kb.dbmsVersion = [version] + if kb.dbmsVersion: setDbms("%s %s" % (DBMS.MSSQL, kb.dbmsVersion[0])) else: