mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-25 19:13:48 +03:00
Minor update
This commit is contained in:
parent
ff205f088b
commit
8e7449ccd5
|
@ -201,7 +201,7 @@ def __feedTargetsDict(reqFile, addedTargetUrls):
|
|||
logger.debug("not a valid WebScarab log data")
|
||||
continue
|
||||
|
||||
if method.upper() == "POST":
|
||||
if method.upper() == HTTPMETHOD.POST:
|
||||
warnMsg = "POST requests from WebScarab logs aren't supported "
|
||||
warnMsg += "as their body content is stored in separate files. "
|
||||
warnMsg += "Nevertheless you can use -r to load them individually."
|
||||
|
@ -1170,24 +1170,24 @@ def __setHTTPUserAgent():
|
|||
|
||||
item = item[item.find(';') + 1:]
|
||||
|
||||
conf.httpHeaders.append(("User-Agent", item))
|
||||
conf.httpHeaders.append((HTTPHEADER.USER_AGENT, item))
|
||||
|
||||
elif conf.agent:
|
||||
debugMsg = "setting the HTTP User-Agent header"
|
||||
logger.debug(debugMsg)
|
||||
|
||||
conf.httpHeaders.append(("User-Agent", conf.agent))
|
||||
conf.httpHeaders.append((HTTPHEADER.USER_AGENT, conf.agent))
|
||||
|
||||
elif not conf.randomAgent:
|
||||
_ = True
|
||||
|
||||
for header, _ in conf.httpHeaders:
|
||||
if header == "User-Agent":
|
||||
if header == HTTPHEADER.USER_AGENT:
|
||||
_ = False
|
||||
break
|
||||
|
||||
if _:
|
||||
conf.httpHeaders.append(("User-Agent", __defaultHTTPUserAgent()))
|
||||
conf.httpHeaders.append((HTTPHEADER.USER_AGENT, __defaultHTTPUserAgent()))
|
||||
|
||||
else:
|
||||
if not kb.userAgents:
|
||||
|
|
|
@ -51,6 +51,8 @@ def forgeHeaders(items=None):
|
|||
headers = dict(conf.httpHeaders)
|
||||
headers.update(items or {})
|
||||
|
||||
headers = dict(("-".join(_.capitalize() for _ in key.split('-')), value) for (key, value) in headers.items())
|
||||
|
||||
if conf.cj:
|
||||
if HTTPHEADER.COOKIE in headers:
|
||||
for cookie in conf.cj:
|
||||
|
|
Loading…
Reference in New Issue
Block a user