Minor layout adjustments

This commit is contained in:
Bernardo Damele 2010-10-15 15:37:15 +00:00
parent c9f0c75030
commit e7c8be1d45
3 changed files with 21 additions and 7 deletions

View File

@ -142,7 +142,7 @@ class Dump:
self.lister("available databases", dbs) self.lister("available databases", dbs)
def dbTables(self, dbTables): def dbTables(self, dbTables):
if isinstance(dbTables, list): if isinstance(dbTables, list) and len(dbTables) > 0:
maxlength = 0 maxlength = 0
for table in dbTables: for table in dbTables:
@ -152,6 +152,8 @@ class Dump:
dbTables.sort(key=lambda x: x.lower()) dbTables.sort(key=lambda x: x.lower())
self.__write("Brute-forced databases:")
if len(dbTables) == 1: if len(dbTables) == 1:
self.__write("[1 table]") self.__write("[1 table]")
else: else:
@ -165,7 +167,7 @@ class Dump:
self.__write("+%s+\n" % lines) self.__write("+%s+\n" % lines)
elif isinstance(dbTables, dict): elif isinstance(dbTables, dict) and len(dbTables) > 0:
maxlength = 0 maxlength = 0
for tables in dbTables.values(): for tables in dbTables.values():

View File

@ -828,12 +828,13 @@ class Enumeration:
retVal.append(table) retVal.append(table)
count += 1 count += 1
status = '%d/%d (%d%s)' % (count, length, round(100.0*count/length), '%') status = '%d/%d items (%d%s)' % (count, length, round(100.0*count/length), '%')
dataToStdout("\r[%s] [INFO] complete: %s" % (time.strftime("%X"), status), True) dataToStdout("\r[%s] [INFO] tried: %s" % (time.strftime("%X"), status), True)
conf.verbose = popValue() conf.verbose = popValue()
dataToStdout("\r%s\n" % (" "*(getConsoleWidth()-1)), True) dataToStdout("\n", True)
if not retVal: if not retVal:
warnMsg = "no table found" warnMsg = "no table found"
logger.warn(warnMsg) logger.warn(warnMsg)
@ -1712,8 +1713,8 @@ class Enumeration:
stackedTest() stackedTest()
if not kb.stackedTest and not conf.direct: if not kb.stackedTest and not conf.direct:
warnMsg = "sql query option is only available " warnMsg = "execution of custom SQL queries is only "
warnMsg += "when stacked queries are supported" warnMsg += "available when stacked queries are supported"
logger.warn(warnMsg) logger.warn(warnMsg)
return None return None
else: else:

View File

@ -358,6 +358,13 @@ query =
# Valid: True or False # Valid: True or False
sqlShell = 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. # These options can be used to create custom user-defined functions.
[User-defined function] [User-defined function]
@ -485,6 +492,10 @@ batch = False
# Valid: True or False # Valid: True or False
cleanup = False cleanup = False
# Replicate dumped data into a sqlite3 database.
# Valid: True or False
replicate = False
# Verbosity level. # Verbosity level.
# Valid: integer between 0 and 5 # Valid: integer between 0 and 5
# 0: Show only warning and error messages # 0: Show only warning and error messages