Skip to content

Commit 6bde50d

Browse files
committed
1 parent 35893c4 commit 6bde50d

File tree

2 files changed

+13
-6
lines changed

2 files changed

+13
-6
lines changed

lib/core/option.py

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@
109109
from lib.core.settings import DEFAULT_TOR_SOCKS_PORTS
110110
from lib.core.settings import DEFAULT_USER_AGENT
111111
from lib.core.settings import DUMMY_URL
112+
from lib.core.settings import IGNORE_CODE_WILDCARD
112113
from lib.core.settings import IS_WIN
113114
from lib.core.settings import KB_CHARS_BOUNDARY_CHAR
114115
from lib.core.settings import KB_CHARS_LOW_FREQUENCY_ALPHABET
@@ -1569,11 +1570,14 @@ def _cleanupOptions():
15691570
conf.testParameter = []
15701571

15711572
if conf.ignoreCode:
1572-
try:
1573-
conf.ignoreCode = [int(_) for _ in re.split(PARAMETER_SPLITTING_REGEX, conf.ignoreCode)]
1574-
except ValueError:
1575-
errMsg = "options '--ignore-code' should contain a list of integer values"
1576-
raise SqlmapSyntaxException(errMsg)
1573+
if conf.ignoreCode == IGNORE_CODE_WILDCARD:
1574+
conf.ignoreCode = xrange(0, 1000)
1575+
else:
1576+
try:
1577+
conf.ignoreCode = [int(_) for _ in re.split(PARAMETER_SPLITTING_REGEX, conf.ignoreCode)]
1578+
except ValueError:
1579+
errMsg = "options '--ignore-code' should contain a list of integer values or a wildcard value '%s'" % IGNORE_CODE_WILDCARD
1580+
raise SqlmapSyntaxException(errMsg)
15771581
else:
15781582
conf.ignoreCode = []
15791583

lib/core/settings.py

Lines changed: 4 additions & 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.3.10.16"
21+
VERSION = "1.3.10.17"
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)
@@ -413,6 +413,9 @@
413413
# Character used for marking injectable position inside provided data
414414
CUSTOM_INJECTION_MARK_CHAR = '*'
415415

416+
# Wildcard value that can be used in option --ignore-code
417+
IGNORE_CODE_WILDCARD = '*'
418+
416419
# Other way to declare injection position
417420
INJECT_HERE_REGEX = r"(?i)%INJECT[_ ]?HERE%"
418421

0 commit comments

Comments
 (0)