mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-07-31 18:39:46 +03:00
Add command line option --result-file
This commit is contained in:
parent
eef2fc109a
commit
984943ee3c
|
@ -173,6 +173,7 @@ optDict = {
|
|||
"flushSession": "boolean",
|
||||
"forms": "boolean",
|
||||
"freshQueries": "boolean",
|
||||
"rfmt": "string",
|
||||
"hexConvert": "boolean",
|
||||
"parseErrors": "boolean",
|
||||
"replicate": "boolean",
|
||||
|
|
|
@ -328,7 +328,11 @@ def __setResultsFile():
|
|||
return
|
||||
|
||||
if not conf.resultsFP:
|
||||
conf.resultsFilename = "%s%s%s" % (paths.SQLMAP_OUTPUT_PATH, os.sep, time.strftime(RESULTS_FILE_FORMAT).lower())
|
||||
if conf.rfmt:
|
||||
conf.resultsFilename = "%s%s%s" % (paths.SQLMAP_OUTPUT_PATH, os.sep, conf.rfmt)
|
||||
else:
|
||||
conf.resultsFilename = "%s%s%s" % (paths.SQLMAP_OUTPUT_PATH, os.sep, time.strftime(RESULTS_FILE_FORMAT).lower())
|
||||
|
||||
conf.resultsFP = codecs.open(conf.resultsFilename, "w+", UNICODE_ENCODING)
|
||||
conf.resultsFP.writelines("Target url,Place,Parameter,Techniques%s" % os.linesep)
|
||||
|
||||
|
|
|
@ -535,6 +535,9 @@ def cmdLineParser():
|
|||
action="store_true",
|
||||
help="Ignores query results stored in session file")
|
||||
|
||||
general.add_option("--result-file", dest="rfmt",
|
||||
help="Result file name (time.strftime format string)")
|
||||
|
||||
general.add_option("--hex", dest="hexConvert",
|
||||
action="store_true",
|
||||
help="Uses DBMS hex function(s) for data retrieval")
|
||||
|
|
Loading…
Reference in New Issue
Block a user