mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-04 06:50:14 +00:00
Minor refactoring
This commit is contained in:
parent
053b7d12b4
commit
14b7e655a9
5 changed files with 3 additions and 10 deletions
|
|
@ -6,11 +6,9 @@ See the file 'doc/COPYING' for copying permission
|
|||
"""
|
||||
|
||||
import logging
|
||||
import StringIO
|
||||
import sys
|
||||
|
||||
from lib.core.enums import CUSTOM_LOGGING
|
||||
from thirdparty.ansistrm.ansistrm import ColorizingStreamHandler
|
||||
|
||||
logging.addLevelName(CUSTOM_LOGGING.PAYLOAD, "PAYLOAD")
|
||||
logging.addLevelName(CUSTOM_LOGGING.TRAFFIC_OUT, "TRAFFIC OUT")
|
||||
|
|
@ -20,7 +18,8 @@ LOGGER = logging.getLogger("sqlmapLog")
|
|||
|
||||
LOGGER_HANDLER = None
|
||||
try:
|
||||
import ctypes
|
||||
from thirdparty.ansistrm.ansistrm import ColorizingStreamHandler
|
||||
|
||||
LOGGER_HANDLER = ColorizingStreamHandler(sys.stdout)
|
||||
LOGGER_HANDLER.level_map[logging.getLevelName("PAYLOAD")] = (None, "cyan", False)
|
||||
LOGGER_HANDLER.level_map[logging.getLevelName("TRAFFIC OUT")] = (None, "magenta", False)
|
||||
|
|
|
|||
|
|
@ -54,7 +54,6 @@ from lib.core.common import urldecode
|
|||
from lib.core.common import urlencode
|
||||
from lib.core.convert import base64pickle
|
||||
from lib.core.convert import base64unpickle
|
||||
from lib.core.convert import jsonize
|
||||
from lib.core.data import conf
|
||||
from lib.core.data import kb
|
||||
from lib.core.data import logger
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue