mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-08-02 11:20:10 +03:00
Merge c924582df3
into c5f3c0cc32
This commit is contained in:
commit
37c6f56995
|
@ -508,7 +508,9 @@ def _setResultsFile():
|
|||
return
|
||||
|
||||
if not conf.resultsFP:
|
||||
if not len(conf.resultsFilename):
|
||||
conf.resultsFilename = os.path.join(paths.SQLMAP_OUTPUT_PATH, time.strftime(RESULTS_FILE_FORMAT).lower())
|
||||
|
||||
try:
|
||||
conf.resultsFP = openFile(conf.resultsFilename, "w+", UNICODE_ENCODING, buffering=0)
|
||||
except (OSError, IOError), ex:
|
||||
|
|
|
@ -610,6 +610,12 @@ def cmdLineParser():
|
|||
help="Log all HTTP traffic into a "
|
||||
"textual file")
|
||||
|
||||
general.add_option("--crawl-file", dest="crawlFile", action="store",
|
||||
help="Destination file for crawled links")
|
||||
|
||||
general.add_option("--results-file", dest="resultsFilename", action="store",
|
||||
help="Destination file for results in multi-target mode")
|
||||
|
||||
general.add_option("--batch", dest="batch",
|
||||
action="store_true",
|
||||
help="Never ask for user input, use the default behaviour")
|
||||
|
|
|
@ -186,10 +186,12 @@ def storeResultsToFile(results):
|
|||
test = readInput(message, default="N")
|
||||
kb.storeCrawlingChoice = test[0] in ("y", "Y")
|
||||
|
||||
if kb.storeCrawlingChoice:
|
||||
if kb.storeCrawlingChoice or conf.crawlFile:
|
||||
if conf.crawlFile:
|
||||
filename = conf.crawlFile
|
||||
else:
|
||||
handle, filename = tempfile.mkstemp(prefix="sqlmapcrawling-", suffix=".csv" if conf.forms else ".txt")
|
||||
os.close(handle)
|
||||
|
||||
infoMsg = "writing crawling results to a temporary file '%s' " % filename
|
||||
logger.info(infoMsg)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user