From bac53eeef1d569120410c7b74e72e6da533ba9cf Mon Sep 17 00:00:00 2001 From: Bernardo Damele Date: Thu, 7 Apr 2011 22:08:10 +0000 Subject: [PATCH] Allow --dump-all to accept -D switch in order to dump all tables' entries for only one (or more, comma-separated) specified database(s) --- doc/THANKS | 2 +- plugins/generic/enumeration.py | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/doc/THANKS b/doc/THANKS index 63ef20bbd..135242967 100644 --- a/doc/THANKS +++ b/doc/THANKS @@ -369,7 +369,7 @@ Sven Schluter each HTTP request Ryan Sears - for suggesting an enhancement + for suggesting a couple of enhancements Uemit Seren for reporting a minor adjustment when running with python 2.6 diff --git a/plugins/generic/enumeration.py b/plugins/generic/enumeration.py index 51ac9c0b8..252fb3c44 100644 --- a/plugins/generic/enumeration.py +++ b/plugins/generic/enumeration.py @@ -1466,7 +1466,16 @@ class Enumeration: errMsg += "back-end DBMS is MySQL < 5.0" raise sqlmapUnsupportedFeatureException, errMsg - conf.db = None + if conf.db is None: + infoMsg = "sqlmap will dump entries of all databases' tables now" + logger.info(infoMsg) + else: + infoMsg = "you provided database '%s'. sqlmap will " % conf.db + infoMsg += "dump all entries of this database's tables only. " + infoMsg += "If you wish to dump entries of all databases' " + infoMsg += "tables, run without the -D switch" + logger.info(infoMsg) + conf.tbl = None conf.col = None kb.data.cachedDbs = []