Skip to content

Commit 85c6d0d

Browse files
committed
Fixes #4483
1 parent d9e6e67 commit 85c6d0d

File tree

3 files changed

+15
-1
lines changed

3 files changed

+15
-1
lines changed

lib/core/option.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1868,6 +1868,8 @@ class _(six.text_type):
18681868

18691869
if conf.exclude:
18701870
regex = False
1871+
original = conf.exclude
1872+
18711873
if any(_ in conf.exclude for _ in ('+', '*')):
18721874
try:
18731875
re.compile(conf.exclude)
@@ -1882,6 +1884,12 @@ class _(six.text_type):
18821884
else:
18831885
conf.exclude = re.sub(r"(\w+)\$", r"\g<1>\$", conf.exclude)
18841886

1887+
class _(six.text_type):
1888+
pass
1889+
1890+
conf.exclude = _(conf.exclude)
1891+
conf.exclude._original = original
1892+
18851893
if conf.binaryFields:
18861894
conf.binaryFields = conf.binaryFields.replace(" ", "")
18871895
conf.binaryFields = re.split(PARAMETER_SPLITTING_REGEX, conf.binaryFields)

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from thirdparty.six import unichr as _unichr
1919

2020
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
21-
VERSION = "1.4.12.23"
21+
VERSION = "1.4.12.24"
2222
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2323
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2424
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

plugins/generic/search.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -194,6 +194,9 @@ def searchTable(self):
194194
else:
195195
whereDbsQuery = ""
196196

197+
if dbCond and conf.exclude:
198+
whereDbsQuery += " AND %s NOT LIKE '%s'" % (dbCond, re.sub(r"\.[*+]", '%', conf.exclude._original))
199+
197200
logger.info(infoMsg)
198201

199202
tblQuery = "%s%s" % (tblCond, tblCondParam)
@@ -431,6 +434,9 @@ def searchColumn(self):
431434
else:
432435
infoMsgDb = " across all databases"
433436

437+
if conf.exclude:
438+
whereDbsQuery += " AND %s NOT LIKE '%s'" % (dbCond, re.sub(r"\.[*+]", '%', conf.exclude._original))
439+
434440
logger.info("%s%s%s" % (infoMsg, infoMsgTbl, infoMsgDb))
435441

436442
colQuery = "%s%s" % (colCond, colCondParam)

0 commit comments

Comments
 (0)