mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-03 05:04:11 +03:00
Adding traffic in and out to color_map
This commit is contained in:
parent
43cac2212b
commit
15ee5310d9
|
@ -700,7 +700,7 @@ def setColor(message, bold=False):
|
|||
level = extractRegexResult(r"\A\s*\[(?P<result>[A-Z ]+)\]", message)
|
||||
|
||||
if hasattr(LOGGER_HANDLER, "level_map"):
|
||||
_ = LOGGER_HANDLER.level_map.get(logging._levelNames.get(level))
|
||||
_ = LOGGER_HANDLER.level_map.get(logging.getLevelName(level))
|
||||
if _:
|
||||
background, foreground, bold = _
|
||||
retVal = colored(message, color=foreground, on_color="on_%s" % background if background else None, attrs=("bold",) if bold else None)
|
||||
|
|
|
@ -21,6 +21,8 @@ LOGGER = logging.getLogger("sqlmapLog")
|
|||
try:
|
||||
import ctypes
|
||||
LOGGER_HANDLER = ColorizingStreamHandler(sys.stdout)
|
||||
LOGGER_HANDLER.level_map[logging.getLevelName("TRAFFIC OUT")] = (None, "cyan", True)
|
||||
LOGGER_HANDLER.level_map[logging.getLevelName("TRAFFIC IN")] = (None, "grey", True)
|
||||
except ImportError:
|
||||
LOGGER_HANDLER = logging.StreamHandler(sys.stdout)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user