File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 603603# Reference: http://www.cookiecentral.com/faq/#3.5
604604NETSCAPE_FORMAT_HEADER_COOKIES = "# Netscape HTTP Cookie File."
605605
606- # Prefixes used for automatic recognition of parameters carrying CSRF protection tokens
607- CSRF_TOKEN_PARAMETER_PREFIXES = ("csrf" , "xsrf" )
606+ # Infixes used for automatic recognition of parameters carrying CSRF protection tokens
607+ CSRF_TOKEN_PARAMETER_INFIXES = ("csrf" , "xsrf" )
608608
609609# Prefixes used in brute force search for web server document root
610610BRUTE_DOC_ROOT_PREFIXES = {
Original file line number Diff line number Diff line change 4343from lib .core .option import _setKnowledgeBaseAttributes
4444from lib .core .option import _setAuthCred
4545from lib .core .settings import ASTERISK_MARKER
46- from lib .core .settings import CSRF_TOKEN_PARAMETER_PREFIXES
46+ from lib .core .settings import CSRF_TOKEN_PARAMETER_INFIXES
4747from lib .core .settings import CUSTOM_INJECTION_MARK_CHAR
4848from lib .core .settings import DEFAULT_GET_POST_DELIMITER
4949from lib .core .settings import HOST_ALIASES
@@ -353,7 +353,7 @@ def process(match, repl):
353353 else :
354354 for place in (PLACE .GET , PLACE .POST ):
355355 for parameter in conf .paramDict .get (place , {}):
356- if any (parameter .lower ().startswith (_ ) for _ in CSRF_TOKEN_PARAMETER_PREFIXES ):
356+ if any (parameter .lower ().count (_ ) for _ in CSRF_TOKEN_PARAMETER_INFIXES ):
357357 message = "%s parameter '%s' appears to hold CSRF protection token. " % (place , parameter )
358358 message += "Do you want sqlmap to automatically update it in further requests? [y/N] "
359359 test = readInput (message , default = "N" )
You can’t perform that action at this time.
0 commit comments