mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-07 05:01:30 +00:00
Adding switch --output-dir (Issue #53)
This commit is contained in:
@@ -25,6 +25,7 @@ from lib.core.data import conf
|
||||
from lib.core.data import kb
|
||||
from lib.core.data import logger
|
||||
from lib.core.enums import DBMS
|
||||
from lib.core.exception import sqlmapGenericException
|
||||
from lib.core.exception import sqlmapValueException
|
||||
from lib.core.replication import Replication
|
||||
from lib.core.settings import BLANK
|
||||
@@ -61,7 +62,11 @@ class Dump:
|
||||
|
||||
def setOutputFile(self):
|
||||
self._outputFile = "%s%slog" % (conf.outputPath, os.sep)
|
||||
self._outputFP = codecs.open(self._outputFile, "ab", UNICODE_ENCODING)
|
||||
try:
|
||||
self._outputFP = codecs.open(self._outputFile, "ab", UNICODE_ENCODING)
|
||||
except IOError, ex:
|
||||
errMsg = "error occurred while opening log file ('%s')" % ex
|
||||
raise sqlmapGenericException, errMsg
|
||||
|
||||
def getOutputFile(self):
|
||||
return self._outputFile
|
||||
|
||||
Reference in New Issue
Block a user