This commit is contained in:
Miroslav Stampar
2010-12-09 11:23:44 +00:00
parent 196131bbca
commit cdff29ada7
6 changed files with 31 additions and 59 deletions

View File

@@ -81,15 +81,13 @@ class Fingerprint(GenericFingerprint):
if conf.direct:
result = True
else:
payload = agent.fullPayload("AND tempdb_id()=tempdb_id()")
result = Request.queryPage(payload)
result = inject.checkBooleanExpression("tempdb_id()=tempdb_id()")
if result:
logMsg = "confirming Sybase"
logger.info(logMsg)
payload = agent.fullPayload("AND suser_id()=suser_id()")
result = Request.queryPage(payload)
result = inject.checkBooleanExpression("suser_id()=suser_id()")
if not result:
warnMsg = "the back-end DBMS is not Sybase"
@@ -105,10 +103,7 @@ class Fingerprint(GenericFingerprint):
return True
for version in range(12, 16):
randInt = randomInt()
query = "AND @@VERSION_NUMBER/1000=%d" % version
payload = agent.fullPayload(query)
result = Request.queryPage(payload)
result = inject.checkBooleanExpression("@@VERSION_NUMBER/1000=%d" % version)
if result:
kb.dbmsVersion = ["%d" % version]
break