mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-23 15:54:24 +03:00
Couple of fixes for --identify-waf
This commit is contained in:
parent
7a2ac23f0b
commit
210b65c02d
|
@ -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")
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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
|
||||
|
|
Loading…
Reference in New Issue
Block a user