From 885fe2e43fcf728a0527b46a46aa618438750185 Mon Sep 17 00:00:00 2001 From: ekultek Date: Tue, 14 Nov 2017 12:53:54 -0600 Subject: [PATCH] created a new WAF script for powerful firewall (mybb plugin issue #142) --- lib/firewall/powerful.py | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 lib/firewall/powerful.py diff --git a/lib/firewall/powerful.py b/lib/firewall/powerful.py new file mode 100644 index 0000000..f1d0936 --- /dev/null +++ b/lib/firewall/powerful.py @@ -0,0 +1,17 @@ +import re + + +__item__ = "Powerful Firewall (MyBB plugin)" + + +def detect(content, **kwargs): + status = kwargs.get("status", None) + detection_schema = ( + re.compile(r"Powerful Firewall", re.I), + re.compile(r"http(s)?...tiny.cc.powerful.firewall", re.I) + ) + if status is not None: + if status == 403: + for detection in detection_schema: + if detection.search(content) is not None: + return True