Skip to content

Commit 7bc0b08

Browse files
committed
Implementing option '--dump-file' (#5238)
1 parent 62bba47 commit 7bc0b08

File tree

5 files changed

+9
-2
lines changed

5 files changed

+9
-2
lines changed

lib/core/dump.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -449,7 +449,7 @@ def dbTableValues(self, tableValues):
449449

450450
dumpDbPath = tempDir
451451

452-
dumpFileName = os.path.join(dumpDbPath, re.sub(r'[\\/]', UNSAFE_DUMP_FILEPATH_REPLACEMENT, "%s.%s" % (unsafeSQLIdentificatorNaming(table), conf.dumpFormat.lower())))
452+
dumpFileName = conf.dumpFile or os.path.join(dumpDbPath, re.sub(r'[\\/]', UNSAFE_DUMP_FILEPATH_REPLACEMENT, "%s.%s" % (unsafeSQLIdentificatorNaming(table), conf.dumpFormat.lower())))
453453
if not checkFile(dumpFileName, False):
454454
try:
455455
openFile(dumpFileName, "w+b").close()

lib/core/optiondict.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -215,6 +215,7 @@
215215
"crawlDepth": "integer",
216216
"crawlExclude": "string",
217217
"csvDel": "string",
218+
"dumpFile": "string",
218219
"dumpFormat": "string",
219220
"encoding": "string",
220221
"eta": "boolean",

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from thirdparty.six import unichr as _unichr
2121

2222
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
23-
VERSION = "1.6.11.3"
23+
VERSION = "1.6.11.4"
2424
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2525
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2626
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

lib/parse/cmdline.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -661,6 +661,9 @@ def cmdLineParser(argv=None):
661661
general.add_argument("--charset", dest="charset",
662662
help="Blind SQL injection charset (e.g. \"0123456789abcdef\")")
663663

664+
general.add_argument("--dump-file", dest="dumpFile",
665+
help="Store dumped data to a custom file")
666+
664667
general.add_argument("--dump-format", dest="dumpFormat",
665668
help="Format of dumped data (CSV (default), HTML or SQLITE)")
666669

sqlmap.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,9 @@ crawlExclude =
738738
# Default: ,
739739
csvDel = ,
740740

741+
# Store dumped data to a custom file.
742+
dumpFile =
743+
741744
# Format of dumped data
742745
# Valid: CSV, HTML or SQLITE
743746
dumpFormat = CSV

0 commit comments

Comments
 (0)