From 6f17e84e191a684017f2036e10b1b266ff54b08d Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Thu, 30 Dec 2010 08:29:20 +0000 Subject: [PATCH] minor fix --- plugins/generic/enumeration.py | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/plugins/generic/enumeration.py b/plugins/generic/enumeration.py index ac8d7bc57..e32fcbef3 100644 --- a/plugins/generic/enumeration.py +++ b/plugins/generic/enumeration.py @@ -885,11 +885,23 @@ class Enumeration: def getColumns(self, onlyColNames=False): bruteForce = False + if not conf.tbl: + errMsg = "missing table parameter" + raise sqlmapMissingMandatoryOptionException, errMsg + if "." in conf.tbl: conf.db, conf.tbl = conf.tbl.split(".") self.forceDbmsEnum() + if not conf.db: + warnMsg = "missing database parameter, sqlmap is going to " + warnMsg += "use the current database to enumerate table " + warnMsg += "'%s' columns" % conf.tbl + logger.warn(warnMsg) + + conf.db = self.getCurrentDb() + if kb.dbms == DBMS.MYSQL and not kb.data.has_information_schema: errMsg = "information_schema not available, " errMsg += "back-end DBMS is MySQL < 5.0" @@ -928,18 +940,6 @@ class Enumeration: else: return columnExists(paths.COMMON_COLUMNS) - if not conf.tbl: - errMsg = "missing table parameter" - raise sqlmapMissingMandatoryOptionException, errMsg - - if not conf.db: - warnMsg = "missing database parameter, sqlmap is going to " - warnMsg += "use the current database to enumerate table " - warnMsg += "'%s' columns" % conf.tbl - logger.warn(warnMsg) - - conf.db = self.getCurrentDb() - firebirdTypes = { "261":"BLOB", "14":"CHAR",