mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-09 22:21:30 +00:00
Fixes #2910
This commit is contained in:
@@ -75,6 +75,7 @@ from lib.core.enums import EXPECTED
|
||||
from lib.core.enums import HEURISTIC_TEST
|
||||
from lib.core.enums import HTTP_HEADER
|
||||
from lib.core.enums import HTTPMETHOD
|
||||
from lib.core.enums import LOGGING_LEVELS
|
||||
from lib.core.enums import MKSTEMP_PREFIX
|
||||
from lib.core.enums import OPTION_TYPE
|
||||
from lib.core.enums import OS
|
||||
@@ -869,7 +870,10 @@ def boldifyMessage(message):
|
||||
|
||||
def setColor(message, bold=False):
|
||||
retVal = message
|
||||
level = extractRegexResult(r"\[(?P<result>%s)\]" % '|'.join(_ for _ in dir(logging) if _ == _.upper()), message) or kb.get("stickyLevel")
|
||||
level = extractRegexResult(r"\[(?P<result>%s)\]" % '|'.join(_[0] for _ in getPublicTypeMembers(LOGGING_LEVELS)), message) or kb.get("stickyLevel")
|
||||
|
||||
if isinstance(level, unicode):
|
||||
level = unicodeencode(level)
|
||||
|
||||
if message and getattr(LOGGER_HANDLER, "is_tty", False): # colorizing handler
|
||||
if bold:
|
||||
|
||||
@@ -22,6 +22,15 @@ class SORT_ORDER:
|
||||
FIFTH = 4
|
||||
LAST = 100
|
||||
|
||||
# Reference: https://docs.python.org/2/library/logging.html#logging-levels
|
||||
class LOGGING_LEVELS:
|
||||
NOTSET = 0
|
||||
DEBUG = 10
|
||||
INFO = 20
|
||||
WARNING = 30
|
||||
ERROR = 40
|
||||
CRITICAL = 50
|
||||
|
||||
class DBMS:
|
||||
ACCESS = "Microsoft Access"
|
||||
DB2 = "IBM DB2"
|
||||
|
||||
@@ -19,7 +19,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME
|
||||
from lib.core.enums import OS
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.2.2.0"
|
||||
VERSION = "1.2.2.1"
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user