Skip to content

Commit 2333903

Browse files
committed
1 parent d54ec88 commit 2333903

File tree

3 files changed

+11
-8
lines changed

3 files changed

+11
-8
lines changed

lib/core/common.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,7 +105,7 @@
105105
from lib.core.settings import DEFAULT_MSSQL_SCHEMA
106106
from lib.core.settings import DEV_EMAIL_ADDRESS
107107
from lib.core.settings import DUMMY_USER_INJECTION
108-
from lib.core.settings import DYNAMICITY_MARK_LENGTH
108+
from lib.core.settings import DYNAMICITY_BOUNDARY_LENGTH
109109
from lib.core.settings import ERROR_PARSING_REGEXES
110110
from lib.core.settings import FILE_PATH_REGEXES
111111
from lib.core.settings import FORCE_COOKIE_EXPIRATION_TIME
@@ -2795,7 +2795,7 @@ def findDynamicContent(firstPage, secondPage):
27952795
for block in blocks[:]:
27962796
(_, _, length) = block
27972797

2798-
if length <= DYNAMICITY_MARK_LENGTH:
2798+
if length <= 2 * DYNAMICITY_BOUNDARY_LENGTH:
27992799
blocks.remove(block)
28002800

28012801
# Making of dynamic markings based on prefix/suffix principle
@@ -2814,6 +2814,9 @@ def findDynamicContent(firstPage, secondPage):
28142814
continue
28152815

28162816
if prefix and suffix:
2817+
prefix = prefix[-DYNAMICITY_BOUNDARY_LENGTH:]
2818+
suffix = suffix[:DYNAMICITY_BOUNDARY_LENGTH]
2819+
28172820
infix = max(re.search(r"(?s)%s(.+)%s" % (re.escape(prefix), re.escape(suffix)), _) for _ in (firstPage, secondPage)).group(1)
28182821

28192822
if infix[0].isalnum():
@@ -2822,7 +2825,7 @@ def findDynamicContent(firstPage, secondPage):
28222825
if infix[-1].isalnum():
28232826
suffix = trimAlphaNum(suffix)
28242827

2825-
kb.dynamicMarkings.append((prefix[-DYNAMICITY_MARK_LENGTH / 2:] if prefix else None, suffix[:DYNAMICITY_MARK_LENGTH / 2] if suffix else None))
2828+
kb.dynamicMarkings.append((prefix if prefix else None, suffix if suffix else None))
28262829

28272830
if len(kb.dynamicMarkings) > 0:
28282831
infoMsg = "dynamic content marked for removal (%d region%s)" % (len(kb.dynamicMarkings), 's' if len(kb.dynamicMarkings) > 1 else '')

lib/core/settings.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from lib.core.enums import OS
2020

2121
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22-
VERSION = "1.1.11.22"
22+
VERSION = "1.1.11.23"
2323
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2424
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2525
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 @@
193193
# String used for representation of unknown DBMS version
194194
UNKNOWN_DBMS_VERSION = "Unknown"
195195

196-
# Dynamicity mark length used in dynamicity removal engine
197-
DYNAMICITY_MARK_LENGTH = 32
196+
# Dynamicity boundary length used in dynamicity removal engine
197+
DYNAMICITY_BOUNDARY_LENGTH = 20
198198

199199
# Dummy user prefix used in dictionary attack
200200
DUMMY_USER_PREFIX = "__dummy__"

txt/checksum.md5

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ d2cdb9e832e18a81e936ca3348144b16 lib/controller/handler.py
2727
5fb9aaf874daa47ea2b672a22740e56b lib/controller/__init__.py
2828
fd69e56ce20a5a49ce10a7a745022378 lib/core/agent.py
2929
8d9d771f7e67582c56a96a8d0ccbe4fc lib/core/bigarray.py
30-
16b63aed575a43c1d406df30a9b22afe lib/core/common.py
30+
ec43d0f5018a59faa6e4567581361d54 lib/core/common.py
3131
54326d3a690f8b26fe5a5da1a589b369 lib/core/convert.py
3232
90b1b08368ac8a859300e6fa6a8c796e lib/core/data.py
3333
1c14bdbf47b8dba31f73da9ad731a54a lib/core/datatype.py
@@ -46,7 +46,7 @@ e1c000db9be27f973569b1a430629037 lib/core/option.py
4646
760d9df2a27ded29109b390ab202e72d lib/core/replication.py
4747
a2466b62e67f8b31736bac4dac590e51 lib/core/revision.py
4848
02d4762140a72fd44668d3dab5eabda9 lib/core/session.py
49-
5ca78784a48256f3b8a7bc98b9ec1978 lib/core/settings.py
49+
71ad4ba8829df91c6250b0f70116c7cd lib/core/settings.py
5050
35bffbad762eb9e03db9e93b1c991103 lib/core/shell.py
5151
a59ec28371ae067a6fdd8f810edbee3d lib/core/subprocessng.py
5252
d5a04d672a18f78deb2839c3745ff83c lib/core/target.py

0 commit comments

Comments
 (0)