mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-07 13:11:29 +00:00
fixing problems with chars deletition by logging messages in inference mode
This commit is contained in:
@@ -81,6 +81,7 @@ from lib.core.settings import DEFAULT_GET_POST_DELIMITER
|
||||
from lib.core.settings import DEFAULT_PAGE_ENCODING
|
||||
from lib.core.settings import DEFAULT_TOR_HTTP_PORTS
|
||||
from lib.core.settings import DEFAULT_TOR_SOCKS_PORT
|
||||
from lib.core.settings import FORMATTER
|
||||
from lib.core.settings import IS_WIN
|
||||
from lib.core.settings import NULL
|
||||
from lib.core.settings import PYVERSION
|
||||
@@ -393,6 +394,22 @@ def __setMultipleTargets():
|
||||
infoMsg += "testable requests from the targets list"
|
||||
logger.info(infoMsg)
|
||||
|
||||
def __adjustFormatter():
|
||||
"""
|
||||
Solves problem of line deletition caused by overlapping logging messages
|
||||
and retrieved data info in inference mode
|
||||
"""
|
||||
|
||||
def format(record):
|
||||
_ = FORMATTER._format(record)
|
||||
if FORMATTER._prepend_flag:
|
||||
_ = "\n%s" % _
|
||||
FORMATTER._prepend_flag = False
|
||||
return _
|
||||
FORMATTER._format = FORMATTER.format
|
||||
FORMATTER._prepend_flag = False
|
||||
FORMATTER.format = format
|
||||
|
||||
def __setRequestFromFile():
|
||||
"""
|
||||
This function checks if the way to make a HTTP request is through supplied
|
||||
@@ -1885,6 +1902,7 @@ def init(inputOptions=AttribDict(), overrideOptions=False):
|
||||
__checkDependencies()
|
||||
__basicOptionValidation()
|
||||
__setTorProxySettings()
|
||||
__adjustFormatter()
|
||||
__setMultipleTargets()
|
||||
__setTamperingFunctions()
|
||||
__setTrafficOutputFP()
|
||||
|
||||
Reference in New Issue
Block a user