Fine tuning of Cloudfrount WAF script (less FP)

This commit is contained in:
Miroslav Stampar
2018-08-30 16:42:35 +02:00
parent db327a8538
commit dc01f2e773
3 changed files with 4 additions and 5 deletions

View File

@@ -18,8 +18,7 @@ def detect(get_page):
for vector in WAF_ATTACK_VECTORS:
_, headers, _ = get_page(get=vector)
retval |= re.search(r"cloudfront", headers.get(HTTP_HEADER.SERVER, ""), re.I) is not None
retval |= re.search(r"cloudfront", headers.get("X-Cache", ""), re.I) is not None
retval = re.search(r"Error from cloudfront", headers.get("X-Cache", ""), re.I) is not None
retval |= headers.get("X-Amz-Cf-Id") is not None
if retval: