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