From bd7da455464253b371977e3089f1b540783c1532 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Fri, 28 Oct 2011 13:07:23 +0000 Subject: [PATCH] minor update --- plugins/dbms/maxdb/enumeration.py | 3 +++ plugins/dbms/mssqlserver/enumeration.py | 3 +-- plugins/dbms/sybase/enumeration.py | 3 +++ plugins/generic/enumeration.py | 3 +-- 4 files changed, 8 insertions(+), 4 deletions(-) diff --git a/plugins/dbms/maxdb/enumeration.py b/plugins/dbms/maxdb/enumeration.py index 2afb0b350..b88007392 100644 --- a/plugins/dbms/maxdb/enumeration.py +++ b/plugins/dbms/maxdb/enumeration.py @@ -85,6 +85,9 @@ class Enumeration(GenericEnumeration): else: kb.data.cachedTables[db].append(table) + for db, tables in kb.data.cachedTables.items(): + kb.data.cachedTables[db] = sorted(tables) if tables else tables + return kb.data.cachedTables def getColumns(self, onlyColNames=False): diff --git a/plugins/dbms/mssqlserver/enumeration.py b/plugins/dbms/mssqlserver/enumeration.py index b67cdcc45..4de6e283f 100644 --- a/plugins/dbms/mssqlserver/enumeration.py +++ b/plugins/dbms/mssqlserver/enumeration.py @@ -141,8 +141,7 @@ class Enumeration(GenericEnumeration): raise sqlmapNoneDataException(errMsg) else: for db, tables in kb.data.cachedTables.items(): - if tables: - kb.data.cachedTables[db] = sorted(tables) + kb.data.cachedTables[db] = sorted(tables) if tables else tables return kb.data.cachedTables diff --git a/plugins/dbms/sybase/enumeration.py b/plugins/dbms/sybase/enumeration.py index 64702cb21..f9cc21871 100644 --- a/plugins/dbms/sybase/enumeration.py +++ b/plugins/dbms/sybase/enumeration.py @@ -148,6 +148,9 @@ class Enumeration(GenericEnumeration): kb.data.cachedTables[db].append(table) break + for db, tables in kb.data.cachedTables.items(): + kb.data.cachedTables[db] = sorted(tables) if tables else tables + return kb.data.cachedTables def getColumns(self, onlyColNames=False): diff --git a/plugins/generic/enumeration.py b/plugins/generic/enumeration.py index f96367a8d..c311f45ed 100644 --- a/plugins/generic/enumeration.py +++ b/plugins/generic/enumeration.py @@ -974,8 +974,7 @@ class Enumeration: raise sqlmapNoneDataException, errMsg else: for db, tables in kb.data.cachedTables.items(): - if tables: - kb.data.cachedTables[db] = sorted(tables) + kb.data.cachedTables[db] = sorted(tables) if tables else tables return kb.data.cachedTables