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

@@ -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)