From cc4833429fedf31f719ad8822f884a1deac5bf5a Mon Sep 17 00:00:00 2001 From: Syed Afzal Date: Mon, 29 Oct 2018 14:21:18 +0530 Subject: [PATCH] added china cache (#3326) --- waf/chinacache.py | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 waf/chinacache.py diff --git a/waf/chinacache.py b/waf/chinacache.py new file mode 100644 index 000000000..aaac5c751 --- /dev/null +++ b/waf/chinacache.py @@ -0,0 +1,25 @@ +#!/usr/bin/env python + +""" +Copyright (c) 2006-2018 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__ = "China Cache" + +def detect(get_page): + retval = False + + for vector in WAF_ATTACK_VECTORS: + page, headers, code = get_page(get=vector) + retval = headers.get("Powered-By-ChinaCache") is not None + + if retval: + break + + return retval \ No newline at end of file