added pksecurity module and siteguard WAF scripts (issue #142)

This commit is contained in:
ekultek 2017-11-15 07:22:51 -06:00
parent f759247ae3
commit e18e4c02a2
2 changed files with 31 additions and 0 deletions

16
lib/firewall/pk.py Normal file
View file

@ -0,0 +1,16 @@
import re
__item__ = "pkSecurityModule (IDS)"
def detect(content, **kwargs):
content = str(content)
detection_schema = (
re.compile(r"<.+>pkSecurityModule\W..\WSecurity.Alert<.+.>", re.I),
re.compile(r"<.+http(s)?.//([w]{3})?.kitnetwork.\w+.+>", re.I),
re.compile(r"<.+>A.safety.critical.request.was.discovered.and.blocked.<.+.>", re.I)
)
for detection in detection_schema:
if detection.search(content) is not None:
return True

15
lib/firewall/siteguard.py Normal file
View file

@ -0,0 +1,15 @@
import re
__item__ = "Website Security SiteGuard (Lite)"
def detect(content, **kwargs):
content = str(content)
detection_schema = (
re.compile(r">Powered.by.SiteGuard.Lite<", re.I),
re.compile(r"refuse.to.browse", re.I)
)
for detection in detection_schema:
if detection.search(content) is not None:
return True