File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 6262from lib .core .exception import SqlmapNoneDataException
6363from lib .core .exception import SqlmapSilentQuitException
6464from lib .core .exception import SqlmapUserQuitException
65+ from lib .core .settings import CLOUDFLARE_SERVER_HEADER
6566from lib .core .settings import DEFAULT_GET_POST_DELIMITER
6667from lib .core .settings import DUMMY_NON_SQLI_CHECK_APPENDIX
6768from lib .core .settings import FORMAT_EXCEPTION_STRINGS
@@ -1363,7 +1364,7 @@ def checkConnection(suppressOutput=False):
13631364
13641365 try :
13651366 kb .originalPageTime = time .time ()
1366- page , _ = Request .queryPage (content = True , noteResponseTime = False )
1367+ page , headers = Request .queryPage (content = True , noteResponseTime = False )
13671368 kb .originalPage = kb .pageTemplate = page
13681369
13691370 kb .errorIsNone = False
@@ -1382,6 +1383,10 @@ def checkConnection(suppressOutput=False):
13821383 else :
13831384 kb .errorIsNone = True
13841385
1386+ if headers and headers .get ("Server" , "" ) == CLOUDFLARE_SERVER_HEADER :
1387+ warnMsg = "CloudFlare response detected"
1388+ logger .warn (warnMsg )
1389+
13851390 except SqlmapConnectionException , ex :
13861391 if conf .ipv6 :
13871392 warnMsg = "check connection to a provided "
Original file line number Diff line number Diff line change 309309# Regex used for parsing XML Burp saved history items
310310BURP_XML_HISTORY_REGEX = r'<port>(\d+)</port>.+?<request base64="true"><!\[CDATA\[([^]]+)'
311311
312+ # Server header in CloudFlare responses
313+ CLOUDFLARE_SERVER_HEADER = "cloudflare-nginx"
314+
312315# Encoding used for Unicode data
313316UNICODE_ENCODING = "utf8"
314317
You can’t perform that action at this time.
0 commit comments