Skip to content

Commit 190e8ae

Browse files
committed
Bug fix (UNION SQLi with --no-escape)
1 parent 43044d8 commit 190e8ae

3 files changed

Lines changed: 5 additions & 8 deletions

File tree

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.3.9"
22+
VERSION = "1.2.3.10"
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/use.py

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
from lib.core.data import queries
4545
from lib.core.dicts import FROM_DUMMY_TABLE
4646
from lib.core.enums import DBMS
47+
from lib.core.enums import HTTP_HEADER
4748
from lib.core.enums import PAYLOAD
4849
from lib.core.exception import SqlmapDataException
4950
from lib.core.exception import SqlmapSyntaxException
@@ -89,11 +90,7 @@ def _oneShotUnionUse(expression, unpack=True, limited=False):
8990
# Parse the returned page to get the exact UNION-based
9091
# SQL injection output
9192
def _(regex):
92-
return reduce(lambda x, y: x if x is not None else y, (\
93-
extractRegexResult(regex, removeReflectiveValues(page, payload), re.DOTALL | re.IGNORECASE), \
94-
extractRegexResult(regex, removeReflectiveValues(listToStrValue(headers.headers \
95-
if headers else None), payload, True), re.DOTALL | re.IGNORECASE)), \
96-
None)
93+
return reduce(lambda x, y: x if x is not None else y, (extractRegexResult(regex, removeReflectiveValues(page, payload), re.DOTALL | re.IGNORECASE), extractRegexResult(regex, removeReflectiveValues(listToStrValue((_ for _ in headers.headers if not _.startswith(HTTP_HEADER.URI)) if headers else None), payload, True), re.DOTALL | re.IGNORECASE)), None)
9794

9895
# Automatically patching last char trimming cases
9996
if kb.chars.stop not in (page or "") and kb.chars.stop[:-1] in (page or ""):

txt/checksum.md5

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ ffa5f01f39b17c8d73423acca6cfe86a lib/core/readlineng.py
4646
0c3eef46bdbf87e29a3f95f90240d192 lib/core/replication.py
4747
a7db43859b61569b601b97f187dd31c5 lib/core/revision.py
4848
fcb74fcc9577523524659ec49e2e964b lib/core/session.py
49-
bcacc60d5d1a2769a667e787eb08b625 lib/core/settings.py
49+
3e4a8bea5a0f5b2f4e1fa0c0c5baf9ee lib/core/settings.py
5050
d0adc28a38e43a787df4471f7f027413 lib/core/shell.py
5151
63491be462c515a1a3880c27c2acc4a2 lib/core/subprocessng.py
5252
3cc852f927833895361973fbcfd156d2 lib/core/target.py
@@ -97,7 +97,7 @@ b84d45fc7349caa714f9769b13d70cab lib/techniques/blind/inference.py
9797
1e5532ede194ac9c083891c2f02bca93 lib/techniques/__init__.py
9898
1e5532ede194ac9c083891c2f02bca93 lib/techniques/union/__init__.py
9999
e58ab8029ffb2cc37e42d68747c4da39 lib/techniques/union/test.py
100-
6c3c4c7d43ad75e61a73184323a81eac lib/techniques/union/use.py
100+
ac67ebbabd06bf9853befc65ad49679e lib/techniques/union/use.py
101101
e4146464cf968d4015a52cb8c10e3da5 lib/utils/api.py
102102
37dfb641358669f62c2acedff241348b lib/utils/brute.py
103103
a34c4fd2e7d78c5dfdd9eeccb079fb1c lib/utils/crawler.py

0 commit comments

Comments
 (0)