From e7c8be1d453ea89afb6172c379f27adb4fb5e64b Mon Sep 17 00:00:00 2001 From: Bernardo Damele Date: Fri, 15 Oct 2010 15:37:15 +0000 Subject: [PATCH] Minor layout adjustments --- lib/core/dump.py | 6 ++++-- plugins/generic/enumeration.py | 11 ++++++----- sqlmap.conf | 11 +++++++++++ 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/lib/core/dump.py b/lib/core/dump.py index 60e6cdf30..8b3be65a3 100644 --- a/lib/core/dump.py +++ b/lib/core/dump.py @@ -142,7 +142,7 @@ class Dump: self.lister("available databases", dbs) def dbTables(self, dbTables): - if isinstance(dbTables, list): + if isinstance(dbTables, list) and len(dbTables) > 0: maxlength = 0 for table in dbTables: @@ -152,6 +152,8 @@ class Dump: dbTables.sort(key=lambda x: x.lower()) + self.__write("Brute-forced databases:") + if len(dbTables) == 1: self.__write("[1 table]") else: @@ -165,7 +167,7 @@ class Dump: self.__write("+%s+\n" % lines) - elif isinstance(dbTables, dict): + elif isinstance(dbTables, dict) and len(dbTables) > 0: maxlength = 0 for tables in dbTables.values(): diff --git a/plugins/generic/enumeration.py b/plugins/generic/enumeration.py index 4a7310ebe..1d7b43f5e 100644 --- a/plugins/generic/enumeration.py +++ b/plugins/generic/enumeration.py @@ -828,12 +828,13 @@ class Enumeration: retVal.append(table) count += 1 - status = '%d/%d (%d%s)' % (count, length, round(100.0*count/length), '%') - dataToStdout("\r[%s] [INFO] complete: %s" % (time.strftime("%X"), status), True) + status = '%d/%d items (%d%s)' % (count, length, round(100.0*count/length), '%') + dataToStdout("\r[%s] [INFO] tried: %s" % (time.strftime("%X"), status), True) conf.verbose = popValue() - dataToStdout("\r%s\n" % (" "*(getConsoleWidth()-1)), True) + dataToStdout("\n", True) + if not retVal: warnMsg = "no table found" logger.warn(warnMsg) @@ -1712,8 +1713,8 @@ class Enumeration: stackedTest() if not kb.stackedTest and not conf.direct: - warnMsg = "sql query option is only available " - warnMsg += "when stacked queries are supported" + warnMsg = "execution of custom SQL queries is only " + warnMsg += "available when stacked queries are supported" logger.warn(warnMsg) return None else: diff --git a/sqlmap.conf b/sqlmap.conf index eb90fd83a..47d6dcd46 100644 --- a/sqlmap.conf +++ b/sqlmap.conf @@ -358,6 +358,13 @@ query = # Valid: True or False sqlShell = False +# Check existence of common tables. +# Valid: True or False +cExists = False + +# Check existence of user specified tables. +# Valid: text file containing one table name per line +tableFile = # These options can be used to create custom user-defined functions. [User-defined function] @@ -485,6 +492,10 @@ batch = False # Valid: True or False cleanup = False +# Replicate dumped data into a sqlite3 database. +# Valid: True or False +replicate = False + # Verbosity level. # Valid: integer between 0 and 5 # 0: Show only warning and error messages