Create new detection script for WTS Firewall. (#3488)

This commit is contained in:
Infected Drake 2019-02-11 15:21:27 +05:30 committed by Miroslav Stampar
parent 8d46f67898
commit 47edf134a2

25
waf/wts.py Normal file
View File

@ -0,0 +1,25 @@
#!/usr/bin/env python
"""
Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
See the file 'LICENSE' for copying permission
"""
import re
from lib.core.enums import HTTP_HEADER
from lib.core.settings import WAF_ATTACK_VECTORS
__product__ = "WTS Web Application Firewall"
def detect(get_page):
retval = False
for vector in WAF_ATTACK_VECTORS:
page, headers, _ = get_page(get=vector)
retval = re.search(r"wts(.*)?", headers.get(HTTP_HEADER.SERVER, ""), re.I) is not None
retval |= all(_ in (page or "") for _ in ("<title>WTS.WAF", "<h1>WTS-WAF"))
if retval:
break
return retval