mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-08-04 06:50:14 +00:00
Adding support for detection of CloudFlare responses
This commit is contained in:
parent
034de9676e
commit
574b3a79aa
2 changed files with 9 additions and 1 deletions
|
|
@ -62,6 +62,7 @@ from lib.core.exception import SqlmapConnectionException
|
|||
from lib.core.exception import SqlmapNoneDataException
|
||||
from lib.core.exception import SqlmapSilentQuitException
|
||||
from lib.core.exception import SqlmapUserQuitException
|
||||
from lib.core.settings import CLOUDFLARE_SERVER_HEADER
|
||||
from lib.core.settings import DEFAULT_GET_POST_DELIMITER
|
||||
from lib.core.settings import DUMMY_NON_SQLI_CHECK_APPENDIX
|
||||
from lib.core.settings import FORMAT_EXCEPTION_STRINGS
|
||||
|
|
@ -1363,7 +1364,7 @@ def checkConnection(suppressOutput=False):
|
|||
|
||||
try:
|
||||
kb.originalPageTime = time.time()
|
||||
page, _ = Request.queryPage(content=True, noteResponseTime=False)
|
||||
page, headers = Request.queryPage(content=True, noteResponseTime=False)
|
||||
kb.originalPage = kb.pageTemplate = page
|
||||
|
||||
kb.errorIsNone = False
|
||||
|
|
@ -1382,6 +1383,10 @@ def checkConnection(suppressOutput=False):
|
|||
else:
|
||||
kb.errorIsNone = True
|
||||
|
||||
if headers and headers.get("Server", "") == CLOUDFLARE_SERVER_HEADER:
|
||||
warnMsg = "CloudFlare response detected"
|
||||
logger.warn(warnMsg)
|
||||
|
||||
except SqlmapConnectionException, ex:
|
||||
if conf.ipv6:
|
||||
warnMsg = "check connection to a provided "
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue