From eb79b0aae89beaf66282dc359b8a1f2eafd11eeb Mon Sep 17 00:00:00 2001 From: getcode2git Date: Sat, 19 Dec 2015 15:41:25 +0800 Subject: [PATCH] Create safe3.py Safe3 Web Application Firewall --- waf/safe3.py | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 waf/safe3.py diff --git a/waf/safe3.py b/waf/safe3.py new file mode 100644 index 000000000..d1aaacfc5 --- /dev/null +++ b/waf/safe3.py @@ -0,0 +1,26 @@ +#!/usr/bin/env python + +""" +Copyright (c) 2006-2015 sqlmap developers (http://sqlmap.org/) +See the file 'doc/COPYING' for copying permission +""" + +import re + +from lib.core.enums import HTTP_HEADER +from lib.core.settings import WAF_ATTACK_VECTORS + +__product__ = "Safe3 Web Application Firewall" + +def detect(get_page): + retval = False + + for vector in WAF_ATTACK_VECTORS: + page, headers, code = get_page(get=vector) + retval = re.search(r"Safe3WAF", headers.get("X-Powered-By", ""), re.I) is not None + retval |= re.search(r"Safe3 Web Firewall", headers.get(HTTP_HEADER.SERVER, ""), re.I) is not None + if retval: + break + + return retval +