Allow --dump-all to accept -D switch in order to dump all tables' entries for only one (or more, comma-separated) specified database(s)

This commit is contained in:
Bernardo Damele 2011-04-07 22:08:10 +00:00
parent b288e5ef57
commit bac53eeef1
2 changed files with 11 additions and 2 deletions

View File

@ -369,7 +369,7 @@ Sven Schluter <sschlueter@netzwerk.cc>
each HTTP request
Ryan Sears <rdsears@mtu.edu>
for suggesting an enhancement
for suggesting a couple of enhancements
Uemit Seren <uemit.seren@gmail.com>
for reporting a minor adjustment when running with python 2.6

View File

@ -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 = []