Minor update to #3326 (adding generic code >= 400)

This commit is contained in:
Miroslav Stampar
2018-10-29 09:55:14 +01:00
parent cc4833429f
commit db5ae9ae0b
3 changed files with 5 additions and 7 deletions

View File

@@ -5,19 +5,16 @@ Copyright (c) 2006-2018 sqlmap developers (http://sqlmap.org/)
See the file 'doc/COPYING' for copying permission
"""
import re
from lib.core.enums import HTTP_HEADER
from lib.core.settings import WAF_ATTACK_VECTORS
__product__ = "China Cache"
__product__ = "ChinaCache (ChinaCache Networks)"
def detect(get_page):
retval = False
for vector in WAF_ATTACK_VECTORS:
page, headers, code = get_page(get=vector)
retval = headers.get("Powered-By-ChinaCache") is not None
retval = code >= 400 and headers.get("Powered-By-ChinaCache") is not None
if retval:
break