mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 09:36:35 +03:00
one more commit related to the issue with displaying of garbled characters
This commit is contained in:
parent
04986be4b9
commit
bb99bd2fbe
|
@ -72,7 +72,7 @@ from lib.core.settings import REVISION
|
|||
from lib.core.settings import VERSION_STRING
|
||||
from lib.core.settings import SITE
|
||||
from lib.core.settings import ERROR_PARSING_REGEXES
|
||||
from lib.core.settings import NON_PRINTABLE_CHAR_REGEX
|
||||
from lib.core.settings import PRINTABLE_CHAR_REGEX
|
||||
from lib.core.settings import SQL_STATEMENTS
|
||||
from lib.core.settings import SUPPORTED_DBMS
|
||||
from lib.core.settings import UNKNOWN_DBMS_VERSION
|
||||
|
@ -2131,7 +2131,7 @@ def filterControlChars(value):
|
|||
Returns string value with control chars being supstituted with ' '
|
||||
"""
|
||||
|
||||
return filterStringValue(value, NON_PRINTABLE_CHAR_REGEX, ' ')
|
||||
return filterStringValue(value, PRINTABLE_CHAR_REGEX, ' ')
|
||||
|
||||
def isDBMSVersionAtLeast(version):
|
||||
"""
|
||||
|
|
|
@ -57,7 +57,7 @@ URI_QUESTION_MARKER = "__QUESTION_MARK__"
|
|||
|
||||
PAYLOAD_DELIMITER = "\x00"
|
||||
CHAR_INFERENCE_MARK = "%c"
|
||||
NON_PRINTABLE_CHAR_REGEX = r'[^\x00-\x1f\x7f-\xff]'
|
||||
PRINTABLE_CHAR_REGEX = r'[^\x00-\x1f\x7e-\xff]'
|
||||
|
||||
# dumping characters used in GROUP_CONCAT MySQL technique
|
||||
CONCAT_ROW_DELIMITER = ','
|
||||
|
|
|
@ -136,7 +136,7 @@ def __errorFields(expression, expressionFields, expressionFieldsList, expected=N
|
|||
output = __oneShotErrorUse(expressionReplaced, field)
|
||||
|
||||
if output is not None:
|
||||
dataToStdout("[%s] [INFO] retrieved: %s\r\n" % (time.strftime("%X"), safecharencode(replaceNewlineTabs(output, stdout=True))))
|
||||
dataToStdout("[%s] [INFO] retrieved: %s\r\n" % (time.strftime("%X"), safecharencode(output)))
|
||||
|
||||
if isinstance(num, int):
|
||||
expression = origExpr
|
||||
|
|
|
@ -24,6 +24,7 @@ from lib.core.common import isNumPosStrValue
|
|||
from lib.core.common import listToStrValue
|
||||
from lib.core.common import parseUnionPage
|
||||
from lib.core.common import removeReflectiveValues
|
||||
from lib.core.convert import safecharencode
|
||||
from lib.core.data import conf
|
||||
from lib.core.data import kb
|
||||
from lib.core.data import logger
|
||||
|
@ -253,7 +254,7 @@ def unionUse(expression, unpack=True, dump=False):
|
|||
|
||||
if conf.verbose == 1:
|
||||
items = output.replace(kb.misc.start, "").replace(kb.misc.stop, "").split(kb.misc.delimiter)
|
||||
status = "[%s] [INFO] retrieved: %s\r\n" % (time.strftime("%X"), ",".join(map(lambda x: "\"%s\"" % x, items)))
|
||||
status = "[%s] [INFO] retrieved: %s\r\n" % (time.strftime("%X"), safecharencode(",".join(map(lambda x: "\"%s\"" % x, items))))
|
||||
if len(status) > width:
|
||||
status = "%s..." % status[:width - 3]
|
||||
dataToStdout(status, True)
|
||||
|
|
Loading…
Reference in New Issue
Block a user