Skip to content

Commit 8a57002

Browse files
committed
Fixes #4853
1 parent e7315cc commit 8a57002

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

lib/core/common.py

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -590,10 +590,13 @@ def isVersionGreaterOrEqualThan(version):
590590
retVal = False
591591

592592
if Backend.getVersion() is not None and version is not None:
593+
_version = unArrayizeValue(Backend.getVersion())
594+
_version = re.sub(r"[<>= ]", "", _version)
595+
593596
try:
594-
retVal = LooseVersion(Backend.getVersion()) >= LooseVersion(version)
597+
retVal = LooseVersion(_version) >= LooseVersion(version)
595598
except:
596-
retVal = str(Backend.getVersion()) >= str(version)
599+
retVal = str(_version) >= str(version)
597600

598601
return retVal
599602

@@ -3563,6 +3566,8 @@ def unArrayizeValue(value):
35633566
35643567
>>> unArrayizeValue(['1'])
35653568
'1'
3569+
>>> unArrayizeValue('1')
3570+
'1'
35663571
>>> unArrayizeValue(['1', '2'])
35673572
'1'
35683573
>>> unArrayizeValue([['a', 'b'], 'c'])

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
from thirdparty.six import unichr as _unichr
2121

2222
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
23-
VERSION = "1.5.10.16"
23+
VERSION = "1.5.10.17"
2424
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2525
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2626
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

0 commit comments

Comments
 (0)