mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-12-15 20:29:04 +00:00
Fixes #2785
This commit is contained in:
@@ -105,7 +105,7 @@ from lib.core.settings import DEFAULT_GET_POST_DELIMITER
|
||||
from lib.core.settings import DEFAULT_MSSQL_SCHEMA
|
||||
from lib.core.settings import DEV_EMAIL_ADDRESS
|
||||
from lib.core.settings import DUMMY_USER_INJECTION
|
||||
from lib.core.settings import DYNAMICITY_MARK_LENGTH
|
||||
from lib.core.settings import DYNAMICITY_BOUNDARY_LENGTH
|
||||
from lib.core.settings import ERROR_PARSING_REGEXES
|
||||
from lib.core.settings import FILE_PATH_REGEXES
|
||||
from lib.core.settings import FORCE_COOKIE_EXPIRATION_TIME
|
||||
@@ -2795,7 +2795,7 @@ def findDynamicContent(firstPage, secondPage):
|
||||
for block in blocks[:]:
|
||||
(_, _, length) = block
|
||||
|
||||
if length <= DYNAMICITY_MARK_LENGTH:
|
||||
if length <= 2 * DYNAMICITY_BOUNDARY_LENGTH:
|
||||
blocks.remove(block)
|
||||
|
||||
# Making of dynamic markings based on prefix/suffix principle
|
||||
@@ -2814,6 +2814,9 @@ def findDynamicContent(firstPage, secondPage):
|
||||
continue
|
||||
|
||||
if prefix and suffix:
|
||||
prefix = prefix[-DYNAMICITY_BOUNDARY_LENGTH:]
|
||||
suffix = suffix[:DYNAMICITY_BOUNDARY_LENGTH]
|
||||
|
||||
infix = max(re.search(r"(?s)%s(.+)%s" % (re.escape(prefix), re.escape(suffix)), _) for _ in (firstPage, secondPage)).group(1)
|
||||
|
||||
if infix[0].isalnum():
|
||||
@@ -2822,7 +2825,7 @@ def findDynamicContent(firstPage, secondPage):
|
||||
if infix[-1].isalnum():
|
||||
suffix = trimAlphaNum(suffix)
|
||||
|
||||
kb.dynamicMarkings.append((prefix[-DYNAMICITY_MARK_LENGTH / 2:] if prefix else None, suffix[:DYNAMICITY_MARK_LENGTH / 2] if suffix else None))
|
||||
kb.dynamicMarkings.append((prefix if prefix else None, suffix if suffix else None))
|
||||
|
||||
if len(kb.dynamicMarkings) > 0:
|
||||
infoMsg = "dynamic content marked for removal (%d region%s)" % (len(kb.dynamicMarkings), 's' if len(kb.dynamicMarkings) > 1 else '')
|
||||
|
||||
@@ -19,7 +19,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME
|
||||
from lib.core.enums import OS
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.1.11.22"
|
||||
VERSION = "1.1.11.23"
|
||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
||||
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
||||
@@ -193,8 +193,8 @@ UNKNOWN_DBMS = "Unknown"
|
||||
# String used for representation of unknown DBMS version
|
||||
UNKNOWN_DBMS_VERSION = "Unknown"
|
||||
|
||||
# Dynamicity mark length used in dynamicity removal engine
|
||||
DYNAMICITY_MARK_LENGTH = 32
|
||||
# Dynamicity boundary length used in dynamicity removal engine
|
||||
DYNAMICITY_BOUNDARY_LENGTH = 20
|
||||
|
||||
# Dummy user prefix used in dictionary attack
|
||||
DUMMY_USER_PREFIX = "__dummy__"
|
||||
|
||||
Reference in New Issue
Block a user