mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-27 18:09:01 +00:00
adding filtering of strings for control chars in blind inference mode (way to handle either errornous values, or either binary data)
This commit is contained in:
@@ -61,6 +61,7 @@ from lib.core.settings import IS_WIN
|
||||
from lib.core.settings import PLATFORM
|
||||
from lib.core.settings import SITE
|
||||
from lib.core.settings import ERROR_PARSING_REGEXES
|
||||
from lib.core.settings import NON_CONTROL_CHAR_REGEX
|
||||
from lib.core.settings import SQL_STATEMENTS
|
||||
from lib.core.settings import SUPPORTED_DBMS
|
||||
from lib.core.settings import UNKNOWN_DBMS_VERSION
|
||||
@@ -1823,6 +1824,13 @@ def filterStringValue(value, regex, replace=None):
|
||||
|
||||
return retVal
|
||||
|
||||
def filterControlChars(value):
|
||||
"""
|
||||
Returns string value with control
|
||||
chars being supstituted with ' '
|
||||
"""
|
||||
return filterStringValue(output, NON_CONTROL_CHAR_REGEX, ' ')
|
||||
|
||||
def isDBMSVersionAtLeast(version):
|
||||
"""
|
||||
Checks if the recognized DBMS version
|
||||
|
||||
@@ -52,7 +52,7 @@ DUMP_STOP_MARKER = "__STOP__"
|
||||
|
||||
PAYLOAD_DELIMITER = "\x00"
|
||||
CHAR_INFERENCE_MARK = "%c"
|
||||
READABLE_CHAR_REGEX = r'[\ -~]'
|
||||
NON_CONTROL_CHAR_REGEX = r'[^\x00-\x1f]'
|
||||
|
||||
# coefficient used for a time-based query delay checking (must be >= 7)
|
||||
TIME_STDEV_COEFF = 10
|
||||
|
||||
Reference in New Issue
Block a user