Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 17bfda1

Browse files
committed
Adding new switch ('--skip-static')
1 parent e8f87bf commit 17bfda1

4 files changed

Lines changed: 14 additions & 1 deletion

File tree

lib/controller/controller.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,13 +476,18 @@ def start():
476476
infoMsg = "ignoring %s parameter '%s'" % (paramType, parameter)
477477
logger.info(infoMsg)
478478

479-
elif PAYLOAD.TECHNIQUE.BOOLEAN in conf.tech:
479+
elif PAYLOAD.TECHNIQUE.BOOLEAN in conf.tech or conf.skipStatic:
480480
check = checkDynParam(place, parameter, value)
481481

482482
if not check:
483483
warnMsg = "%s parameter '%s' does not appear dynamic" % (paramType, parameter)
484484
logger.warn(warnMsg)
485485

486+
if conf.skipStatic:
487+
infoMsg = "skipping static %s parameter '%s'" % (paramType, parameter)
488+
logger.info(infoMsg)
489+
490+
testSqlInj = False
486491
else:
487492
infoMsg = "%s parameter '%s' is dynamic" % (paramType, parameter)
488493
logger.info(infoMsg)

lib/core/optiondict.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,6 +73,7 @@
7373
"Injection": {
7474
"testParameter": "string",
7575
"skip": "string",
76+
"skipStatic": "boolean",
7677
"dbms": "string",
7778
"dbmsCred": "string",
7879
"os": "string",

lib/parse/cmdline.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -252,6 +252,9 @@ def cmdLineParser():
252252
injection.add_option("--skip", dest="skip",
253253
help="Skip testing for given parameter(s)")
254254

255+
injection.add_option("--skip-static", dest="skipStatic", action="store_true",
256+
help="Skip testing parameters that not appear dynamic")
257+
255258
injection.add_option("--dbms", dest="dbms",
256259
help="Force back-end DBMS to this value")
257260

sqlmap.conf

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -222,6 +222,10 @@ testParameter =
222222
# Skip testing for given parameter(s).
223223
skip =
224224

225+
# Skip testing parameters that not appear dynamic.
226+
# Valid: True or False
227+
skipStatic = False
228+
225229
# Force back-end DBMS to this value. If this option is set, the back-end
226230
# DBMS identification process will be minimized as needed.
227231
# If not set, sqlmap will detect back-end DBMS automatically by default.

0 commit comments

Comments
 (0)