mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-11-17 13:35:18 +00:00
Fix for -r request files with multiple Cookie headers and HTTP/2 pseudo-headers
This commit is contained in:
parent
71907c80fe
commit
2530de4c1f
2 changed files with 6 additions and 2 deletions
|
|
@ -5793,6 +5793,10 @@ def parseRequestFile(reqFile, checkParams=True):
|
|||
elif "?" in line and "=" in line and ": " not in line:
|
||||
params = True
|
||||
|
||||
# HTTP/2 pseudo-headers (e.g. ':authority')
|
||||
elif line.startswith(':'):
|
||||
continue
|
||||
|
||||
# Headers
|
||||
elif re.search(r"\A\S+:", line):
|
||||
key, value = line.split(":", 1)
|
||||
|
|
@ -5807,7 +5811,7 @@ def parseRequestFile(reqFile, checkParams=True):
|
|||
|
||||
# Cookie and Host headers
|
||||
if key.upper() == HTTP_HEADER.COOKIE.upper():
|
||||
cookie = value
|
||||
cookie = "%s; %s" % (cookie, value) if cookie else value # Note: (e.g. HTTP/2) cookies can be split into multiple headers
|
||||
elif key.upper() == HTTP_HEADER.HOST.upper():
|
||||
if '://' in value:
|
||||
scheme, value = value.split('://')[:2]
|
||||
|
|
|
|||
|
|
@ -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.47"
|
||||
VERSION = "1.10.11.48"
|
||||
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