From 193889e97f66239ae97169f76ff74ecd399a8af6 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 4 Jun 2019 14:59:01 +0200 Subject: [PATCH] Bug fix for --disable-coloring --- lib/core/common.py | 2 +- lib/core/settings.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/core/common.py b/lib/core/common.py index 2e11945ba..5fcfc68ee 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -931,7 +931,7 @@ def setColor(message, color=None, bold=False, level=None, istty=None): retVal = message level = level or extractRegexResult(r"\[(?P%s)\]" % '|'.join(_[0] for _ in getPublicTypeMembers(LOGGING_LEVELS)), message) - if message and IS_TTY or istty: # colorizing handler + if message and (IS_TTY or istty) and not conf.get("disableColoring"): # colorizing handler if bold or color: retVal = colored(message, color=color, on_color=None, attrs=("bold",) if bold else None) elif level: diff --git a/lib/core/settings.py b/lib/core/settings.py index f6b148fbd..c1248418b 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -18,7 +18,7 @@ from lib.core.enums import OS from thirdparty.six import unichr as _unichr # sqlmap version (...) -VERSION = "1.3.6.13" +VERSION = "1.3.6.14" 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)