From c1eb803ef583493ec50b9df894d4a29b50f3ff7e Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Sun, 28 Oct 2012 21:16:51 +0100 Subject: [PATCH] Bug fix for MsSQL --hex --technique=E (NOT IN based queries were not working properly) --- lib/core/agent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/core/agent.py b/lib/core/agent.py index e17bd4b39..5232488c1 100644 --- a/lib/core/agent.py +++ b/lib/core/agent.py @@ -752,7 +752,7 @@ class Agent: if " ORDER BY " not in fromFrom: # Reference: http://vorg.ca/626-the-MS-SQL-equivalent-to-MySQLs-limit-command if " WHERE " in limitedQuery: - limitedQuery = "%s AND %s " % (limitedQuery, uniqueField or field) + limitedQuery = "%s AND %s " % (limitedQuery, self.nullAndCastField(uniqueField or field)) else: limitedQuery = "%s WHERE ISNULL(%s,' ') " % (limitedQuery, uniqueField or field)