Couple of fixes for --identify-waf

This commit is contained in:
Miroslav Stampar 2016-05-27 02:24:59 +02:00
parent 7a2ac23f0b
commit 210b65c02d
5 changed files with 15 additions and 14 deletions

View File

@ -19,7 +19,7 @@ from lib.core.enums import OS
from lib.core.revision import getRevisionNumber
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
VERSION = "1.0.5.74"
VERSION = "1.0.5.75"
REVISION = getRevisionNumber()
STABLE = VERSION.count('.') <= 2
VERSION_STRING = "sqlmap/%s#%s" % (VERSION, "stable" if STABLE else "dev")

View File

@ -13,9 +13,10 @@ def detect(get_page):
retval = False
for vector in WAF_ATTACK_VECTORS:
_, headers, _ = get_page(get=vector)
retVal = headers.get("X-dotDefender-denied", "") == "1"
if retVal:
page, headers, _ = get_page(get=vector)
retval = headers.get("X-dotDefender-denied", "") == "1"
retval |= "dotDefender Blocked Your Request" in (page or "")
if retval:
break
return retval

View File

@ -13,12 +13,12 @@ from lib.core.settings import WAF_ATTACK_VECTORS
__product__ = "EdgeCast WAF (Verizon)"
def detect(get_page):
retVal = False
retval = False
for vector in WAF_ATTACK_VECTORS:
_, headers, code = get_page(get=vector)
retVal = code == 400 and re.search(r"\AECDF", headers.get(HTTP_HEADER.SERVER, ""), re.I) is not None
if retVal:
retval = code == 400 and re.search(r"\AECDF", headers.get(HTTP_HEADER.SERVER, ""), re.I) is not None
if retval:
break
return retVal
return retval

View File

@ -13,12 +13,12 @@ from lib.core.settings import WAF_ATTACK_VECTORS
__product__ = "Sucuri WebSite Firewall"
def detect(get_page):
retVal = False
retval = False
for vector in WAF_ATTACK_VECTORS:
_, headers, code = get_page(get=vector)
retVal = code == 403 and re.search(r"Sucuri/Cloudproxy", headers.get(HTTP_HEADER.SERVER, ""), re.I) is not None
if retVal:
retval = code == 403 and re.search(r"Sucuri/Cloudproxy", headers.get(HTTP_HEADER.SERVER, ""), re.I) is not None
if retval:
break
return retVal
return retval

View File

@ -17,9 +17,9 @@ def detect(get_page):
for vector in WAF_ATTACK_VECTORS:
_, headers, code = get_page(get=vector)
retVal = code == 999
retval = code == 999
retval |= re.search(r"WebKnight", headers.get(HTTP_HEADER.SERVER, ""), re.I) is not None
if retVal:
if retval:
break
return retval