This commit is contained in:
Miroslav Stampar 2021-01-05 14:50:54 +01:00
parent 91045aab60
commit c4e6c3e854
3 changed files with 6 additions and 2 deletions

View File

@ -1270,9 +1270,11 @@ def sanitizeStr(value):
>>> sanitizeStr('foo\\n\\rbar') == 'foo bar' >>> sanitizeStr('foo\\n\\rbar') == 'foo bar'
True True
>>> sanitizeStr(None) == 'None'
True
""" """
return getUnicode(value).replace("\n", " ").replace("\r", "") if value else value return getUnicode(value).replace("\n", " ").replace("\r", "")
def getHeader(headers, key): def getHeader(headers, key):
""" """

View File

@ -330,6 +330,8 @@ def getUnicode(value, encoding=None, noneToNull=False):
True True
>>> getUnicode(1) == u'1' >>> getUnicode(1) == u'1'
True True
>>> getUnicode(None) == 'None'
True
""" """
if noneToNull and value is None: if noneToNull and value is None:

View File

@ -18,7 +18,7 @@ from lib.core.enums import OS
from thirdparty.six import unichr as _unichr from thirdparty.six import unichr as _unichr
# sqlmap version (<major>.<minor>.<month>.<monthly commit>) # sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.5.1.7" VERSION = "1.5.1.8"
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable" TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34} 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) VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)