Renaming conf.oDir to conf.outputDir

This commit is contained in:
Miroslav Stampar 2014-04-06 16:54:46 +02:00
parent 7cc4159316
commit 053b0fd0e9
5 changed files with 11 additions and 11 deletions

View File

@ -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:

View File

@ -191,7 +191,7 @@ optDict = {
"forms": "boolean",
"freshQueries": "boolean",
"hexConvert": "boolean",
"oDir": "string",
"outputDir": "string",
"parseErrors": "boolean",
"pivotColumn": "string",
"saveCmdline": "boolean",

View File

@ -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")

View File

@ -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:

View File

@ -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