mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-27 04:05:58 +00:00
Minor refactoring for all that stickyness
This commit is contained in:
parent
64143a146f
commit
8e18514e56
3 changed files with 9 additions and 15 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue