From 6f2ce15478b390ac79a25090af420c406b068287 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Wed, 22 Dec 2010 00:27:21 +0000 Subject: [PATCH] minor refactoring --- 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 a00b16a76..e72897a19 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 not inject.checkBooleanExpression("%s=(SELECT %s FROM DUAL WHERE 1=2)" % (randInt, randInt)): + 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"]