Skip to content

Commit daafe9b

Browse files
committed
Bug fix (OR boolean based blind caused trouble to UNION with negative logic)
1 parent 9727f0d commit daafe9b

File tree

3 files changed

+20
-4
lines changed

3 files changed

+20
-4
lines changed

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.12.29"
22+
VERSION = "1.2.12.30"
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)

lib/techniques/union/test.py

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -318,8 +318,24 @@ def unionTest(comment, place, parameter, value, prefix, suffix):
318318
if conf.direct:
319319
return
320320

321+
negativeLogic = kb.negativeLogic
321322
kb.technique = PAYLOAD.TECHNIQUE.UNION
322-
validPayload, vector = _unionTestByCharBruteforce(comment, place, parameter, value, prefix, suffix)
323+
324+
try:
325+
if negativeLogic:
326+
pushValue(kb.negativeLogic)
327+
pushValue(conf.string)
328+
pushValue(conf.code)
329+
330+
kb.negativeLogic = False
331+
conf.string = conf.code = None
332+
333+
validPayload, vector = _unionTestByCharBruteforce(comment, place, parameter, value, prefix, suffix)
334+
finally:
335+
if negativeLogic:
336+
conf.code = popValue()
337+
conf.string = popValue()
338+
kb.negativeLogic = popValue()
323339

324340
if validPayload:
325341
validPayload = agent.removePayloadDelimiters(validPayload)

txt/checksum.md5

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -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-
06d86fa6e0530b5821793d63e8351f0a lib/core/settings.py
52+
5192aa6feb4e6d598ec4334c39f9ba2f lib/core/settings.py
5353
a971ce157d04de96ba6e710d3d38a9a8 lib/core/shell.py
5454
a7edc9250d13af36ac0108f259859c19 lib/core/subprocessng.py
5555
1581be48127a3a7a9fd703359b6e7567 lib/core/target.py
@@ -99,7 +99,7 @@ db208ab47de010836c6bf044e2357861 lib/techniques/blind/inference.py
9999
686904374067047b521151301321b30a lib/techniques/error/use.py
100100
1e5532ede194ac9c083891c2f02bca93 lib/techniques/__init__.py
101101
1e5532ede194ac9c083891c2f02bca93 lib/techniques/union/__init__.py
102-
f7813cdee00df8f98d6f811475e520a1 lib/techniques/union/test.py
102+
7047a66c35ce0c820931fc5bf73008a3 lib/techniques/union/test.py
103103
1f2ff182a28b2baf9f9fe7477c76618d lib/techniques/union/use.py
104104
fd1ede20ec674518a54966eaf0c9f8c6 lib/utils/api.py
105105
37dfb641358669f62c2acedff241348b lib/utils/brute.py

0 commit comments

Comments
 (0)