Proper patch for #5688

This commit is contained in:
Miroslav Stampar
2024-04-12 17:32:38 +02:00
parent dce99e0b40
commit 1e9e33d9c3
3 changed files with 7 additions and 4 deletions

View File

@@ -20,7 +20,7 @@ from thirdparty import six
from thirdparty.six import unichr as _unichr
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.8.4.2"
VERSION = "1.8.4.3"
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)

View File

@@ -68,7 +68,10 @@ def configFileParser(configFile):
try:
config = UnicodeRawConfigParser()
config.readfp(configFP)
if hasattr(config, "read_file"):
config.read_file(configFP)
else:
config.readfp(configFP)
except Exception as ex:
errMsg = "you have provided an invalid and/or unreadable configuration file ('%s')" % getSafeExString(ex)
raise SqlmapSyntaxException(errMsg)