Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 014978c

Browse files
committed
Fine tuning Cloudflare WAF script
1 parent 2873713 commit 014978c

3 files changed

Lines changed: 5 additions & 4 deletions

File tree

lib/core/settings.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
from lib.core.enums import OS
2020

2121
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
22-
VERSION = "1.2.8.28"
22+
VERSION = "1.2.8.29"
2323
TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable"
2424
TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34}
2525
VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE)

txt/checksum.md5

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ c8c386d644d57c659d74542f5f57f632 lib/core/patch.py
5050
0c3eef46bdbf87e29a3f95f90240d192 lib/core/replication.py
5151
a7db43859b61569b601b97f187dd31c5 lib/core/revision.py
5252
fcb74fcc9577523524659ec49e2e964b lib/core/session.py
53-
676dac9284820f0949ec1f63e8827c4b lib/core/settings.py
53+
06f18a0602e49a4b14f4096feea04e4b lib/core/settings.py
5454
dd68a9d02fccb4fa1428b20e15b0db5d lib/core/shell.py
5555
a7edc9250d13af36ac0108f259859c19 lib/core/subprocessng.py
5656
815d1cf27f0f8738d81531e73149867d lib/core/target.py
@@ -404,7 +404,7 @@ ef722d062564def381b1f96f5faadee3 waf/baidu.py
404404
41e399dbfe7b904d5aacfb37d85e1fbf waf/blockdos.py
405405
2f3bbf43be94d4e9ffe9f80e8483d62f waf/ciscoacexml.py
406406
ba84f296cb52f5e78a0670b98d7763fa waf/cloudbric.py
407-
feda0f2a5172325f39e8e3e38c45f73d waf/cloudflare.py
407+
5987ef1e3f368f1f6cf5dad341db7159 waf/cloudflare.py
408408
b16b1c15532103346d5e2f5b8bd1ed36 waf/cloudfront.py
409409
ac96f34c254951d301973617064eb1b5 waf/comodo.py
410410
56d58c982c2cf775e0f8dc6767f336fd waf/datapower.py

waf/cloudflare.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,12 +17,13 @@ def detect(get_page):
1717

1818
for vector in WAF_ATTACK_VECTORS:
1919
page, headers, code = get_page(get=vector)
20-
retval = re.search(r"cloudflare", headers.get(HTTP_HEADER.SERVER, ""), re.I) is not None
2120

2221
if code >= 400:
22+
retval |= re.search(r"cloudflare", headers.get(HTTP_HEADER.SERVER, ""), re.I) is not None
2323
retval |= re.search(r"\A__cfduid=", headers.get(HTTP_HEADER.SET_COOKIE, ""), re.I) is not None
2424
retval |= headers.get("cf-ray") is not None
2525
retval |= re.search(r"CloudFlare Ray ID:|var CloudFlare=", page or "") is not None
26+
retval |= all(_ in (page or "") for _ in ("Attention Required! | Cloudflare", "Please complete the security check to access"))
2627

2728
if retval:
2829
break

0 commit comments

Comments
 (0)