From 7ea8dd9428d3f29069df98028e1b65797005de83 Mon Sep 17 00:00:00 2001 From: stamparm Date: Thu, 16 May 2013 15:12:36 +0200 Subject: [PATCH] MySQL is specific (types are automatically being converted without any warning/error) --- lib/techniques/brute/use.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/techniques/brute/use.py b/lib/techniques/brute/use.py index a6c1cb4ae..e8d22a5ad 100644 --- a/lib/techniques/brute/use.py +++ b/lib/techniques/brute/use.py @@ -225,7 +225,10 @@ def columnExists(columnFile, regex=None): columns = {} for column in threadData.shared.value: - result = inject.checkBooleanExpression("%s" % safeStringFormat("EXISTS(SELECT %s FROM %s WHERE ROUND(%s)=ROUND(%s))", (column, table, column, column))) + if Backend.getIdentifiedDbms() in (DBMS.MYSQL,): + result = inject.checkBooleanExpression("%s" % safeStringFormat("EXISTS(SELECT %s FROM %s WHERE ABS(%s)>0)", (column, table, column))) + else: + result = inject.checkBooleanExpression("%s" % safeStringFormat("EXISTS(SELECT %s FROM %s WHERE ROUND(%s)=ROUND(%s))", (column, table, column, column))) if result: columns[column] = 'numeric'