2017-11-13 01:13:00 +00:00
|
|
|
import re
|
|
|
|
|
|
2017-11-27 19:09:53 +00:00
|
|
|
from lib.core.common import HTTP_HEADER
|
2017-11-13 01:13:00 +00:00
|
|
|
|
|
|
|
|
__item__ = "Sucuri Firewall (Sucuri Cloudproxy)"
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
def detect(content, **kwargs):
|
|
|
|
|
content = str(content)
|
2017-11-14 22:07:26 +00:00
|
|
|
headers = kwargs.get("headers", None)
|
2017-11-13 01:13:00 +00:00
|
|
|
detection_schema = (
|
|
|
|
|
re.compile(r"Access Denied - Sucuri Website Firewall"),
|
|
|
|
|
re.compile(r"Sucuri WebSite Firewall - CloudProxy - Access Denied"),
|
|
|
|
|
re.compile(r"Questions\?.+cloudproxy@sucuri\.net")
|
|
|
|
|
)
|
|
|
|
|
for detection in detection_schema:
|
|
|
|
|
if detection.search(content) is not None:
|
|
|
|
|
return True
|
2017-11-27 19:09:53 +00:00
|
|
|
if re.compile(r"X-Sucuri-ID", re.I).search(headers.get(HTTP_HEADER.SERVER, "")) is not None:
|
2017-11-14 22:07:26 +00:00
|
|
|
return True
|