diff --git a/lib/core/dump.py b/lib/core/dump.py index 9578c5d08..dae52f205 100644 --- a/lib/core/dump.py +++ b/lib/core/dump.py @@ -67,7 +67,7 @@ class Dump(object): def setOutputFile(self): self._outputFile = "%s%sstdout" % (conf.outputPath, os.sep) try: - self._outputFP = codecs.open(self._outputFile, "ab", UNICODE_ENCODING) + self._outputFP = codecs.open(self._outputFile, "ab" if not conf.flushSession else "wb", UNICODE_ENCODING) except IOError, ex: errMsg = "error occurred while opening log file ('%s')" % ex raise SqlmapGenericException, errMsg