Handle unicode strings in color stripping

This commit is contained in:
Your Name 2026-06-02 13:40:50 +02:00
parent aa0fb23314
commit bc252ef010
3 changed files with 4 additions and 4 deletions

View file

@ -1018,7 +1018,7 @@ def clearColors(message):
retVal = message
if isinstance(message, str):
if isinstance(message, six.string_types):
retVal = re.sub(r"\x1b\[[\d;]+m", "", message)
return retVal

View file

@ -20,7 +20,7 @@ from lib.core.enums import OS
from thirdparty import six
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.10.6.4"
VERSION = "1.10.6.5"
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)