MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / boldifyMessage

Function boldifyMessage

lib/core/common.py:950–966  ·  view source on GitHub ↗

Sets ANSI bold marking on entire message if parts found in predefined BOLD_PATTERNS >>> boldifyMessage("Hello World", istty=True) 'Hello World' >>> boldifyMessage("GET parameter id is not injectable", istty=True) '\\x1b[1mGET parameter id is not injectable\\x1b[0m'

(message, istty=None)

Source from the content-addressed store, hash-verified

948 logger.log(level, message)
949
950def boldifyMessage(message, istty=None):
951 """
952 Sets ANSI bold marking on entire message if parts found in predefined BOLD_PATTERNS
953
954 >>> boldifyMessage("Hello World", istty=True)
955 'Hello World'
956
957 >>> boldifyMessage("GET parameter id is not injectable", istty=True)
958 '\\x1b[1mGET parameter id is not injectable\\x1b[0m'
959 """
960
961 retVal = message
962
963 if re.search(BOLD_PATTERNS_REGEX, message):
964 retVal = setColor(message, bold=True, istty=istty)
965
966 return retVal
967
968def setColor(message, color=None, bold=False, level=None, istty=None):
969 """

Callers 1

formatFunction · 0.90

Calls 2

setColorFunction · 0.85
searchMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…