mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-07 13:11:29 +00:00
Minor refactoring for all that stickyness
This commit is contained in:
@@ -750,7 +750,7 @@ def dataToStdout(data, forceOutput=False, bold=False):
|
||||
if kb.get("multiThreadMode"):
|
||||
logging._releaseLock()
|
||||
|
||||
setFormatterPrependFlag(len(data) == 1 and data not in ('\n', '\r') or len(data) > 2 and data[0] == '\r' and data[-1] != '\n')
|
||||
kb.prependFlag = len(data) == 1 and data not in ('\n', '\r') or len(data) > 2 and data[0] == '\r' and data[-1] != '\n'
|
||||
|
||||
def dataToTrafficFile(data):
|
||||
if not conf.trafficFile:
|
||||
@@ -1559,7 +1559,9 @@ def clearConsoleLine(forceOutput=False):
|
||||
"""
|
||||
|
||||
dataToStdout("\r%s\r" % (" " * (getConsoleWidth() - 1)), forceOutput)
|
||||
setFormatterPrependFlag(False)
|
||||
|
||||
kb.prependFlag = False
|
||||
kb.stickyLevel = None
|
||||
|
||||
def parseXmlFile(xmlFile, handler):
|
||||
"""
|
||||
@@ -3158,14 +3160,6 @@ def extractExpectedValue(value, expected):
|
||||
|
||||
return value
|
||||
|
||||
def setFormatterPrependFlag(value=True):
|
||||
"""
|
||||
Sets logging formatter flag used for signaling if newline is needed before
|
||||
the logging message itself (used in inference mode)
|
||||
"""
|
||||
|
||||
FORMATTER._prepend_flag = value
|
||||
|
||||
def hashDBWrite(key, value, serialize=False):
|
||||
"""
|
||||
Helper function for writing session data to HashDB
|
||||
|
||||
Reference in New Issue
Block a user