mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 09:36:35 +03:00
proper fix
This commit is contained in:
parent
1a052245a6
commit
983546d6bf
|
@ -1090,18 +1090,20 @@ def __setHTTPUserAgent():
|
||||||
conf.httpHeaders.append(("User-Agent", __defaultHTTPUserAgent()))
|
conf.httpHeaders.append(("User-Agent", __defaultHTTPUserAgent()))
|
||||||
|
|
||||||
else:
|
else:
|
||||||
debugMsg = "loading random HTTP User-Agent header(s) from "
|
if not kb.userAgents:
|
||||||
debugMsg += "file '%s'" % paths.USER_AGENTS
|
debugMsg = "loading random HTTP User-Agent header(s) from "
|
||||||
logger.debug(debugMsg)
|
debugMsg += "file '%s'" % paths.USER_AGENTS
|
||||||
|
logger.debug(debugMsg)
|
||||||
|
|
||||||
try:
|
try:
|
||||||
kb.userAgents = getFileItems(paths.USER_AGENTS)
|
kb.userAgents = getFileItems(paths.USER_AGENTS)
|
||||||
except IOError:
|
except IOError:
|
||||||
warnMsg = "unable to read HTTP User-Agent header "
|
warnMsg = "unable to read HTTP User-Agent header "
|
||||||
warnMsg += "file '%s'" % paths.USER_AGENTS
|
warnMsg += "file '%s'" % paths.USER_AGENTS
|
||||||
logger.warn(warnMsg)
|
logger.warn(warnMsg)
|
||||||
|
|
||||||
conf.httpHeaders.append((HTTPHEADER.USER_AGENT, __defaultHTTPUserAgent()))
|
conf.httpHeaders.append((HTTPHEADER.USER_AGENT, __defaultHTTPUserAgent()))
|
||||||
|
return
|
||||||
|
|
||||||
count = len(kb.userAgents)
|
count = len(kb.userAgents)
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user