From ea4052ec652be0e1dd28e577e31c341deed94947 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Tue, 21 May 2019 13:11:51 +0200 Subject: [PATCH] Implements #3689 --- lib/core/settings.py | 2 +- waf/nexusguard.py | 24 ++++++++++++++++++++++++ 2 files changed, 25 insertions(+), 1 deletion(-) create mode 100644 waf/nexusguard.py diff --git a/lib/core/settings.py b/lib/core/settings.py index 4f48b92a3..b5c8802a6 100644 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -18,7 +18,7 @@ from lib.core.enums import OS from thirdparty.six import unichr as _unichr # sqlmap version (...) -VERSION = "1.3.5.122" +VERSION = "1.3.5.123" TYPE = "dev" if VERSION.count('.') > 2 and VERSION.split('.')[-1] != '0' else "stable" TYPE_COLORS = {"dev": 33, "stable": 90, "pip": 34} VERSION_STRING = "sqlmap/%s#%s" % ('.'.join(VERSION.split('.')[:-1]) if VERSION.count('.') > 2 and VERSION.split('.')[-1] == '0' else VERSION, TYPE) diff --git a/waf/nexusguard.py b/waf/nexusguard.py new file mode 100644 index 000000000..29b385a09 --- /dev/null +++ b/waf/nexusguard.py @@ -0,0 +1,24 @@ +#!/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.settings import WAF_ATTACK_VECTORS + +__product__ = "Nexusguard (Nexusguard Limited)" + +def detect(get_page): + retval = False + + for vector in WAF_ATTACK_VECTORS: + page, _, _ = get_page(get=vector) + retval |= "

Powered by Nexusguard

" in (page or "") + retval |= re.search(r"speresources\.nexusguard\.com/wafpage/[^>]*#\d{3};", page or "") is not None + if retval: + break + + return retval