mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-02-01 19:19:10 +00:00
Moving binary to textual file openings
This commit is contained in:
@@ -110,7 +110,7 @@ class Dump(object):
|
||||
|
||||
self._outputFile = os.path.join(conf.outputPath, "log")
|
||||
try:
|
||||
self._outputFP = openFile(self._outputFile, "ab" if not conf.flushSession else "wb")
|
||||
self._outputFP = openFile(self._outputFile, 'a' if not conf.flushSession else 'w')
|
||||
except IOError as ex:
|
||||
errMsg = "error occurred while opening log file ('%s')" % getSafeExString(ex)
|
||||
raise SqlmapGenericException(errMsg)
|
||||
@@ -453,7 +453,7 @@ class Dump(object):
|
||||
dumpFileName = conf.dumpFile or os.path.join(dumpDbPath, re.sub(r'[\\/]', UNSAFE_DUMP_FILEPATH_REPLACEMENT, "%s.%s" % (unsafeSQLIdentificatorNaming(table), conf.dumpFormat.lower())))
|
||||
if not checkFile(dumpFileName, False):
|
||||
try:
|
||||
openFile(dumpFileName, "w+b").close()
|
||||
openFile(dumpFileName, "w+").close()
|
||||
except SqlmapSystemException:
|
||||
raise
|
||||
except:
|
||||
@@ -481,7 +481,7 @@ class Dump(object):
|
||||
else:
|
||||
count += 1
|
||||
|
||||
dumpFP = openFile(dumpFileName, "wb" if not appendToFile else "ab", buffering=DUMP_FILE_BUFFER_SIZE)
|
||||
dumpFP = openFile(dumpFileName, 'w' if not appendToFile else 'a', buffering=DUMP_FILE_BUFFER_SIZE)
|
||||
|
||||
count = int(tableValues["__infos__"]["count"])
|
||||
if count > TRIM_STDOUT_DUMP_SIZE:
|
||||
|
||||
Reference in New Issue
Block a user