Minor patch

This commit is contained in:
Miroslav Stampar 2021-01-29 14:38:13 +01:00
parent accfbf958e
commit 71c141ef86
3 changed files with 4 additions and 4 deletions

View File

@ -974,7 +974,7 @@ def setColor(message, color=None, bold=False, level=None, istty=None):
level = getattr(logging, level, None)
except:
level = None
retVal = LOGGER_HANDLER.colorize(message, level)
retVal = LOGGER_HANDLER.colorize(message, level, True)
else:
match = re.search(r"\(([^)]*)\s*fork\)", message)
if match:

View File

@ -22,8 +22,8 @@ try:
from thirdparty.ansistrm.ansistrm import ColorizingStreamHandler
class _ColorizingStreamHandler(ColorizingStreamHandler):
def colorize(self, message, levelno):
if levelno in self.level_map and self.is_tty:
def colorize(self, message, levelno, force=False):
if levelno in self.level_map and self.is_tty or force:
bg, fg, bold = self.level_map[levelno]
params = []

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.5.1.41"
VERSION = "1.5.1.42"
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)