mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-25 19:13:48 +03:00
Minor consistency update (with other WAF scripts) for #1543
This commit is contained in:
parent
378005d438
commit
69bc875eb3
|
@ -7,6 +7,7 @@ See the file 'doc/COPYING' for copying permission
|
||||||
|
|
||||||
import re
|
import re
|
||||||
|
|
||||||
|
from lib.core.enums import HTTP_HEADER
|
||||||
from lib.core.settings import WAF_ATTACK_VECTORS
|
from lib.core.settings import WAF_ATTACK_VECTORS
|
||||||
|
|
||||||
__product__ = "Yunjiasu Web Application Firewall (Baidu)"
|
__product__ = "Yunjiasu Web Application Firewall (Baidu)"
|
||||||
|
@ -17,7 +18,7 @@ def detect(get_page):
|
||||||
for vector in WAF_ATTACK_VECTORS:
|
for vector in WAF_ATTACK_VECTORS:
|
||||||
page, headers, code = get_page(get=vector)
|
page, headers, code = get_page(get=vector)
|
||||||
retval = re.search(r"fhl", headers.get("X-Server", ""), re.I) is not None
|
retval = re.search(r"fhl", headers.get("X-Server", ""), re.I) is not None
|
||||||
retval |= re.search(r"yunjiasu-nginx", headers.get("server"), re.I) is not None
|
retval |= re.search(r"yunjiasu-nginx", headers.get(HTTP_HEADER.SERVER), re.I) is not None
|
||||||
if retval:
|
if retval:
|
||||||
break
|
break
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user