From cb61401c18cf7bbb22b00cc1d00b3282557ed9b9 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Wed, 22 Dec 2010 00:20:56 +0000 Subject: [PATCH] bug fix (http://dev.mysql.com/doc/refman/5.0/es/news-5-0-11.html - "Added support of where clause for queries with FROM DUAL") --- plugins/dbms/mysql/fingerprint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/dbms/mysql/fingerprint.py b/plugins/dbms/mysql/fingerprint.py index 6b2bf8975..a00b16a76 100644 --- a/plugins/dbms/mysql/fingerprint.py +++ b/plugins/dbms/mysql/fingerprint.py @@ -209,7 +209,7 @@ 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("%s=(SELECT %s FROM DUAL)" % (randInt, randInt)): + elif not inject.checkBooleanExpression("%s=(SELECT %s FROM DUAL WHERE 1=2)" % (randInt, randInt)): kb.dbmsVersion = [">= 5.0.11", "< 5.0.38"] elif inject.checkBooleanExpression("DATABASE() LIKE SCHEMA()"): kb.dbmsVersion = [">= 5.0.2", "< 5.0.11"]