Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 5a8fc44

Browse files
committed
minor update
1 parent 3f4afdf commit 5a8fc44

3 files changed

Lines changed: 3 additions & 4 deletions

File tree

lib/core/option.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1073,11 +1073,11 @@ def __setHTTPExtraHeaders():
10731073
debugMsg = "setting extra HTTP headers"
10741074
logger.debug(debugMsg)
10751075

1076-
conf.headers = conf.headers.split("\n")
1076+
conf.headers = conf.headers.split("\n") if "\n" in conf.headers else conf.headers.split("\\n")
10771077

10781078
for headerValue in conf.headers:
10791079
if ":" in headerValue:
1080-
header, value = headerValue.split(":")
1080+
header, value = (_.lstrip() for _ in headerValue.split(":"))
10811081

10821082
if header and value:
10831083
conf.httpHeaders.append((header, value))

lib/parse/cmdline.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,7 @@ def cmdLineParser():
9999
help="HTTP Referer header")
100100

101101
request.add_option("--headers", dest="headers",
102-
help="Extra HTTP headers newline separated")
102+
help="Extra headers (e.g. \"Accept-Language: fr\\nETag: 123\")")
103103

104104
request.add_option("--auth-type", dest="aType",
105105
help="HTTP authentication type "

sqlmap.conf

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,6 @@ referer =
7070
rParam =
7171

7272
# Extra HTTP headers
73-
# Note: There must be a space at the beginning of each header line.
7473
headers = Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5
7574
Accept-Language: en-us,en;q=0.5
7675
Accept-Charset: ISO-8859-15,utf-8;q=0.7,*;q=0.7

0 commit comments

Comments
 (0)