minor update

This commit is contained in:
Miroslav Stampar 2010-12-18 13:08:37 +00:00
parent 05c6d661e8
commit 71cf0bd2a5

View File

@ -179,7 +179,8 @@ class Fingerprint(GenericFingerprint):
return False return False
# Determine if it is MySQL >= 5.0.0 # Determine if it is MySQL >= 5.0.0
if inject.checkBooleanExpression("%s=(SELECT %s FROM information_schema.TABLES LIMIT 0, 1)" % (randInt, randInt)): #if inject.checkBooleanExpression("%s=(SELECT %s FROM information_schema.TABLES LIMIT 0, 1)" % (randInt, randInt)):
if inject.checkBooleanExpression("EXISTS(SELECT %s FROM information_schema.TABLES)" % randInt):
kb.data.has_information_schema = True kb.data.has_information_schema = True
kb.dbmsVersion = [">= 5.0.0"] kb.dbmsVersion = [">= 5.0.0"]
@ -217,6 +218,12 @@ class Fingerprint(GenericFingerprint):
else: else:
kb.dbmsVersion = [">= 5.0.0", "<= 5.0.1"] kb.dbmsVersion = [">= 5.0.0", "<= 5.0.1"]
# For cases when information_schema is missing
elif inject.checkBooleanExpression("DATABASE() LIKE SCHEMA()"):
kb.dbmsVersion = [">= 5.0.2"]
setDbms("%s 5" % DBMS.MYSQL)
self.getBanner()
# Otherwise assume it is MySQL < 5.0.0 # Otherwise assume it is MySQL < 5.0.0
else: else:
kb.dbmsVersion = ["< 5.0.0"] kb.dbmsVersion = ["< 5.0.0"]