mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 17:46:37 +03:00
conf->kb
This commit is contained in:
parent
1d2c87e24e
commit
77b275f1a6
|
@ -696,43 +696,43 @@ def singleTimeLogMessage(message, level=logging.INFO, flag=None):
|
|||
|
||||
def setCurrentMessage(message):
|
||||
if "[CRITICAL]" in message:
|
||||
conf.currentMessage = "CRITICAL"
|
||||
kb.currentMessage = "CRITICAL"
|
||||
elif "[ERROR]" in message:
|
||||
conf.currentMessage = "ERROR"
|
||||
kb.currentMessage = "ERROR"
|
||||
elif "[WARNING]" in message:
|
||||
conf.currentMessage = "WARNING"
|
||||
kb.currentMessage = "WARNING"
|
||||
elif "[INFO]" in message:
|
||||
conf.currentMessage = "INFO"
|
||||
kb.currentMessage = "INFO"
|
||||
elif "[DEBUG]" in message:
|
||||
conf.currentMessage = "DEBUG"
|
||||
kb.currentMessage = "DEBUG"
|
||||
elif "[PAYLOAD]" in message:
|
||||
conf.currentMessage = "PAYLOAD"
|
||||
kb.currentMessage = "PAYLOAD"
|
||||
elif "[TRAFFIC OUT]" in message:
|
||||
conf.currentMessage = "TRAFFIC OUT"
|
||||
kb.currentMessage = "TRAFFIC OUT"
|
||||
elif "[TRAFFIC IN]" in message:
|
||||
conf.currentMessage = "TRAFFIC IN"
|
||||
kb.currentMessage = "TRAFFIC IN"
|
||||
|
||||
def setColour(message):
|
||||
setCurrentMessage(message)
|
||||
|
||||
if not hasattr(conf, "currentMessage"):
|
||||
if not hasattr(kb, "currentMessage"):
|
||||
return message
|
||||
|
||||
if conf.currentMessage == "CRITICAL":
|
||||
if kb.currentMessage == "CRITICAL":
|
||||
return colored(message, 'white', on_color='on_red', attrs=['bold'])
|
||||
elif conf.currentMessage == "ERROR":
|
||||
elif kb.currentMessage == "ERROR":
|
||||
return colored(message, 'red', attrs=['bold'])
|
||||
elif conf.currentMessage == "WARNING":
|
||||
elif kb.currentMessage == "WARNING":
|
||||
return colored(message, 'yellow')
|
||||
elif conf.currentMessage == "INFO":
|
||||
elif kb.currentMessage == "INFO":
|
||||
return colored(message, 'green')
|
||||
elif conf.currentMessage == "DEBUG":
|
||||
elif kb.currentMessage == "DEBUG":
|
||||
return colored(message, 'blue')
|
||||
elif conf.currentMessage == "PAYLOAD":
|
||||
elif kb.currentMessage == "PAYLOAD":
|
||||
return colored(message, 'magenta')
|
||||
elif conf.currentMessage == "TRAFFIC OUT":
|
||||
elif kb.currentMessage == "TRAFFIC OUT":
|
||||
return colored(message, 'cyan')
|
||||
elif conf.currentMessage == "TRAFFIC IN":
|
||||
elif kb.currentMessage == "TRAFFIC IN":
|
||||
return colored(message, 'grey')
|
||||
else:
|
||||
return message
|
||||
|
|
|
@ -1380,7 +1380,6 @@ def __setConfAttributes():
|
|||
conf.authPassword = None
|
||||
conf.boundaries = []
|
||||
conf.cj = None
|
||||
conf.currentMessage = None
|
||||
conf.dbmsConnector = None
|
||||
conf.dbmsHandler = None
|
||||
conf.dnsServer = None
|
||||
|
@ -1437,6 +1436,7 @@ def __setKnowledgeBaseAttributes(flushAll=True):
|
|||
|
||||
kb.commonOutputs = None
|
||||
kb.counters = {}
|
||||
kb.currentMessage = None
|
||||
kb.data = AttribDict()
|
||||
kb.dataOutputFlag = False
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user