This commit is contained in:
Miroslav Stampar 2020-02-17 11:50:37 +01:00
parent f8b2cb5a0a
commit c3fe9a0d47
2 changed files with 7 additions and 3 deletions

View File

@ -4809,6 +4809,8 @@ def extractExpectedValue(value, expected):
True
>>> extractExpectedValue('1', EXPECTED.INT)
1
>>> extractExpectedValue('7\\xb9645', EXPECTED.INT) is None
True
"""
if expected:
@ -4832,8 +4834,10 @@ def extractExpectedValue(value, expected):
else:
value = None
elif expected == EXPECTED.INT:
if isinstance(value, six.string_types):
value = int(value) if value.isdigit() else None
try:
value = int(value)
except:
value = None
return value

View File

@ -18,7 +18,7 @@ from lib.core.enums import OS
from thirdparty.six import unichr as _unichr
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.4.2.34"
VERSION = "1.4.2.35"
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)