mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-11-20 07:00:25 +00:00
Treating Cookie header provided with -H/--headers as --cookie (i.e. testable Cookie parameters)
This commit is contained in:
parent
2351bd82dd
commit
32edb6a45e
2 changed files with 6 additions and 2 deletions
|
|
@ -1641,7 +1641,11 @@ def _setHTTPExtraHeaders():
|
|||
header, value = (_.lstrip() for _ in headerValue.split(":", 1))
|
||||
|
||||
if header and value:
|
||||
conf.httpHeaders.append((header, value))
|
||||
# Note: Cookie header provided this way is treated as --cookie (i.e. its parameters become testable)
|
||||
if header.upper() == HTTP_HEADER.COOKIE.upper() and not conf.cookie:
|
||||
conf.cookie = value
|
||||
else:
|
||||
conf.httpHeaders.append((header, value))
|
||||
else:
|
||||
errMsg = "invalid header value: %s. Valid header format is 'name:value'" % repr(headerValue).lstrip('u')
|
||||
raise SqlmapSyntaxException(errMsg)
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@ from lib.core.enums import OS
|
|||
from thirdparty import six
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
VERSION = "1.10.11.76"
|
||||
VERSION = "1.10.11.77"
|
||||
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
|
||||
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
|
||||
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue