File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 62
62
from lib .core .exception import SqlmapNoneDataException
63
63
from lib .core .exception import SqlmapSilentQuitException
64
64
from lib .core .exception import SqlmapUserQuitException
65
+ from lib .core .settings import CLOUDFLARE_SERVER_HEADER
65
66
from lib .core .settings import DEFAULT_GET_POST_DELIMITER
66
67
from lib .core .settings import DUMMY_NON_SQLI_CHECK_APPENDIX
67
68
from lib .core .settings import FORMAT_EXCEPTION_STRINGS
@@ -1363,7 +1364,7 @@ def checkConnection(suppressOutput=False):
1363
1364
1364
1365
try :
1365
1366
kb .originalPageTime = time .time ()
1366
- page , _ = Request .queryPage (content = True , noteResponseTime = False )
1367
+ page , headers = Request .queryPage (content = True , noteResponseTime = False )
1367
1368
kb .originalPage = kb .pageTemplate = page
1368
1369
1369
1370
kb .errorIsNone = False
@@ -1382,6 +1383,10 @@ def checkConnection(suppressOutput=False):
1382
1383
else :
1383
1384
kb .errorIsNone = True
1384
1385
1386
+ if headers and headers .get ("Server" , "" ) == CLOUDFLARE_SERVER_HEADER :
1387
+ warnMsg = "CloudFlare response detected"
1388
+ logger .warn (warnMsg )
1389
+
1385
1390
except SqlmapConnectionException , ex :
1386
1391
if conf .ipv6 :
1387
1392
warnMsg = "check connection to a provided "
Original file line number Diff line number Diff line change 309
309
# Regex used for parsing XML Burp saved history items
310
310
BURP_XML_HISTORY_REGEX = r'<port>(\d+)</port>.+?<request base64="true"><!\[CDATA\[([^]]+)'
311
311
312
+ # Server header in CloudFlare responses
313
+ CLOUDFLARE_SERVER_HEADER = "cloudflare-nginx"
314
+
312
315
# Encoding used for Unicode data
313
316
UNICODE_ENCODING = "utf8"
314
317
You can’t perform that action at this time.
0 commit comments