mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-03-14 15:14:31 +03:00
In case that cookie file is given and cookie header inside request file clashes with one of contained cookies, give cookie file greater priority
This commit is contained in:
parent
7edd7ee2aa
commit
ed5599f489
|
@ -58,8 +58,13 @@ def forgeHeaders(items=None):
|
|||
if conf.cj:
|
||||
if HTTP_HEADER.COOKIE in headers:
|
||||
for cookie in conf.cj:
|
||||
if cookie.domain_specified and not conf.hostname.endswith(cookie.domain):
|
||||
continue
|
||||
|
||||
if ("%s=" % cookie.name) in headers[HTTP_HEADER.COOKIE]:
|
||||
if kb.mergeCookies is None:
|
||||
if conf.loadCookies:
|
||||
conf.httpHeaders = filter(None, ((item if item[0] != HTTP_HEADER.COOKIE else None) for item in conf.httpHeaders))
|
||||
elif kb.mergeCookies is None:
|
||||
message = "you provided a HTTP %s header value. " % HTTP_HEADER.COOKIE
|
||||
message += "The target URL provided its own cookies within "
|
||||
message += "the HTTP %s header which intersect with yours. " % HTTP_HEADER.SET_COOKIE
|
||||
|
|
Loading…
Reference in New Issue
Block a user