mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-25 19:13:48 +03:00
added one more level of MSSQL version check (if first fails for some reason)
This commit is contained in:
parent
07609bfb53
commit
b4450c6ddd
|
@ -468,6 +468,8 @@ def getValue(expression, blind=True, inband=True, error=True, time=True, fromUse
|
||||||
if isinstance(value, basestring):
|
if isinstance(value, basestring):
|
||||||
if value.lower() in ("true", "false"):
|
if value.lower() in ("true", "false"):
|
||||||
value = bool(value)
|
value = bool(value)
|
||||||
|
elif value.capitalize() == "None":
|
||||||
|
value = None
|
||||||
else:
|
else:
|
||||||
value = value != "0"
|
value = value != "0"
|
||||||
elif isinstance(value, int):
|
elif isinstance(value, int):
|
||||||
|
|
|
@ -134,8 +134,6 @@ class Fingerprint(GenericFingerprint):
|
||||||
if not conf.extensiveFp:
|
if not conf.extensiveFp:
|
||||||
return True
|
return True
|
||||||
|
|
||||||
kb.dbmsVersion = None
|
|
||||||
|
|
||||||
return True
|
return True
|
||||||
else:
|
else:
|
||||||
warnMsg = "the back-end DBMS is not SAP MaxDB"
|
warnMsg = "the back-end DBMS is not SAP MaxDB"
|
||||||
|
|
|
@ -132,6 +132,16 @@ class Fingerprint(GenericFingerprint):
|
||||||
|
|
||||||
break
|
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:
|
if kb.dbmsVersion:
|
||||||
setDbms("%s %s" % (DBMS.MSSQL, kb.dbmsVersion[0]))
|
setDbms("%s %s" % (DBMS.MSSQL, kb.dbmsVersion[0]))
|
||||||
else:
|
else:
|
||||||
|
|
Loading…
Reference in New Issue
Block a user