mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-03 05:04:11 +03:00
minor fix (crashing if no : in value)
This commit is contained in:
parent
f85c5b3f4d
commit
3f4afdf251
|
@ -1076,10 +1076,11 @@ def __setHTTPExtraHeaders():
|
||||||
conf.headers = conf.headers.split("\n")
|
conf.headers = conf.headers.split("\n")
|
||||||
|
|
||||||
for headerValue in conf.headers:
|
for headerValue in conf.headers:
|
||||||
header, value = headerValue.split(": ")
|
if ":" in headerValue:
|
||||||
|
header, value = headerValue.split(":")
|
||||||
|
|
||||||
if header and value:
|
if header and value:
|
||||||
conf.httpHeaders.append((header, value))
|
conf.httpHeaders.append((header, value))
|
||||||
|
|
||||||
elif not conf.httpHeaders or len(conf.httpHeaders) == 1:
|
elif not conf.httpHeaders or len(conf.httpHeaders) == 1:
|
||||||
conf.httpHeaders.append((HTTPHEADER.ACCEPT_LANGUAGE, "en-us,en;q=0.5"))
|
conf.httpHeaders.append((HTTPHEADER.ACCEPT_LANGUAGE, "en-us,en;q=0.5"))
|
||||||
|
|
Loading…
Reference in New Issue
Block a user