Skip to content

Commit 89bbf52

Browse files
committed
Adding new option --param-exclude on private request
1 parent 44b00d6 commit 89bbf52

File tree

6 files changed

+19
-6
lines changed

6 files changed

+19
-6
lines changed

lib/controller/controller.py

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -470,6 +470,12 @@ def start():
470470
infoMsg = "skipping %s parameter '%s'" % (paramType, parameter)
471471
logger.info(infoMsg)
472472

473+
elif re.search(conf.paramExclude or "", parameter, re.I) or kb.postHint and re.search(conf.paramExclude or "", parameter.split(' ')[-1], re.I):
474+
testSqlInj = False
475+
476+
infoMsg = "skipping %s parameter '%s'" % (paramType, parameter)
477+
logger.info(infoMsg)
478+
473479
elif parameter == conf.csrfToken:
474480
testSqlInj = False
475481

lib/core/optiondict.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,8 @@
7777
"testParameter": "string",
7878
"skip": "string",
7979
"skipStatic": "boolean",
80-
"dbms": "string",
80+
"skip": "string",
81+
"paramExclude": "string",
8182
"dbmsCred": "string",
8283
"os": "string",
8384
"invalidBignum": "boolean",

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.0.12.14"
22+
VERSION = "1.0.12.15"
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/parse/cmdline.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,9 @@ def cmdLineParser(argv=None):
269269
injection.add_option("--skip-static", dest="skipStatic", action="store_true",
270270
help="Skip testing parameters that not appear to be dynamic")
271271

272+
injection.add_option("--param-exclude", dest="paramExclude",
273+
help="Regexp to exclude parameters from testing (e.g. \"ses\")")
274+
272275
injection.add_option("--dbms", dest="dbms",
273276
help="Force back-end DBMS to this value")
274277

sqlmap.conf

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -238,6 +238,9 @@ skip =
238238
# Valid: True or False
239239
skipStatic = False
240240

241+
# Regexp to exclude parameters from testing (e.g. "ses").
242+
paramExclude =
243+
241244
# Force back-end DBMS to this value. If this option is set, the back-end
242245
# DBMS identification process will be minimized as needed.
243246
# If not set, sqlmap will detect back-end DBMS automatically by default.

txt/checksum.md5

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ cc9c82cfffd8ee9b25ba3af6284f057e extra/sqlharvest/__init__.py
2121
4f2f817596540d82f9fcc0c5b2228beb extra/sqlharvest/sqlharvest.py
2222
2daa39e4d59526acb4772b6c47eb315f lib/controller/action.py
2323
eb36e67d0f698384978486d9b16591c5 lib/controller/checks.py
24-
f5183cfef62974889db81beb0adbf8fd lib/controller/controller.py
24+
531365e625d740ffed1fe97d8318979c lib/controller/controller.py
2525
ec007a1424da78cfdae90da6ae49ed9b lib/controller/handler.py
2626
cc9c82cfffd8ee9b25ba3af6284f057e lib/controller/__init__.py
2727
cdffff6260c40ccb4e4092fc21d9d63f lib/core/agent.py
@@ -38,14 +38,14 @@ b218e03ef7426fb0414881b05add1092 lib/core/enums.py
3838
e4aec2b11c1ad6039d0c3dbbfbc5eb1a lib/core/exception.py
3939
cc9c82cfffd8ee9b25ba3af6284f057e lib/core/__init__.py
4040
91c514013daa796e2cdd940389354eac lib/core/log.py
41-
86c86d2ee9e0eb74b13c16797b7dfc51 lib/core/optiondict.py
41+
ea5b08cac48cf538fb4bce31438b387b lib/core/optiondict.py
4242
5d530c06c9720626ef6bf9e0a3decd2a lib/core/option.py
4343
7af487340c138f7b5dbd443161cbb428 lib/core/profiling.py
4444
e60456db5380840a586654344003d4e6 lib/core/readlineng.py
4545
b3a62d41a5af6cd7fa733b6227febb0c lib/core/replication.py
4646
dfb664b223ac3585d51e58839b777d9b lib/core/revision.py
4747
7c15dd2777af4dac2c89cab6df17462e lib/core/session.py
48-
f6750f9990821025ee93de4561b534bc lib/core/settings.py
48+
d686c45c24eaa2519bc7e942fa8a2743 lib/core/settings.py
4949
7af83e4f18cab6dff5e67840eb65be80 lib/core/shell.py
5050
23657cd7d924e3c6d225719865855827 lib/core/subprocessng.py
5151
c3ace7874a536d801f308cf1fd03df99 lib/core/target.py
@@ -56,7 +56,7 @@ d43f059747ffd48952922c94152e2a07 lib/core/testing.py
5656
8485a3cd94c0a5af2718bad60c5f1ae5 lib/core/wordlist.py
5757
cc9c82cfffd8ee9b25ba3af6284f057e lib/__init__.py
5858
c1288bc4ce5651dbdd82d4a9435fdc03 lib/parse/banner.py
59-
ba4c9a57e87f54c647ca29a14fa82f9c lib/parse/cmdline.py
59+
16c1928161aa64e7c98d42116369459c lib/parse/cmdline.py
6060
8ec4d4f02634834701f8258726f2e511 lib/parse/configfile.py
6161
fe4e2152292587928edb94c9a4d311ff lib/parse/handler.py
6262
8e6bfb13e5a34b2610f3ff23467a34cf lib/parse/headers.py

0 commit comments

Comments
 (0)