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

Skip to content

Commit 21114d1

Browse files
committed
added IGNORE_PARAMETERS to skip testing of state/session web server parameters
1 parent 58a93c5 commit 21114d1

2 files changed

Lines changed: 10 additions & 0 deletions

File tree

lib/controller/controller.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@
4444
from lib.core.exception import sqlmapUserQuitException
4545
from lib.core.session import setInjection
4646
from lib.core.settings import EMPTY_FORM_FIELDS_REGEX
47+
from lib.core.settings import IGNORE_PARAMETERS
4748
from lib.core.settings import REFERER_ALIASES
4849
from lib.core.settings import USER_AGENT_ALIASES
4950
from lib.core.target import initTargetEnv
@@ -369,6 +370,12 @@ def start():
369370
infoMsg = "skipping previously processed %s parameter '%s'" % (place, parameter)
370371
logger.info(infoMsg)
371372

373+
elif parameter.upper() in IGNORE_PARAMETERS:
374+
testSqlInj = False
375+
376+
infoMsg = "ignoring %s parameter '%s'" % (place, parameter)
377+
logger.info(infoMsg)
378+
372379
# Avoid dinamicity test if the user provided the
373380
# parameter manually
374381
elif parameter in conf.testParameter or conf.realTest:

lib/core/settings.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -301,3 +301,6 @@
301301

302302
# Maximum integer value
303303
MAX_INT = sys.maxint
304+
305+
# Parameters to be ignored in detection phase
306+
IGNORE_PARAMETERS = ("__VIEWSTATE", "__EVENTARGUMENT", "__EVENTTARGET", "__EVENTVALIDATION")

0 commit comments

Comments
 (0)