From f86c365694df37d8f0d434fa6fd7e92853275694 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Fri, 3 Feb 2012 10:56:39 +0000 Subject: [PATCH] added one more failsafe for MSSQL --tables --- plugins/dbms/mssqlserver/enumeration.py | 6 +++--- xml/queries.xml | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/dbms/mssqlserver/enumeration.py b/plugins/dbms/mssqlserver/enumeration.py index 1e47ebafe..7198f7d3d 100644 --- a/plugins/dbms/mssqlserver/enumeration.py +++ b/plugins/dbms/mssqlserver/enumeration.py @@ -97,7 +97,7 @@ class Enumeration(GenericEnumeration): continue - for query in (rootQuery.inband.query, rootQuery.inband.query2): + for query in (rootQuery.inband.query, rootQuery.inband.query2, rootQuery.inband.query3): query = query.replace("%s", db) value = inject.getValue(query, blind=False) if not isNoneValue(value): @@ -118,7 +118,7 @@ class Enumeration(GenericEnumeration): infoMsg += "database '%s'" % db logger.info(infoMsg) - for query in (rootQuery.blind.count, rootQuery.blind.count2): + for query in (rootQuery.blind.count, rootQuery.blind.count2, rootQuery.blind.count3): _ = query.replace("%s", db) count = inject.getValue(_, inband=False, error=False, charsetType=2) if not isNoneValue(count): @@ -134,7 +134,7 @@ class Enumeration(GenericEnumeration): tables = [] for index in xrange(int(count)): - _ = (rootQuery.blind.query if query == rootQuery.blind.count else rootQuery.blind.query2).replace("%s", db) % index + _ = (rootQuery.blind.query if query == rootQuery.blind.count else rootQuery.blind.query2 if query == rootQuery.blind.count2 else rootQuery.blind.query3).replace("%s", db) % index table = inject.getValue(_, inband=False, error=False) kb.hintValue = table diff --git a/xml/queries.xml b/xml/queries.xml index 960f4d9a6..72816ff0d 100644 --- a/xml/queries.xml +++ b/xml/queries.xml @@ -184,8 +184,8 @@ - - + +