mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-24 08:14:24 +03:00
bug fix ('Host' header was being set to the conf.hostname for all getPages causing problems in some cases when retrieved page was not coming from that same Host)
This commit is contained in:
parent
f11d5c91e3
commit
a7d7be5ce0
|
@ -88,6 +88,7 @@ class HTTPHEADER:
|
|||
CONTENT_RANGE = "Content-Range"
|
||||
CONTENT_TYPE = "Content-Type"
|
||||
COOKIE = "Cookie"
|
||||
HOST = "Host"
|
||||
PROXY_AUTHORIZATION = "Proxy-authorization"
|
||||
RANGE = "Range"
|
||||
REFERER = "Referer"
|
||||
|
|
|
@ -1027,9 +1027,6 @@ def __setHTTPMethod():
|
|||
logger.debug(debugMsg)
|
||||
|
||||
def __setHTTPExtraHeaders():
|
||||
if conf.hostname:
|
||||
conf.httpHeaders.append(("Host", conf.hostname))
|
||||
|
||||
if conf.headers:
|
||||
debugMsg = "setting extra HTTP headers"
|
||||
logger.debug(debugMsg)
|
||||
|
|
|
@ -178,6 +178,8 @@ class Connect:
|
|||
if kb.proxyAuthHeader:
|
||||
headers[HTTPHEADER.PROXY_AUTHORIZATION] = kb.proxyAuthHeader
|
||||
|
||||
headers[HTTPHEADER.HOST] = urlparse.urlparse(url).netloc
|
||||
|
||||
if auxHeaders:
|
||||
for key, item in auxHeaders.items():
|
||||
headers[key] = item
|
||||
|
|
Loading…
Reference in New Issue
Block a user