From 62e02cb730502f852da0d542cffd58220c1a58e0 Mon Sep 17 00:00:00 2001 From: ctshanghai Date: Mon, 3 Aug 2015 21:22:21 +0800 Subject: [PATCH] Added --crawl-file option Added --crawl-file option to specify the output file for crawler results. --- lib/parse/cmdline.py | 2 +- lib/utils/crawler.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/parse/cmdline.py b/lib/parse/cmdline.py index 05fbf99b0..3a218bc21 100644 --- a/lib/parse/cmdline.py +++ b/lib/parse/cmdline.py @@ -610,7 +610,7 @@ def cmdLineParser(): help="Log all HTTP traffic into a " "textual file") - general.add_option("--crawl-file", dest="batchCrawlFile", action="store", + general.add_option("--crawl-file", dest="crawlFile", action="store", help="Destination file for crawled links") general.add_option("--batch", dest="batch", diff --git a/lib/utils/crawler.py b/lib/utils/crawler.py index 539b53252..c42d25319 100644 --- a/lib/utils/crawler.py +++ b/lib/utils/crawler.py @@ -186,9 +186,9 @@ def storeResultsToFile(results): test = readInput(message, default="N") kb.storeCrawlingChoice = test[0] in ("y", "Y") - if kb.storeCrawlingChoice or conf.batchCrawlFile: - if conf.batchCrawlFile: - filename = conf.batchCrawlFile + 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)