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

Skip to content

Commit 780dbd1

Browse files
committed
Update for an Issue #2
1 parent a52c881 commit 780dbd1

1 file changed

Lines changed: 10 additions & 0 deletions

File tree

lib/core/target.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -349,6 +349,16 @@ def process(match, repl):
349349
errMsg = "CSRF protection token parameter '%s' not " % conf.csrfToken
350350
errMsg += "found in provided GET and/or POST values"
351351
raise SqlmapGenericException(errMsg)
352+
else:
353+
for place in (PLACE.GET, PLACE.POST):
354+
for parameter in conf.paramDict.get(place, {}):
355+
if parameter.lower().startswith("csrf"):
356+
message = "%s parameter '%s' appears to hold CSRF protection token. " % (place, parameter)
357+
message += "Do you want sqlmap to automatically update it in further requests? [y/N] "
358+
test = readInput(message, default="N")
359+
if test and test[0] in ("y", "Y"):
360+
conf.csrfToken = parameter
361+
break
352362

353363
def _setHashDB():
354364
"""

0 commit comments

Comments
 (0)