|
74 | 74 | from lib.core.exception import SqlmapSilentQuitException |
75 | 75 | from lib.core.exception import SqlmapSkipTargetException |
76 | 76 | from lib.core.exception import SqlmapUserQuitException |
| 77 | +from lib.core.settings import BOUNDED_INJECTION_MARKER |
77 | 78 | from lib.core.settings import CANDIDATE_SENTENCE_MIN_LENGTH |
78 | 79 | from lib.core.settings import CHECK_INTERNET_ADDRESS |
79 | 80 | from lib.core.settings import CHECK_INTERNET_VALUE |
@@ -361,7 +362,7 @@ def checkSqlInjection(place, parameter, value): |
361 | 362 |
|
362 | 363 | # Parse test's <request> |
363 | 364 | 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) |
365 | 366 |
|
366 | 367 | for boundary in boundaries: |
367 | 368 | injectable = False |
@@ -472,13 +473,13 @@ def checkSqlInjection(place, parameter, value): |
472 | 473 | # payload was successful |
473 | 474 | # Parse test's <response> |
474 | 475 | 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) |
476 | 477 |
|
477 | 478 | # In case of boolean-based blind SQL injection |
478 | 479 | if method == PAYLOAD.METHOD.COMPARISON: |
479 | 480 | # Generate payload used for comparison |
480 | 481 | 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) |
482 | 483 |
|
483 | 484 | # Forge response payload by prepending with |
484 | 485 | # boundary's prefix and appending the boundary's |
|
0 commit comments