From f7be0ca4e29f7ac25404a098ab3f2dafc66735d1 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Fri, 28 Oct 2011 12:49:35 +0000 Subject: [PATCH] minor fix --- plugins/dbms/mssqlserver/enumeration.py | 4 ++++ plugins/generic/enumeration.py | 4 +++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/dbms/mssqlserver/enumeration.py b/plugins/dbms/mssqlserver/enumeration.py index 830efdbaf..b67cdcc45 100644 --- a/plugins/dbms/mssqlserver/enumeration.py +++ b/plugins/dbms/mssqlserver/enumeration.py @@ -139,6 +139,10 @@ class Enumeration(GenericEnumeration): if not kb.data.cachedTables: errMsg = "unable to retrieve the tables for any database" raise sqlmapNoneDataException(errMsg) + else: + for db, tables in kb.data.cachedTables.items(): + if tables: + kb.data.cachedTables[db] = sorted(tables) return kb.data.cachedTables diff --git a/plugins/generic/enumeration.py b/plugins/generic/enumeration.py index be5cb43e9..f96367a8d 100644 --- a/plugins/generic/enumeration.py +++ b/plugins/generic/enumeration.py @@ -973,7 +973,9 @@ class Enumeration: else: raise sqlmapNoneDataException, errMsg else: - kb.data.cachedTables.sort() + for db, tables in kb.data.cachedTables.items(): + if tables: + kb.data.cachedTables[db] = sorted(tables) return kb.data.cachedTables