Skip to content

Commit 73d8328

Browse files
committed
Minor patch (bounded injection case with leftover marker)
1 parent 1bd8c51 commit 73d8328

3 files changed

Lines changed: 7 additions & 6 deletions

File tree

lib/controller/checks.py

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,7 @@
7474
from lib.core.exception import SqlmapSilentQuitException
7575
from lib.core.exception import SqlmapSkipTargetException
7676
from lib.core.exception import SqlmapUserQuitException
77+
from lib.core.settings import BOUNDED_INJECTION_MARKER
7778
from lib.core.settings import CANDIDATE_SENTENCE_MIN_LENGTH
7879
from lib.core.settings import CHECK_INTERNET_ADDRESS
7980
from lib.core.settings import CHECK_INTERNET_VALUE
@@ -361,7 +362,7 @@ def checkSqlInjection(place, parameter, value):
361362

362363
# Parse test's <request>
363364
comment = agent.getComment(test.request) if len(conf.boundaries) > 1 else None
364-
fstPayload = agent.cleanupPayload(test.request.payload, origValue=value if place not in (PLACE.URI, PLACE.CUSTOM_POST, PLACE.CUSTOM_HEADER) else None)
365+
fstPayload = agent.cleanupPayload(test.request.payload, origValue=value if place not in (PLACE.URI, PLACE.CUSTOM_POST, PLACE.CUSTOM_HEADER) and BOUNDED_INJECTION_MARKER not in (value or "") else None)
365366

366367
for boundary in boundaries:
367368
injectable = False
@@ -472,13 +473,13 @@ def checkSqlInjection(place, parameter, value):
472473
# payload was successful
473474
# Parse test's <response>
474475
for method, check in test.response.items():
475-
check = agent.cleanupPayload(check, origValue=value if place not in (PLACE.URI, PLACE.CUSTOM_POST, PLACE.CUSTOM_HEADER) else None)
476+
check = agent.cleanupPayload(check, origValue=value if place not in (PLACE.URI, PLACE.CUSTOM_POST, PLACE.CUSTOM_HEADER) and BOUNDED_INJECTION_MARKER not in (value or "") else None)
476477

477478
# In case of boolean-based blind SQL injection
478479
if method == PAYLOAD.METHOD.COMPARISON:
479480
# Generate payload used for comparison
480481
def genCmpPayload():
481-
sndPayload = agent.cleanupPayload(test.response.comparison, origValue=value if place not in (PLACE.URI, PLACE.CUSTOM_POST, PLACE.CUSTOM_HEADER) else None)
482+
sndPayload = agent.cleanupPayload(test.response.comparison, origValue=value if place not in (PLACE.URI, PLACE.CUSTOM_POST, PLACE.CUSTOM_HEADER) and BOUNDED_INJECTION_MARKER not in (value or "") else None)
482483

483484
# Forge response payload by prepending with
484485
# boundary's prefix and appending the boundary's

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
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.2.10.42"
22+
VERSION = "1.2.11.0"
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)

txt/checksum.md5

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ b3e60ea4e18a65c48515d04aab28ff68 extra/sqlharvest/sqlharvest.py
2323
1e5532ede194ac9c083891c2f02bca93 extra/wafdetectify/__init__.py
2424
c1bccc94522d3425a372dcd57f78418e extra/wafdetectify/wafdetectify.py
2525
3459c562a6abb9b4bdcc36925f751f3e lib/controller/action.py
26-
fab20cff41611d4fcb4e426e2c7704da lib/controller/checks.py
26+
71334197c7ed28167cd66c17b2c21844 lib/controller/checks.py
2727
dd42ef140ffc0bd517128e6df369ab01 lib/controller/controller.py
2828
97a0f363bfc33a5ee4853cdf91515423 lib/controller/handler.py
2929
1e5532ede194ac9c083891c2f02bca93 lib/controller/__init__.py
@@ -49,7 +49,7 @@ c8c386d644d57c659d74542f5f57f632 lib/core/patch.py
4949
0c3eef46bdbf87e29a3f95f90240d192 lib/core/replication.py
5050
a7db43859b61569b601b97f187dd31c5 lib/core/revision.py
5151
fcb74fcc9577523524659ec49e2e964b lib/core/session.py
52-
6b82f332dca4d40708884fccaee79a7f lib/core/settings.py
52+
9aa489d9226056b672d83786f2c606c9 lib/core/settings.py
5353
a971ce157d04de96ba6e710d3d38a9a8 lib/core/shell.py
5454
a7edc9250d13af36ac0108f259859c19 lib/core/subprocessng.py
5555
721198b5be72c8015a02acb116532a1f lib/core/target.py

0 commit comments

Comments
 (0)