mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-24 00:19:02 +00:00
Fixes #3534
This commit is contained in:
@@ -1810,6 +1810,10 @@ def normalizePath(filepath):
|
||||
return retVal
|
||||
|
||||
def safeFilepathEncode(filepath):
|
||||
"""
|
||||
Returns filepath in (ASCII) format acceptable for OS handling (e.g. reading)
|
||||
"""
|
||||
|
||||
retVal = filepath
|
||||
|
||||
if filepath and isinstance(filepath, unicode):
|
||||
|
||||
@@ -773,7 +773,7 @@ def _setTamperingFunctions():
|
||||
try:
|
||||
module = __import__(safeFilepathEncode(filename[:-3]))
|
||||
except Exception as ex:
|
||||
raise SqlmapSyntaxException("cannot import tamper module '%s' (%s)" % (filename[:-3], getSafeExString(ex)))
|
||||
raise SqlmapSyntaxException("cannot import tamper module '%s' (%s)" % (getUnicode(filename[:-3]), getSafeExString(ex)))
|
||||
|
||||
priority = PRIORITY.NORMAL if not hasattr(module, "__priority__") else module.__priority__
|
||||
|
||||
@@ -807,7 +807,7 @@ def _setTamperingFunctions():
|
||||
function()
|
||||
except Exception as ex:
|
||||
errMsg = "error occurred while checking dependencies "
|
||||
errMsg += "for tamper module '%s' ('%s')" % (filename[:-3], getSafeExString(ex))
|
||||
errMsg += "for tamper module '%s' ('%s')" % (getUnicode(filename[:-3]), getSafeExString(ex))
|
||||
raise SqlmapGenericException(errMsg)
|
||||
|
||||
if not found:
|
||||
@@ -870,7 +870,7 @@ def _setPreprocessFunctions():
|
||||
try:
|
||||
module = __import__(safeFilepathEncode(filename[:-3]))
|
||||
except Exception as ex:
|
||||
raise SqlmapSyntaxException("cannot import preprocess module '%s' (%s)" % (filename[:-3], getSafeExString(ex)))
|
||||
raise SqlmapSyntaxException("cannot import preprocess module '%s' (%s)" % (getUnicode(filename[:-3]), getSafeExString(ex)))
|
||||
|
||||
for name, function in inspect.getmembers(module, inspect.isfunction):
|
||||
if name == "preprocess" and inspect.getargspec(function).args and all(_ in inspect.getargspec(function).args for _ in ("page", "headers", "code")):
|
||||
@@ -925,7 +925,7 @@ def _setWafFunctions():
|
||||
del sys.modules[filename[:-3]]
|
||||
module = __import__(safeFilepathEncode(filename[:-3]))
|
||||
except ImportError as ex:
|
||||
raise SqlmapSyntaxException("cannot import WAF script '%s' (%s)" % (filename[:-3], getSafeExString(ex)))
|
||||
raise SqlmapSyntaxException("cannot import WAF script '%s' (%s)" % (getUnicode(filename[:-3]), getSafeExString(ex)))
|
||||
|
||||
_ = dict(inspect.getmembers(module))
|
||||
if "detect" not in _:
|
||||
|
||||
@@ -19,7 +19,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME
|
||||
from lib.core.enums import OS
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.3.3.24"
|
||||
VERSION = "1.3.3.26"
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user