From 28da1141cfd9f7fa553f45fd9b718f491db5d4c4 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Mon, 20 Dec 2010 11:23:57 +0000 Subject: [PATCH] some fixes (for MySQL < 4.0) --- plugins/dbms/mysql/fingerprint.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/plugins/dbms/mysql/fingerprint.py b/plugins/dbms/mysql/fingerprint.py index 3cd159981..c4c6f923a 100644 --- a/plugins/dbms/mysql/fingerprint.py +++ b/plugins/dbms/mysql/fingerprint.py @@ -224,12 +224,9 @@ class Fingerprint(GenericFingerprint): setDbms("%s 5" % DBMS.MYSQL) self.getBanner() - # Otherwise assume it is MySQL < 5.0.0 - else: + elif inject.checkBooleanExpression("0=(SELECT FOUND_ROWS())"): kb.dbmsVersion = ["< 5.0.0"] - setDbms("%s 4" % DBMS.MYSQL) - self.getBanner() if not conf.extensiveFp: @@ -249,12 +246,10 @@ class Fingerprint(GenericFingerprint): kb.dbmsVersion = [">= 4.0.6", "< 4.1.0"] elif inject.checkBooleanExpression("0=(SELECT FOUND_ROWS())"): kb.dbmsVersion = [">= 4.0.0", "< 4.0.6"] - elif inject.checkBooleanExpression("CONNECTION_ID()=CONNECTION_ID()"): - kb.dbmsVersion = [">= 3.23.14", "< 4.0.0"] - elif inject.checkBooleanExpression("USER()=USER()"): - kb.dbmsVersion = [">= 3.22.11", "< 3.23.14"] - else: - kb.dbmsVersion = ["< 3.22.11"] + else: + kb.dbmsVersion = ["< 4.0.0"] + setDbms("%s 3" % DBMS.MYSQL) + self.getBanner() return True else: