From 053b0fd0e9a5a3a13e289ce3eace55930b1f4e2a Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Sun, 6 Apr 2014 16:54:46 +0200 Subject: [PATCH] Renaming conf.oDir to conf.outputDir --- lib/core/option.py | 4 ++-- lib/core/optiondict.py | 2 +- lib/parse/cmdline.py | 2 +- lib/utils/api.py | 12 ++++++------ sqlmap.conf | 2 +- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/core/option.py b/lib/core/option.py index 960747e14..488f4c35e 100644 --- a/lib/core/option.py +++ b/lib/core/option.py @@ -1507,8 +1507,8 @@ def _cleanupOptions(): if conf.torType: conf.torType = conf.torType.upper() - if conf.oDir: - paths.SQLMAP_OUTPUT_PATH = conf.oDir + if conf.outputDir: + paths.SQLMAP_OUTPUT_PATH = conf.outputDir setPaths() if conf.string: diff --git a/lib/core/optiondict.py b/lib/core/optiondict.py index 338c686e8..7bede5304 100644 --- a/lib/core/optiondict.py +++ b/lib/core/optiondict.py @@ -191,7 +191,7 @@ optDict = { "forms": "boolean", "freshQueries": "boolean", "hexConvert": "boolean", - "oDir": "string", + "outputDir": "string", "parseErrors": "boolean", "pivotColumn": "string", "saveCmdline": "boolean", diff --git a/lib/parse/cmdline.py b/lib/parse/cmdline.py index 59fde8517..27b29eb6b 100644 --- a/lib/parse/cmdline.py +++ b/lib/parse/cmdline.py @@ -611,7 +611,7 @@ def cmdLineParser(): action="store_true", help="Use DBMS hex function(s) for data retrieval") - general.add_option("--output-dir", dest="oDir", + general.add_option("--output-dir", dest="outputDir", action="store", help="Custom output directory path") diff --git a/lib/utils/api.py b/lib/utils/api.py index 7d1aafa3a..7a22bb123 100644 --- a/lib/utils/api.py +++ b/lib/utils/api.py @@ -144,20 +144,20 @@ class Task(object): self.options = AttribDict(self._original_options) def set_output_directory(self): - if self.get_option("oDir"): - if os.path.isdir(self.get_option("oDir")): - self.output_directory = self.get_option("oDir") + if self.get_option("outputDir"): + if os.path.isdir(self.get_option("outputDir")): + self.output_directory = self.get_option("outputDir") else: try: - os.makedirs(self.get_option("oDir")) - self.output_directory = self.get_option("oDir") + os.makedirs(self.get_option("outputDir")) + self.output_directory = self.get_option("outputDir") except OSError: pass if not self.output_directory or not os.path.isdir(self.output_directory): self.output_directory = tempfile.mkdtemp(prefix="sqlmapoutput-") self.temporary_directory = True - self.set_option("oDir", self.output_directory) + self.set_option("outputDir", self.output_directory) def clean_filesystem(self): if self.output_directory and self.temporary_directory: diff --git a/sqlmap.conf b/sqlmap.conf index 210fa4259..800c2d111 100644 --- a/sqlmap.conf +++ b/sqlmap.conf @@ -664,7 +664,7 @@ freshQueries = False hexConvert = False # Custom output directory path. -oDir = +outputDir = # Parse and display DBMS error messages from responses. # Valid: True or False