From 26b06bfcfb6880e808a974b304800511159ebd8f Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Sat, 1 Jan 2011 19:38:51 +0000 Subject: [PATCH] update (http://dev.mysql.com/doc/refman/5.0/en/server-system-variables.html) --- plugins/dbms/mysql/fingerprint.py | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/plugins/dbms/mysql/fingerprint.py b/plugins/dbms/mysql/fingerprint.py index 056f6c631..784264161 100644 --- a/plugins/dbms/mysql/fingerprint.py +++ b/plugins/dbms/mysql/fingerprint.py @@ -217,12 +217,16 @@ class Fingerprint(GenericFingerprint): # Check if it is MySQL >= 5.0.0 and < 5.1.2 elif inject.checkBooleanExpression("@@hostname=@@hostname"): kb.dbmsVersion = [">= 5.0.38", "< 5.1.2"] + elif inject.checkBooleanExpression("@@character_set_filesystem=@@character_set_filesystem"): + kb.dbmsVersion = [">= 5.0.19", "< 5.0.38"] elif not inject.checkBooleanExpression("%s=(SELECT %s FROM DUAL WHERE %s!=%s)" % (randInt, randInt, randInt, randInt)): - kb.dbmsVersion = [">= 5.0.11", "< 5.0.38"] - elif inject.checkBooleanExpression("DATABASE() LIKE SCHEMA()"): - kb.dbmsVersion = [">= 5.0.2", "< 5.0.11"] + kb.dbmsVersion = [">= 5.0.11", "< 5.0.19"] + elif inject.checkBooleanExpression("@@div_precision_increment=@@div_precision_increment"): + kb.dbmsVersion = [">= 5.0.6", "< 5.0.11"] + elif inject.checkBooleanExpression("@@automatic_sp_privileges=@@automatic_sp_privileges"): + kb.dbmsVersion = [">= 5.0.3", "< 5.0.6"] else: - kb.dbmsVersion = [">= 5.0.0", "<= 5.0.1"] + kb.dbmsVersion = [">= 5.0.0", "< 5.0.3"] # For cases when information_schema is missing elif inject.checkBooleanExpression("DATABASE() LIKE SCHEMA()"):