mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-05-10 10:43:44 +03:00
minor update
This commit is contained in:
parent
3f4afdf251
commit
5a8fc44119
|
@ -1073,11 +1073,11 @@ def __setHTTPExtraHeaders():
|
||||||
debugMsg = "setting extra HTTP headers"
|
debugMsg = "setting extra HTTP headers"
|
||||||
logger.debug(debugMsg)
|
logger.debug(debugMsg)
|
||||||
|
|
||||||
conf.headers = conf.headers.split("\n")
|
conf.headers = conf.headers.split("\n") if "\n" in conf.headers else conf.headers.split("\\n")
|
||||||
|
|
||||||
for headerValue in conf.headers:
|
for headerValue in conf.headers:
|
||||||
if ":" in headerValue:
|
if ":" in headerValue:
|
||||||
header, value = headerValue.split(":")
|
header, value = (_.lstrip() for _ in headerValue.split(":"))
|
||||||
|
|
||||||
if header and value:
|
if header and value:
|
||||||
conf.httpHeaders.append((header, value))
|
conf.httpHeaders.append((header, value))
|
||||||
|
|
|
@ -99,7 +99,7 @@ def cmdLineParser():
|
||||||
help="HTTP Referer header")
|
help="HTTP Referer header")
|
||||||
|
|
||||||
request.add_option("--headers", dest="headers",
|
request.add_option("--headers", dest="headers",
|
||||||
help="Extra HTTP headers newline separated")
|
help="Extra headers (e.g. \"Accept-Language: fr\\nETag: 123\")")
|
||||||
|
|
||||||
request.add_option("--auth-type", dest="aType",
|
request.add_option("--auth-type", dest="aType",
|
||||||
help="HTTP authentication type "
|
help="HTTP authentication type "
|
||||||
|
|
|
@ -70,7 +70,6 @@ referer =
|
||||||
rParam =
|
rParam =
|
||||||
|
|
||||||
# Extra HTTP headers
|
# Extra HTTP headers
|
||||||
# Note: There must be a space at the beginning of each header line.
|
|
||||||
headers = Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
|
headers = Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
|
||||||
Accept-Language: en-us,en;q=0.5
|
Accept-Language: en-us,en;q=0.5
|
||||||
Accept-Charset: ISO-8859-15,utf-8;q=0.7,*;q=0.7
|
Accept-Charset: ISO-8859-15,utf-8;q=0.7,*;q=0.7
|
||||||
|
|
Loading…
Reference in New Issue
Block a user