mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-09 14:11:29 +00:00
Implementation for an Issue #1360
This commit is contained in:
@@ -197,6 +197,7 @@ class HASHDB_KEYS:
|
||||
KB_CHARS = "KB_CHARS"
|
||||
KB_DYNAMIC_MARKINGS = "KB_DYNAMIC_MARKINGS"
|
||||
KB_INJECTIONS = "KB_INJECTIONS"
|
||||
KB_ERROR_CHUNK_LENGTH = "KB_ERROR_CHUNK_LENGTH"
|
||||
KB_XP_CMDSHELL_AVAILABLE = "KB_XP_CMDSHELL_AVAILABLE"
|
||||
OS = "OS"
|
||||
|
||||
|
||||
@@ -1792,6 +1792,7 @@ def _setKnowledgeBaseAttributes(flushAll=True):
|
||||
kb.endDetection = False
|
||||
kb.explicitSettings = set()
|
||||
kb.extendTests = None
|
||||
kb.errorChunkLength = None
|
||||
kb.errorIsNone = True
|
||||
kb.fileReadMode = False
|
||||
kb.followSitemapRecursion = None
|
||||
|
||||
@@ -323,11 +323,11 @@ CUSTOM_INJECTION_MARK_CHAR = '*'
|
||||
# Other way to declare injection position
|
||||
INJECT_HERE_MARK = '%INJECT HERE%'
|
||||
|
||||
# Maximum length used for retrieving data over MySQL error based payload due to "known" problems with longer result strings
|
||||
MYSQL_ERROR_CHUNK_LENGTH = 50
|
||||
# Minimum chunk length used for retrieving data over error based payloads
|
||||
MIN_ERROR_CHUNK_LENGTH = 8
|
||||
|
||||
# Maximum length used for retrieving data over MSSQL error based payload due to trimming problems with longer result strings
|
||||
MSSQL_ERROR_CHUNK_LENGTH = 100
|
||||
# Maximum chunk length used for retrieving data over error based payloads
|
||||
MAX_ERROR_CHUNK_LENGTH = 1024
|
||||
|
||||
# Do not escape the injected statement if it contains any of the following SQL keywords
|
||||
EXCLUDE_UNESCAPE = ("WAITFOR DELAY ", " INTO DUMPFILE ", " INTO OUTFILE ", "CREATE ", "BULK ", "EXEC ", "RECONFIGURE ", "DECLARE ", "'%s'" % CHAR_INFERENCE_MARK)
|
||||
|
||||
@@ -403,12 +403,18 @@ def _resumeHashDBValues():
|
||||
"""
|
||||
|
||||
kb.absFilePaths = hashDBRetrieve(HASHDB_KEYS.KB_ABS_FILE_PATHS, True) or kb.absFilePaths
|
||||
kb.chars = hashDBRetrieve(HASHDB_KEYS.KB_CHARS, True) or kb.chars
|
||||
kb.dynamicMarkings = hashDBRetrieve(HASHDB_KEYS.KB_DYNAMIC_MARKINGS, True) or kb.dynamicMarkings
|
||||
kb.brute.tables = hashDBRetrieve(HASHDB_KEYS.KB_BRUTE_TABLES, True) or kb.brute.tables
|
||||
kb.brute.columns = hashDBRetrieve(HASHDB_KEYS.KB_BRUTE_COLUMNS, True) or kb.brute.columns
|
||||
kb.chars = hashDBRetrieve(HASHDB_KEYS.KB_CHARS, True) or kb.chars
|
||||
kb.dynamicMarkings = hashDBRetrieve(HASHDB_KEYS.KB_DYNAMIC_MARKINGS, True) or kb.dynamicMarkings
|
||||
kb.xpCmdshellAvailable = hashDBRetrieve(HASHDB_KEYS.KB_XP_CMDSHELL_AVAILABLE) or kb.xpCmdshellAvailable
|
||||
|
||||
kb.errorChunkLength = hashDBRetrieve(HASHDB_KEYS.KB_ERROR_CHUNK_LENGTH)
|
||||
if kb.errorChunkLength and kb.errorChunkLength.isdigit():
|
||||
kb.errorChunkLength = int(kb.errorChunkLength)
|
||||
else:
|
||||
kb.errorChunkLength = None
|
||||
|
||||
conf.tmpPath = conf.tmpPath or hashDBRetrieve(HASHDB_KEYS.CONF_TMP_PATH)
|
||||
|
||||
for injection in hashDBRetrieve(HASHDB_KEYS.KB_INJECTIONS, True) or []:
|
||||
|
||||
Reference in New Issue
Block a user