diff --git a/lib/core/common.py b/lib/core/common.py index da4d0c8a0..ab08b5e9f 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -3549,7 +3549,7 @@ def openFile(filename, mode='r', encoding=UNICODE_ENCODING, errors="reversible", except IOError: errMsg = "there has been a file opening error for filename '%s'. " % filename errMsg += "Please check %s permissions on a file " % ("write" if mode and ('w' in mode or 'a' in mode or '+' in mode) else "read") - errMsg += "and that it's not locked by another process." + errMsg += "and that it's not locked by another process" raise SqlmapSystemException(errMsg) def decodeIntToUnicode(value): diff --git a/lib/core/dump.py b/lib/core/dump.py index d49970a5f..a266e6426 100644 --- a/lib/core/dump.py +++ b/lib/core/dump.py @@ -617,7 +617,7 @@ class Dump(object): warnMsg = "writing binary ('%s') content to file '%s' " % (mimetype, filepath) logger.warn(warnMsg) - with open(filepath, "wb") as f: + with openFile(filepath, "w+b", None) as f: _ = safechardecode(value, True) f.write(_) diff --git a/lib/core/settings.py b/lib/core/settings.py index d7357d559..0c9775159 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -18,7 +18,7 @@ from lib.core.enums import OS from thirdparty.six import unichr as _unichr # sqlmap version (...) -VERSION = "1.3.7.14" +VERSION = "1.3.7.15" TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable" TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34} VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)