@@ -512,22 +512,18 @@ def _createTargetDirs():
512512
513513 if not os .path .isdir (paths .SQLMAP_OUTPUT_PATH ):
514514 try :
515- os .makedirs (paths .SQLMAP_OUTPUT_PATH , 0755 )
516- except OSError , ex :
517- paths .SQLMAP_OUTPUT_PATH = os .path .join (os .path .expanduser ("~" ), ".sqlmap" , "output" )
518- try :
519- if not os .path .isdir (paths .SQLMAP_OUTPUT_PATH ):
520- os .makedirs (paths .SQLMAP_OUTPUT_PATH , 0755 )
521- warnMsg = "using '%s' as the output directory" % paths .SQLMAP_OUTPUT_PATH
522- logger .warn (warnMsg )
523- except OSError , ex :
524- tempDir = tempfile .mkdtemp (prefix = "sqlmapoutput" )
525- warnMsg = "unable to create regular output directory "
526- warnMsg += "'%s' (%s). " % (paths .SQLMAP_OUTPUT_PATH , ex )
527- warnMsg += "Using temporary directory '%s' instead" % tempDir
528- logger .warn (warnMsg )
529-
530- paths .SQLMAP_OUTPUT_PATH = tempDir
515+ if not os .path .isdir (paths .SQLMAP_OUTPUT_PATH ):
516+ os .makedirs (paths .SQLMAP_OUTPUT_PATH , 0755 )
517+ warnMsg = "using '%s' as the output directory" % paths .SQLMAP_OUTPUT_PATH
518+ logger .warn (warnMsg )
519+ except OSError , ex :
520+ tempDir = tempfile .mkdtemp (prefix = "sqlmapoutput" )
521+ warnMsg = "unable to create regular output directory "
522+ warnMsg += "'%s' (%s). " % (paths .SQLMAP_OUTPUT_PATH , ex )
523+ warnMsg += "Using temporary directory '%s' instead" % tempDir
524+ logger .warn (warnMsg )
525+
526+ paths .SQLMAP_OUTPUT_PATH = tempDir
531527
532528 conf .outputPath = os .path .join (paths .SQLMAP_OUTPUT_PATH , getUnicode (conf .hostname ))
533529
0 commit comments