File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66"""
77
88import logging
9- import StringIO
109import sys
1110
1211from lib .core .enums import CUSTOM_LOGGING
13- from thirdparty .ansistrm .ansistrm import ColorizingStreamHandler
1412
1513logging .addLevelName (CUSTOM_LOGGING .PAYLOAD , "PAYLOAD" )
1614logging .addLevelName (CUSTOM_LOGGING .TRAFFIC_OUT , "TRAFFIC OUT" )
2018
2119LOGGER_HANDLER = None
2220try :
23- import ctypes
21+ from thirdparty .ansistrm .ansistrm import ColorizingStreamHandler
22+
2423 LOGGER_HANDLER = ColorizingStreamHandler (sys .stdout )
2524 LOGGER_HANDLER .level_map [logging .getLevelName ("PAYLOAD" )] = (None , "cyan" , False )
2625 LOGGER_HANDLER .level_map [logging .getLevelName ("TRAFFIC OUT" )] = (None , "magenta" , False )
Original file line number Diff line number Diff line change 5454from lib .core .common import urlencode
5555from lib .core .convert import base64pickle
5656from lib .core .convert import base64unpickle
57- from lib .core .convert import jsonize
5857from lib .core .data import conf
5958from lib .core .data import kb
6059from lib .core .data import logger
Original file line number Diff line number Diff line change 1111import urllib
1212import urllib2
1313
14- from lib .core .exception import SqlmapUnsupportedFeatureException
15-
1614
1715class ProxyHTTPConnection (httplib .HTTPConnection ):
1816 _ports = {"http" : 80 , "https" : 443 }
Original file line number Diff line number Diff line change 1313from lib .core .common import isInferenceAvailable
1414from lib .core .common import isListLike
1515from lib .core .common import isNoneValue
16- from lib .core .common import isNullValue
1716from lib .core .common import isNumPosStrValue
1817from lib .core .common import isTechniqueAvailable
1918from lib .core .common import parseSqliteTableSchema
Original file line number Diff line number Diff line change 11#
22# Copyright (C) 2010-2012 Vinay Sajip. All rights reserved. Licensed under the new BSD license.
33#
4+ import ctypes
45import logging
56import os
67import re
@@ -69,7 +70,6 @@ def emit(self, record):
6970 def output_colorized (self , message ):
7071 self .stream .write (message )
7172 else :
72- import re
7373 ansi_esc = re .compile (r'\x1b\[((?:\d+)(?:;(?:\d+))*)m' )
7474
7575 nt_color_map = {
@@ -84,8 +84,6 @@ def output_colorized(self, message):
8484 }
8585
8686 def output_colorized (self , message ):
87- import ctypes
88-
8987 parts = self .ansi_esc .split (message )
9088 write = self .stream .write
9189 h = None
You can’t perform that action at this time.
0 commit comments