This commit is contained in:
Miroslav Stampar 2021-10-16 23:20:33 +02:00
parent e7315ccd4d
commit 8a57002b26
2 changed files with 8 additions and 3 deletions

View File

@ -590,10 +590,13 @@ class Backend(object):
retVal = False
if Backend.getVersion() is not None and version is not None:
_version = unArrayizeValue(Backend.getVersion())
_version = re.sub(r"[<>= ]", "", _version)
try:
retVal = LooseVersion(Backend.getVersion()) >= LooseVersion(version)
retVal = LooseVersion(_version) >= LooseVersion(version)
except:
retVal = str(Backend.getVersion()) >= str(version)
retVal = str(_version) >= str(version)
return retVal
@ -3563,6 +3566,8 @@ def unArrayizeValue(value):
>>> unArrayizeValue(['1'])
'1'
>>> unArrayizeValue('1')
'1'
>>> unArrayizeValue(['1', '2'])
'1'
>>> unArrayizeValue([['a', 'b'], 'c'])

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.5.10.16"
VERSION = "1.5.10.17"
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)