From e22fab19459c1b37dff2c2a831193dc7d6557ab7 Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Sun, 6 Jan 2019 00:29:31 +0100
Subject: [PATCH 001/800] Minor update of PyPI info
---
extra/shutils/precommit-hook.sh | 2 +-
extra/shutils/pypi.sh | 7 ++++++-
lib/core/settings.py | 2 +-
txt/checksum.md5 | 2 +-
4 files changed, 9 insertions(+), 4 deletions(-)
diff --git a/extra/shutils/precommit-hook.sh b/extra/shutils/precommit-hook.sh
index 5a9fea4246a..35fa5fc284e 100755
--- a/extra/shutils/precommit-hook.sh
+++ b/extra/shutils/precommit-hook.sh
@@ -26,7 +26,7 @@ if [ -f $SETTINGS_FULLPATH ]
then
LINE=$(grep -o ${SETTINGS_FULLPATH} -e 'VERSION = "[0-9.]*"')
declare -a LINE
- INCREMENTED=$(python -c "import re, sys, time; version = re.search('\"([0-9.]*)\"', sys.argv[1]).group(1); _ = version.split('.'); _.append(0) if len(_) < 3 else _; _[-1] = str(int(_[-1]) + 1); month = str(time.gmtime().tm_mon); _[-1] = '0' if _[-2] != month else _[-1]; _[-2] = month; print sys.argv[1].replace(version, '.'.join(_))" "$LINE")
+ INCREMENTED=$(python -c "import re, sys, time; version = re.search('\"([0-9.]*)\"', sys.argv[1]).group(1); _ = version.split('.'); _.extend([0] * (4 - len(_))); _[-1] = str(int(_[-1]) + 1); month = str(time.gmtime().tm_mon); _[-1] = '0' if _[-2] != month else _[-1]; _[-2] = month; print sys.argv[1].replace(version, '.'.join(_))" "$LINE")
if [ -n "$INCREMENTED" ]
then
sed -i "s/${LINE}/${INCREMENTED}/" $SETTINGS_FULLPATH
diff --git a/extra/shutils/pypi.sh b/extra/shutils/pypi.sh
index c6aa06d0bcf..20ecbd75f91 100755
--- a/extra/shutils/pypi.sh
+++ b/extra/shutils/pypi.sh
@@ -30,6 +30,11 @@ setup(
author='Bernardo Damele Assumpcao Guimaraes, Miroslav Stampar',
author_email='bernardo@sqlmap.org, miroslav@sqlmap.org',
url='http://sqlmap.org',
+ project_urls={
+ 'Documentation': 'https://github.com/sqlmapproject/sqlmap/wiki',
+ 'Source': 'https://github.com/sqlmapproject/sqlmap/',
+ 'Tracker': 'https://github.com/sqlmapproject/sqlmap/issues',
+ },
download_url='https://github.com/sqlmapproject/sqlmap/archive/$VERSION.zip',
license='GNU General Public License v2 (GPLv2)',
packages=find_packages(),
@@ -174,4 +179,4 @@ sed -i "s/^TYPE =.*/TYPE = \"$TYPE\"/g" sqlmap/lib/core/settings.py
sed -i "s/.*lib\/core\/settings\.py/`md5sum sqlmap/lib/core/settings.py | cut -d ' ' -f 1` lib\/core\/settings\.py/g" sqlmap/txt/checksum.md5
for file in $(find sqlmap -type f | grep -v -E "\.(git|yml)"); do echo include $file >> MANIFEST.in; done
python setup.py sdist upload
-rm -rf $TMP_DIR
\ No newline at end of file
+rm -rf $TMP_DIR
diff --git a/lib/core/settings.py b/lib/core/settings.py
index 505c72a8f48..ea8c20d3f5f 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3"
+VERSION = "1.3.1.0"
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/txt/checksum.md5 b/txt/checksum.md5
index 47d6c96cc4a..09b2ca7d45a 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-c799d8dee38e2da35b8aff0638f21129 lib/core/settings.py
+488341156951968cd3d07c41a87e4c61 lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
From 45c699e9cf1cbc7cb2280695ac44705fa6ba1faa Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Sun, 6 Jan 2019 00:37:30 +0100
Subject: [PATCH 002/800] Minor patch
---
lib/core/settings.py | 2 +-
lib/core/testing.py | 70 ++++++++++++++++++++++----------------------
txt/checksum.md5 | 4 +--
3 files changed, 38 insertions(+), 38 deletions(-)
diff --git a/lib/core/settings.py b/lib/core/settings.py
index ea8c20d3f5f..f271207acac 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.0"
+VERSION = "1.3.1.1"
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/lib/core/testing.py b/lib/core/testing.py
index 6f8a92a676d..87ff3a673c8 100644
--- a/lib/core/testing.py
+++ b/lib/core/testing.py
@@ -54,42 +54,42 @@ def smokeTest():
if not checkIntegrity():
retVal = False
- else:
- for root, _, files in os.walk(paths.SQLMAP_ROOT_PATH):
- if any(_ in root for _ in ("thirdparty", "extra")):
- continue
-
- for filename in files:
- if os.path.splitext(filename)[1].lower() == ".py" and filename != "__init__.py":
- length += 1
-
- for root, _, files in os.walk(paths.SQLMAP_ROOT_PATH):
- if any(_ in root for _ in ("thirdparty", "extra")):
- continue
-
- for filename in files:
- if os.path.splitext(filename)[1].lower() == ".py" and filename != "__init__.py":
- path = os.path.join(root, os.path.splitext(filename)[0])
- path = path.replace(paths.SQLMAP_ROOT_PATH, '.')
- path = path.replace(os.sep, '.').lstrip('.')
- try:
- __import__(path)
- module = sys.modules[path]
- except Exception, msg:
+
+ for root, _, files in os.walk(paths.SQLMAP_ROOT_PATH):
+ if any(_ in root for _ in ("thirdparty", "extra")):
+ continue
+
+ for filename in files:
+ if os.path.splitext(filename)[1].lower() == ".py" and filename != "__init__.py":
+ length += 1
+
+ for root, _, files in os.walk(paths.SQLMAP_ROOT_PATH):
+ if any(_ in root for _ in ("thirdparty", "extra")):
+ continue
+
+ for filename in files:
+ if os.path.splitext(filename)[1].lower() == ".py" and filename != "__init__.py":
+ path = os.path.join(root, os.path.splitext(filename)[0])
+ path = path.replace(paths.SQLMAP_ROOT_PATH, '.')
+ path = path.replace(os.sep, '.').lstrip('.')
+ try:
+ __import__(path)
+ module = sys.modules[path]
+ except Exception, msg:
+ retVal = False
+ dataToStdout("\r")
+ errMsg = "smoke test failed at importing module '%s' (%s):\n%s" % (path, os.path.join(root, filename), msg)
+ logger.error(errMsg)
+ else:
+ # Run doc tests
+ # Reference: http://docs.python.org/library/doctest.html
+ (failure_count, test_count) = doctest.testmod(module)
+ if failure_count > 0:
retVal = False
- dataToStdout("\r")
- errMsg = "smoke test failed at importing module '%s' (%s):\n%s" % (path, os.path.join(root, filename), msg)
- logger.error(errMsg)
- else:
- # Run doc tests
- # Reference: http://docs.python.org/library/doctest.html
- (failure_count, test_count) = doctest.testmod(module)
- if failure_count > 0:
- retVal = False
-
- count += 1
- status = '%d/%d (%d%%) ' % (count, length, round(100.0 * count / length))
- dataToStdout("\r[%s] [INFO] complete: %s" % (time.strftime("%X"), status))
+
+ count += 1
+ status = '%d/%d (%d%%) ' % (count, length, round(100.0 * count / length))
+ dataToStdout("\r[%s] [INFO] complete: %s" % (time.strftime("%X"), status))
clearConsoleLine()
if retVal:
diff --git a/txt/checksum.md5 b/txt/checksum.md5
index 09b2ca7d45a..4a0aa70d217 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,11 +49,11 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-488341156951968cd3d07c41a87e4c61 lib/core/settings.py
+0128758c83a31ba80424336cc45f1e6e lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
-2f87870562ac9a79a5105a0e20fdbf9a lib/core/testing.py
+a71b23612f2f2c7be8a843858408fdcc lib/core/testing.py
5ebd996b2a77449df90320847e30a073 lib/core/threads.py
2c263c8610667fdc593c50a35ab20f57 lib/core/unescaper.py
5bd7cd6553a4a1c85cbaaddc268108e4 lib/core/update.py
From 37449262dfa8816ebdaa5d0218abfe8aa994ac46 Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Sun, 6 Jan 2019 02:29:09 +0100
Subject: [PATCH 003/800] Fixes #3425
---
lib/core/common.py | 3 +--
lib/core/option.py | 15 +++++++++------
lib/core/settings.py | 4 ++--
txt/checksum.md5 | 6 +++---
4 files changed, 15 insertions(+), 13 deletions(-)
diff --git a/lib/core/common.py b/lib/core/common.py
index 0aa977cc66f..4688cf4b4b5 100644
--- a/lib/core/common.py
+++ b/lib/core/common.py
@@ -4598,9 +4598,8 @@ def _parseBurpLog(content):
reqResList = re.finditer(BURP_REQUEST_REGEX, content, re.I | re.S)
for match in reqResList:
- request = match if isinstance(match, basestring) else match.group(0)
+ request = match if isinstance(match, basestring) else match.group(1)
request = re.sub(r"\A[^\w]+", "", request)
-
schemePort = re.search(r"(http[\w]*)\:\/\/.*?\:([\d]+).+?={10,}", request, re.I | re.S)
if schemePort:
diff --git a/lib/core/option.py b/lib/core/option.py
index 27b63e81f30..56ce2ce98bb 100644
--- a/lib/core/option.py
+++ b/lib/core/option.py
@@ -100,6 +100,7 @@
from lib.core.settings import CODECS_LIST_PAGE
from lib.core.settings import CUSTOM_INJECTION_MARK_CHAR
from lib.core.settings import DBMS_ALIASES
+from lib.core.settings import DEFAULT_GET_POST_DELIMITER
from lib.core.settings import DEFAULT_PAGE_ENCODING
from lib.core.settings import DEFAULT_TOR_HTTP_PORTS
from lib.core.settings import DEFAULT_TOR_SOCKS_PORTS
@@ -223,10 +224,11 @@ def _setMultipleTargets():
if os.path.isfile(conf.logFile):
for target in parseRequestFile(conf.logFile):
- url = target[0]
- if url not in seen:
+ url, _, data, _, _ = target
+ key = re.sub(r"(\w+=)[^%s ]*" % (conf.paramDel or DEFAULT_GET_POST_DELIMITER), r"\g<1>", "%s %s" % (url, data))
+ if key not in seen:
kb.targets.add(target)
- seen.add(url)
+ seen.add(key)
elif os.path.isdir(conf.logFile):
files = os.listdir(conf.logFile)
@@ -237,10 +239,11 @@ def _setMultipleTargets():
continue
for target in parseRequestFile(os.path.join(conf.logFile, reqFile)):
- url = target[0]
- if url not in seen:
+ url, _, data, _, _ = target
+ key = re.sub(r"(\w+=)[^%s ]*" % (conf.paramDel or DEFAULT_GET_POST_DELIMITER), r"\g<1>", "%s %s" % (url, data))
+ if key not in seen:
kb.targets.add(target)
- seen.add(url)
+ seen.add(key)
else:
errMsg = "the specified list of targets is not a file "
diff --git a/lib/core/settings.py b/lib/core/settings.py
index f271207acac..6139b4e9d4f 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.1"
+VERSION = "1.3.1.2"
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)
@@ -360,7 +360,7 @@
WEBSCARAB_SPLITTER = "### Conversation"
# Splitter used between requests in BURP log files
-BURP_REQUEST_REGEX = r"={10,}\s+[^=]+={10,}\s(.+?)\s={10,}"
+BURP_REQUEST_REGEX = r"={10,}\s+([A-Z]{3,} .+?)\s+={10,}"
# Regex used for parsing XML Burp saved history items
BURP_XML_HISTORY_REGEX = r'(\d+).+?
Date: Sun, 6 Jan 2019 02:30:05 +0100
Subject: [PATCH 004/800] Trivial cleanup
---
lib/core/settings.py | 2 +-
txt/checksum.md5 | 4 ++--
waf/wordfence.py | 2 --
3 files changed, 3 insertions(+), 5 deletions(-)
diff --git a/lib/core/settings.py b/lib/core/settings.py
index 6139b4e9d4f..888ee2a216a 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.2"
+VERSION = "1.3.1.3"
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/txt/checksum.md5 b/txt/checksum.md5
index fa8df11f3ff..d8bbe820fd4 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-b1e0f0672f00611ad7f9d3a467d53649 lib/core/settings.py
+80e6760b8230a90372e15d7f18124974 lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -464,7 +464,7 @@ ba0fb1e6b815446b9d6f30950900fc80 waf/trafficshield.py
6aad5ef252bf428e9bbebe650c0cf67e waf/watchguard.py
c8dcaa89f6cde684a578fdc2e9ab2bb8 waf/webappsecure.py
a7b8c4c3d1463409e0e204932f0ddff0 waf/webknight.py
-16e421475ff62b203298e669edca7b40 waf/wordfence.py
+ac9e4e3ced77012ed97284634a9ffc74 waf/wordfence.py
e16122cb40e5f3a66cba359cfb672bd2 waf/yundun.py
a560bee3e948b97af2c88805933dcaad waf/yunsuo.py
c8b6517da2c8a28d474956e3a6b8c1ed waf/zenedge.py
diff --git a/waf/wordfence.py b/waf/wordfence.py
index 40a6711687f..2b7ef485336 100644
--- a/waf/wordfence.py
+++ b/waf/wordfence.py
@@ -5,8 +5,6 @@
See the file 'LICENSE' for copying permission
"""
-import re
-
from lib.core.settings import WAF_ATTACK_VECTORS
__product__ = "Wordfence (Feedjit)"
From 094ce29709b9c256db58eb3353a6fb09c70663f6 Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Sun, 6 Jan 2019 03:11:31 +0100
Subject: [PATCH 005/800] Removing useless netscaler WAF script (passive
appliance)
---
lib/core/settings.py | 2 +-
txt/checksum.md5 | 3 +--
waf/netscaler.py | 26 --------------------------
3 files changed, 2 insertions(+), 29 deletions(-)
delete mode 100644 waf/netscaler.py
diff --git a/lib/core/settings.py b/lib/core/settings.py
index 888ee2a216a..933e074c85c 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.3"
+VERSION = "1.3.1.4"
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/txt/checksum.md5 b/txt/checksum.md5
index d8bbe820fd4..a4edec0bd08 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-80e6760b8230a90372e15d7f18124974 lib/core/settings.py
+8d07fc2ad855c7c9175f80a0f1cbfddd lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -436,7 +436,6 @@ d50d82bec48814eb5b699d302dbdae9a waf/kona.py
10b1c6891494b780d1966e47fca2b58a waf/modsecurity.py
78af8e791207db9723a14bddeb7524af waf/naxsi.py
504ade4d32bdbbd2932eebb07f57c3eb waf/netcontinuum.py
-47ef4146cac17e3244bbc1a93fb51942 waf/netscaler.py
84e9c68b6ecffafb5ec8cd96acaf62b9 waf/newdefend.py
69fc40e85751279e9018d643742db04e waf/nsfocus.py
7ff3c93f2c77a984ebbf217c7c38a796 waf/paloalto.py
diff --git a/waf/netscaler.py b/waf/netscaler.py
deleted file mode 100644
index 7a8ac59685f..00000000000
--- a/waf/netscaler.py
+++ /dev/null
@@ -1,26 +0,0 @@
-#!/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__ = "NetScaler (Citrix Systems)"
-
-def detect(get_page):
- retval = False
-
- for vector in WAF_ATTACK_VECTORS:
- _, headers, _ = get_page(get=vector)
- retval = re.search(r"\Aclose", headers.get("Cneonction", "") or headers.get("nnCoection", ""), re.I) is not None
- retval |= re.search(r"\A(ns_af=|citrix_ns_id|NSC_)", headers.get(HTTP_HEADER.SET_COOKIE, ""), re.I) is not None
- retval |= re.search(r"\ANS-CACHE", headers.get(HTTP_HEADER.VIA, ""), re.I) is not None
- if retval:
- break
-
- return retval
From ed0420e635fb904d6df1c77614e061329739608e Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Sun, 6 Jan 2019 03:22:15 +0100
Subject: [PATCH 006/800] Update of WAF script for Cloudfront
---
lib/core/settings.py | 2 +-
txt/checksum.md5 | 4 ++--
waf/cloudfront.py | 3 ++-
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/lib/core/settings.py b/lib/core/settings.py
index 933e074c85c..d00bd630f18 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.4"
+VERSION = "1.3.1.5"
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/txt/checksum.md5 b/txt/checksum.md5
index a4edec0bd08..06228f8864e 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-8d07fc2ad855c7c9175f80a0f1cbfddd lib/core/settings.py
+a7b1cd71be4ae51360d0d01293271e66 lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -414,7 +414,7 @@ ef8c5db49ad9973b59d6b9b65b001714 waf/blockdos.py
a05edf8f2962dfff0457b7a4fd5e169c waf/ciscoacexml.py
af079de99a8ec6988d28aa4c0aa32cf9 waf/cloudbric.py
8fec83056c8728076ab17ab3a2ebbe7b waf/cloudflare.py
-5672c1ae038dcfc523a6d82d9875025c waf/cloudfront.py
+8414f766b0171fbc264c46ad40dff237 waf/cloudfront.py
847ee97f6e0f8aeec61afd3e0c91543b waf/comodo.py
f7571543ccb671a63a8139e375d6a4f2 waf/crawlprotect.py
f20b14ca9f7c2442fd1e9432d933a75b waf/datapower.py
diff --git a/waf/cloudfront.py b/waf/cloudfront.py
index 081c9750209..46474c48959 100644
--- a/waf/cloudfront.py
+++ b/waf/cloudfront.py
@@ -15,9 +15,10 @@ def detect(get_page):
retval = False
for vector in WAF_ATTACK_VECTORS:
- _, headers, _ = get_page(get=vector)
+ page, headers, _ = get_page(get=vector)
retval = re.search(r"Error from cloudfront", headers.get("X-Cache", ""), re.I) is not None
+ retval |= all(_ in (page or "") for _ in ("Generated by cloudfront", "Request blocked"))
if retval:
break
From 30497acd0cc1a996ba679d4c7ba835a025643d13 Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Sun, 6 Jan 2019 03:48:56 +0100
Subject: [PATCH 007/800] Minor update of ExpressionEngine WAF script
---
lib/core/settings.py | 2 +-
txt/checksum.md5 | 4 ++--
waf/expressionengine.py | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/core/settings.py b/lib/core/settings.py
index d00bd630f18..9c36bef83f4 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.5"
+VERSION = "1.3.1.6"
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/txt/checksum.md5 b/txt/checksum.md5
index 06228f8864e..556953e0ff1 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-a7b1cd71be4ae51360d0d01293271e66 lib/core/settings.py
+0dd33e8fe128a0b3bf3f94a463d0a61a lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -423,7 +423,7 @@ dbe50bbcb1b4664d6cebfcca63e75125 waf/distil.py
2e8bf326975edcb4d627493c46c6807c waf/dosarrest.py
886c6502a6a2aae49921efed8d439f7b waf/dotdefender.py
a8412619d7f26ed6bc9e0b20a57b2324 waf/edgecast.py
-17e7ac56629b25a9ea8cfe01c3604745 waf/expressionengine.py
+3f440d629b31052e675ee9d48d4ce370 waf/expressionengine.py
588d2f9a8f201e120e74e508564cb487 waf/fortiweb.py
0e9eb20967d2dde941cca8c663a63e1f waf/generic.py
2aa7775dac8df4a3cdb736fdf51dc9cb waf/hyperguard.py
diff --git a/waf/expressionengine.py b/waf/expressionengine.py
index 7b3c9b47e8d..8d8d0fc6c8b 100644
--- a/waf/expressionengine.py
+++ b/waf/expressionengine.py
@@ -14,7 +14,7 @@ def detect(get_page):
for vector in WAF_ATTACK_VECTORS:
page, _, _ = get_page(get=vector)
- retval = "Invalid GET Data" in (page or "")
+ retval = any((page or "").strip() == _ for _ in ("Invalid GET Data", "Invalid URI"))
if retval:
break
From 54d0678cbe2f6d347fc970548c4a482c89631b1e Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Mon, 7 Jan 2019 01:21:07 +0100
Subject: [PATCH 008/800] Adding new WAF scripts
---
lib/core/settings.py | 2 +-
txt/checksum.md5 | 8 +++++---
waf/crawlprotect.py | 1 +
waf/immunify360.py | 25 +++++++++++++++++++++++++
waf/modsecurity.py | 2 +-
waf/onmessage.py | 25 +++++++++++++++++++++++++
6 files changed, 58 insertions(+), 5 deletions(-)
create mode 100644 waf/immunify360.py
create mode 100644 waf/onmessage.py
diff --git a/lib/core/settings.py b/lib/core/settings.py
index 9c36bef83f4..dc566a43d4b 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.6"
+VERSION = "1.3.1.7"
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/txt/checksum.md5 b/txt/checksum.md5
index 556953e0ff1..1be0b4d3387 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-0dd33e8fe128a0b3bf3f94a463d0a61a lib/core/settings.py
+885aad10b81d3eaee5218ffbe29db374 lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -416,7 +416,7 @@ af079de99a8ec6988d28aa4c0aa32cf9 waf/cloudbric.py
8fec83056c8728076ab17ab3a2ebbe7b waf/cloudflare.py
8414f766b0171fbc264c46ad40dff237 waf/cloudfront.py
847ee97f6e0f8aeec61afd3e0c91543b waf/comodo.py
-f7571543ccb671a63a8139e375d6a4f2 waf/crawlprotect.py
+4ed76fdf2add2405bb6157ac025e01b9 waf/crawlprotect.py
f20b14ca9f7c2442fd1e9432d933a75b waf/datapower.py
e49bb75985f60556b4481dc085f3c62b waf/denyall.py
dbe50bbcb1b4664d6cebfcca63e75125 waf/distil.py
@@ -427,17 +427,19 @@ a8412619d7f26ed6bc9e0b20a57b2324 waf/edgecast.py
588d2f9a8f201e120e74e508564cb487 waf/fortiweb.py
0e9eb20967d2dde941cca8c663a63e1f waf/generic.py
2aa7775dac8df4a3cdb736fdf51dc9cb waf/hyperguard.py
+256a7ea2c1cd2745fe788cf8f6123f8a waf/immunify360.py
1adbd0c470d1bbcec370722f05094255 waf/incapsula.py
fb6be55d21a70765e35549af2484f762 waf/__init__.py
a3ee375714987acccc26d1b07c2e8af7 waf/isaserver.py
ce9cf35919a92d65347bb74ca0c5c86f waf/jiasule.py
f44ed04eeb4287c11ce277703ec7d72d waf/knownsec.py
d50d82bec48814eb5b699d302dbdae9a waf/kona.py
-10b1c6891494b780d1966e47fca2b58a waf/modsecurity.py
+4397c299d27a500851726444fb89759e waf/modsecurity.py
78af8e791207db9723a14bddeb7524af waf/naxsi.py
504ade4d32bdbbd2932eebb07f57c3eb waf/netcontinuum.py
84e9c68b6ecffafb5ec8cd96acaf62b9 waf/newdefend.py
69fc40e85751279e9018d643742db04e waf/nsfocus.py
+a59aff03a5b3fb40ea0feb3489677040 waf/onmessage.py
7ff3c93f2c77a984ebbf217c7c38a796 waf/paloalto.py
2979bb64c24256a83625d75a385dde9b waf/profense.py
8de0d46738335a4e498c4ac9038ac3c3 waf/proventia.py
diff --git a/waf/crawlprotect.py b/waf/crawlprotect.py
index 669c927ec5c..8f0e94ec8fe 100644
--- a/waf/crawlprotect.py
+++ b/waf/crawlprotect.py
@@ -15,5 +15,6 @@ def detect(get_page):
for vector in WAF_ATTACK_VECTORS:
page, _, code = get_page(get=vector)
retval = code >= 400 and "This site is protected by CrawlProtect" in (page or "")
+ retval |= "CrawlProtect" in (page or "")
return retval
diff --git a/waf/immunify360.py b/waf/immunify360.py
new file mode 100644
index 00000000000..6383f7a377e
--- /dev/null
+++ b/waf/immunify360.py
@@ -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__ = "Imunify360 (CloudLinux Inc.)"
+
+def detect(get_page):
+ retval = False
+
+ for vector in WAF_ATTACK_VECTORS:
+ page, headers, _ = get_page(get=vector)
+ retval = re.search(r"\Aimunify360", headers.get(HTTP_HEADER.SERVER, ""), re.I) is not None
+ retval = any(_ in (page or "") for _ in ("protected by Imunify360", "Powered by Imunify360", "imunify360 preloader"))
+ if retval:
+ break
+
+ return retval
diff --git a/waf/modsecurity.py b/waf/modsecurity.py
index d5d6d8ff41f..4751b06da3a 100644
--- a/waf/modsecurity.py
+++ b/waf/modsecurity.py
@@ -18,7 +18,7 @@ def detect(get_page):
for vector in WAF_ATTACK_VECTORS:
page, headers, code = get_page(get=vector)
retval = re.search(r"Mod_Security|NOYB", headers.get(HTTP_HEADER.SERVER, ""), re.I) is not None
- retval |= any(_ in (page or "") for _ in ("This error was generated by Mod_Security", "One or more things in your request were suspicious", "rules of the mod_security module", "The page you are trying to access is restricted due to a security rule"))
+ retval |= any(_ in (page or "") for _ in ("This error was generated by Mod_Security", "One or more things in your request were suspicious", "rules of the mod_security module", "The page you are trying to access is restricted due to a security rule", "Protected by Mod Security"))
if retval:
break
diff --git a/waf/onmessage.py b/waf/onmessage.py
new file mode 100644
index 00000000000..b5c613702f3
--- /dev/null
+++ b/waf/onmessage.py
@@ -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.settings import WAF_ATTACK_VECTORS
+
+__product__ = "onMessage Shield (Blackbaud)"
+
+def detect(get_page):
+ retval = False
+
+ for vector in WAF_ATTACK_VECTORS:
+ page, headers, _ = get_page(get=vector)
+ retval = re.search(r"onMessage Shield", headers.get("X-Engine", ""), re.I) is not None
+ retval |= "This site is protected by an enhanced security system to ensure a safe browsing experience" in (page or "")
+ retval |= "onMessage SHIELD" in (page or "")
+ if retval:
+ break
+
+ return retval
From 9f75fd4fb882572f4850244f5e82e59b51ccfcce Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Mon, 7 Jan 2019 02:58:47 +0100
Subject: [PATCH 009/800] New WAF scripts
---
lib/core/settings.py | 2 +-
txt/checksum.md5 | 11 +++++++++--
waf/cleantalk.py | 19 +++++++++++++++++++
waf/godaddy.py | 19 +++++++++++++++++++
waf/malcare.py | 22 ++++++++++++++++++++++
waf/ninjafirewall.py | 20 ++++++++++++++++++++
waf/rsfirewall.py | 19 +++++++++++++++++++
waf/shieldsecurity.py | 19 +++++++++++++++++++
waf/virusdie.py | 19 +++++++++++++++++++
waf/watchguard.py | 3 ++-
10 files changed, 149 insertions(+), 4 deletions(-)
create mode 100644 waf/cleantalk.py
create mode 100644 waf/godaddy.py
create mode 100644 waf/malcare.py
create mode 100644 waf/ninjafirewall.py
create mode 100644 waf/rsfirewall.py
create mode 100644 waf/shieldsecurity.py
create mode 100644 waf/virusdie.py
diff --git a/lib/core/settings.py b/lib/core/settings.py
index dc566a43d4b..d673b455e3d 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.7"
+VERSION = "1.3.1.8"
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/txt/checksum.md5 b/txt/checksum.md5
index 1be0b4d3387..f9654769dc7 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-885aad10b81d3eaee5218ffbe29db374 lib/core/settings.py
+f483f079c8682b64940e78c6b75bac77 lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -412,6 +412,7 @@ ef8c5db49ad9973b59d6b9b65b001714 waf/blockdos.py
2608fbe2c80fae99bb09db1f93d80cdd waf/bluedon.py
5ae64cad95b7f904c350cc81230c3bd1 waf/chinacache.py
a05edf8f2962dfff0457b7a4fd5e169c waf/ciscoacexml.py
+2565869c73a9a37f25deb317e8f5d9dd waf/cleantalk.py
af079de99a8ec6988d28aa4c0aa32cf9 waf/cloudbric.py
8fec83056c8728076ab17ab3a2ebbe7b waf/cloudflare.py
8414f766b0171fbc264c46ad40dff237 waf/cloudfront.py
@@ -426,6 +427,7 @@ a8412619d7f26ed6bc9e0b20a57b2324 waf/edgecast.py
3f440d629b31052e675ee9d48d4ce370 waf/expressionengine.py
588d2f9a8f201e120e74e508564cb487 waf/fortiweb.py
0e9eb20967d2dde941cca8c663a63e1f waf/generic.py
+4ea580dd1b9679bd733866976ad5d81e waf/godaddy.py
2aa7775dac8df4a3cdb736fdf51dc9cb waf/hyperguard.py
256a7ea2c1cd2745fe788cf8f6123f8a waf/immunify360.py
1adbd0c470d1bbcec370722f05094255 waf/incapsula.py
@@ -434,10 +436,12 @@ a3ee375714987acccc26d1b07c2e8af7 waf/isaserver.py
ce9cf35919a92d65347bb74ca0c5c86f waf/jiasule.py
f44ed04eeb4287c11ce277703ec7d72d waf/knownsec.py
d50d82bec48814eb5b699d302dbdae9a waf/kona.py
+d4f36e44f496f4d51baa3241eabc60fd waf/malcare.py
4397c299d27a500851726444fb89759e waf/modsecurity.py
78af8e791207db9723a14bddeb7524af waf/naxsi.py
504ade4d32bdbbd2932eebb07f57c3eb waf/netcontinuum.py
84e9c68b6ecffafb5ec8cd96acaf62b9 waf/newdefend.py
+d03dfe93a14c966b88f5baf59ce2b091 waf/ninjafirewall.py
69fc40e85751279e9018d643742db04e waf/nsfocus.py
a59aff03a5b3fb40ea0feb3489677040 waf/onmessage.py
7ff3c93f2c77a984ebbf217c7c38a796 waf/paloalto.py
@@ -446,10 +450,12 @@ a59aff03a5b3fb40ea0feb3489677040 waf/onmessage.py
ac60456fe7af4eb501d448910e98ee4b waf/radware.py
dba6a3b52851d2d7a0a1ab83a51caa5a waf/reblaze.py
987389e4f403b7615d6d8006420a6260 waf/requestvalidationmode.py
+8dae5619edafaaceccf1c4eb051c7d22 waf/rsfirewall.py
2a7b234e903d13b3c21d6c17e05d1c46 waf/safe3.py
4382cb217354d816580ee07178d0a8c7 waf/safedog.py
ac0728ddb7a15b46b0eabd78cd661f8c waf/secureiis.py
ba37e1c37fa0e3688873f74183a9cb9c waf/senginx.py
+2602a8baed4da643e606a379e4dc75db waf/shieldsecurity.py
4d79866c7cff0d7650a22d0a85126c05 waf/sitelock.py
a840fcd2bb042694f9aab2859e7c9b30 waf/sonicwall.py
45683bfe7a428f47745416c727a789bd waf/sophos.py
@@ -461,8 +467,9 @@ ba0fb1e6b815446b9d6f30950900fc80 waf/trafficshield.py
876c746d96193071271cb8b7e00e1422 waf/urlscan.py
45f28286ffd89200d4c9b6d88a7a518f waf/uspses.py
2d9d9fa8359a9f721e4b977d3da52410 waf/varnish.py
+2be220869fae5a942a460428c84345af waf/virusdie.py
67df54343a85fe053226e2a5483b2c64 waf/wallarm.py
-6aad5ef252bf428e9bbebe650c0cf67e waf/watchguard.py
+114000c53115fa8f4dd9b1b9122ec32a waf/watchguard.py
c8dcaa89f6cde684a578fdc2e9ab2bb8 waf/webappsecure.py
a7b8c4c3d1463409e0e204932f0ddff0 waf/webknight.py
ac9e4e3ced77012ed97284634a9ffc74 waf/wordfence.py
diff --git a/waf/cleantalk.py b/waf/cleantalk.py
new file mode 100644
index 00000000000..006d2a75cc3
--- /dev/null
+++ b/waf/cleantalk.py
@@ -0,0 +1,19 @@
+#!/usr/bin/env python
+
+"""
+Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
+See the file 'LICENSE' for copying permission
+"""
+
+from lib.core.settings import WAF_ATTACK_VECTORS
+
+__product__ = "CleanTalk Web Application FireWall (CleanTalk)"
+
+def detect(get_page):
+ retval = False
+
+ for vector in WAF_ATTACK_VECTORS:
+ page, _, _ = get_page(get=vector)
+ retval = any(_ in (page or "") for _ in ("Blocked by Web Application Firewall", "Security by CleanTalk"))
+
+ return retval
diff --git a/waf/godaddy.py b/waf/godaddy.py
new file mode 100644
index 00000000000..fdbdba1d024
--- /dev/null
+++ b/waf/godaddy.py
@@ -0,0 +1,19 @@
+#!/usr/bin/env python
+
+"""
+Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
+See the file 'LICENSE' for copying permission
+"""
+
+from lib.core.settings import WAF_ATTACK_VECTORS
+
+__product__ = "GoDaddy Website Firewall (GoDaddy Inc.)"
+
+def detect(get_page):
+ retval = False
+
+ for vector in WAF_ATTACK_VECTORS:
+ page, _, _ = get_page(get=vector)
+ retval = any(_ in (page or "") for _ in ("Access Denied - GoDaddy Website Firewall", "GoDaddy Security - Access Denied"))
+
+ return retval
diff --git a/waf/malcare.py b/waf/malcare.py
new file mode 100644
index 00000000000..6180962a79d
--- /dev/null
+++ b/waf/malcare.py
@@ -0,0 +1,22 @@
+#!/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__ = "MalCare (Inactiv.com Media Solutions Pvt Ltd.)"
+
+def detect(get_page):
+ retval = False
+
+ for vector in WAF_ATTACK_VECTORS:
+ page, _, _ = get_page(get=vector)
+ retval = "Blocked because of Malicious Activities" in (page or "")
+ retval |= re.search(r"Firewall(<[^>]+>)*powered by(<[^>]+>)*MalCare", page or "") is not None
+
+ return retval
diff --git a/waf/ninjafirewall.py b/waf/ninjafirewall.py
new file mode 100644
index 00000000000..5e7ef1377a3
--- /dev/null
+++ b/waf/ninjafirewall.py
@@ -0,0 +1,20 @@
+#!/usr/bin/env python
+
+"""
+Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
+See the file 'LICENSE' for copying permission
+"""
+
+from lib.core.settings import WAF_ATTACK_VECTORS
+
+__product__ = "NinjaFirewall (NinTechNet)"
+
+def detect(get_page):
+ retval = False
+
+ for vector in WAF_ATTACK_VECTORS:
+ page, _, _ = get_page(get=vector)
+ retval = "NinjaFirewall: 403 Forbidden" in (page or "")
+ retval |= all(_ in (page or "") for _ in ("For security reasons, it was blocked and logged", "NinjaFirewall"))
+
+ return retval
diff --git a/waf/rsfirewall.py b/waf/rsfirewall.py
new file mode 100644
index 00000000000..1ead81293ef
--- /dev/null
+++ b/waf/rsfirewall.py
@@ -0,0 +1,19 @@
+#!/usr/bin/env python
+
+"""
+Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
+See the file 'LICENSE' for copying permission
+"""
+
+from lib.core.settings import WAF_ATTACK_VECTORS
+
+__product__ = "RSFirewall (RSJoomla!)"
+
+def detect(get_page):
+ retval = False
+
+ for vector in WAF_ATTACK_VECTORS:
+ page, _, _ = get_page(get=vector)
+ retval = any(_ in (page or "") for _ in ("COM_RSFIREWALL_403_FORBIDDEN", "COM_RSFIREWALL_EVENT"))
+
+ return retval
diff --git a/waf/shieldsecurity.py b/waf/shieldsecurity.py
new file mode 100644
index 00000000000..9c9c84b5e31
--- /dev/null
+++ b/waf/shieldsecurity.py
@@ -0,0 +1,19 @@
+#!/usr/bin/env python
+
+"""
+Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
+See the file 'LICENSE' for copying permission
+"""
+
+from lib.core.settings import WAF_ATTACK_VECTORS
+
+__product__ = "Shield Security (One Dollar Plugin)"
+
+def detect(get_page):
+ retval = False
+
+ for vector in WAF_ATTACK_VECTORS:
+ page, _, _ = get_page(get=vector)
+ retval = "Something in the URL, Form or Cookie data wasn't appropriate" in (page or "")
+
+ return retval
diff --git a/waf/virusdie.py b/waf/virusdie.py
new file mode 100644
index 00000000000..b6d5f31ac8e
--- /dev/null
+++ b/waf/virusdie.py
@@ -0,0 +1,19 @@
+#!/usr/bin/env python
+
+"""
+Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
+See the file 'LICENSE' for copying permission
+"""
+
+from lib.core.settings import WAF_ATTACK_VECTORS
+
+__product__ = "Virusdie (Virusdie LLC)"
+
+def detect(get_page):
+ retval = False
+
+ for vector in WAF_ATTACK_VECTORS:
+ page, _, _ = get_page(get=vector)
+ retval = any(_ in (page or "") for _ in ("| Virusdie", "http://cdn.virusdie.ru/splash/firewallstop.png", "© Virusdie.ru
"))
+
+ return retval
diff --git a/waf/watchguard.py b/waf/watchguard.py
index bb40d49d97b..538a565a108 100644
--- a/waf/watchguard.py
+++ b/waf/watchguard.py
@@ -16,8 +16,9 @@ def detect(get_page):
retval = False
for vector in WAF_ATTACK_VECTORS:
- _, headers, code = get_page(get=vector)
+ page, headers, code = get_page(get=vector)
retval = code >= 400 and re.search(r"\AWatchGuard", headers.get(HTTP_HEADER.SERVER, ""), re.I) is not None
+ retval |= "Request denied by WatchGuard Firewall" in (page or "")
if retval:
break
From 12883cac166701434354d3aed7c7de6f1f8ca8c6 Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Mon, 7 Jan 2019 13:45:01 +0100
Subject: [PATCH 010/800] Minor update
---
lib/core/settings.py | 2 +-
txt/checksum.md5 | 4 ++--
waf/reblaze.py | 3 ++-
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/lib/core/settings.py b/lib/core/settings.py
index d673b455e3d..c59dc10232d 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.8"
+VERSION = "1.3.1.9"
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/txt/checksum.md5 b/txt/checksum.md5
index f9654769dc7..60cb8d989b7 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-f483f079c8682b64940e78c6b75bac77 lib/core/settings.py
+114e8b6f28ec0c03f083dd15bf257b28 lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -448,7 +448,7 @@ a59aff03a5b3fb40ea0feb3489677040 waf/onmessage.py
2979bb64c24256a83625d75a385dde9b waf/profense.py
8de0d46738335a4e498c4ac9038ac3c3 waf/proventia.py
ac60456fe7af4eb501d448910e98ee4b waf/radware.py
-dba6a3b52851d2d7a0a1ab83a51caa5a waf/reblaze.py
+1315066be1abb4f1d34290239be0af14 waf/reblaze.py
987389e4f403b7615d6d8006420a6260 waf/requestvalidationmode.py
8dae5619edafaaceccf1c4eb051c7d22 waf/rsfirewall.py
2a7b234e903d13b3c21d6c17e05d1c46 waf/safe3.py
diff --git a/waf/reblaze.py b/waf/reblaze.py
index a5a6a7936c1..0dd5c6546b7 100644
--- a/waf/reblaze.py
+++ b/waf/reblaze.py
@@ -16,9 +16,10 @@ def detect(get_page):
retval = False
for vector in WAF_ATTACK_VECTORS:
- _, headers, _ = get_page(get=vector)
+ page, headers, _ = get_page(get=vector)
retval = re.search(r"\Arbzid=", headers.get(HTTP_HEADER.SET_COOKIE, ""), re.I) is not None
retval |= re.search(r"Reblaze Secure Web Gateway", headers.get(HTTP_HEADER.SERVER, ""), re.I) is not None
+ retval |= all(_ in (page or "") for _ in ("Current session has been terminated", "For further information, do not hesitate to contact us", "Access denied (403)"))
if retval:
break
From fcfbc5d59f7c1e92c1c7cb615e385d0c546fff11 Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Mon, 7 Jan 2019 13:56:37 +0100
Subject: [PATCH 011/800] Removing junk
---
lib/core/settings.py | 2 +-
txt/checksum.md5 | 3 +--
waf/dosarrest.py | 25 -------------------------
3 files changed, 2 insertions(+), 28 deletions(-)
delete mode 100644 waf/dosarrest.py
diff --git a/lib/core/settings.py b/lib/core/settings.py
index c59dc10232d..754aaad8591 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.9"
+VERSION = "1.3.1.11"
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/txt/checksum.md5 b/txt/checksum.md5
index 60cb8d989b7..125a98093c5 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-114e8b6f28ec0c03f083dd15bf257b28 lib/core/settings.py
+de869bb9eb40f7f621d766c6560d0c13 lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -421,7 +421,6 @@ af079de99a8ec6988d28aa4c0aa32cf9 waf/cloudbric.py
f20b14ca9f7c2442fd1e9432d933a75b waf/datapower.py
e49bb75985f60556b4481dc085f3c62b waf/denyall.py
dbe50bbcb1b4664d6cebfcca63e75125 waf/distil.py
-2e8bf326975edcb4d627493c46c6807c waf/dosarrest.py
886c6502a6a2aae49921efed8d439f7b waf/dotdefender.py
a8412619d7f26ed6bc9e0b20a57b2324 waf/edgecast.py
3f440d629b31052e675ee9d48d4ce370 waf/expressionengine.py
diff --git a/waf/dosarrest.py b/waf/dosarrest.py
deleted file mode 100644
index 5d9666689b8..00000000000
--- a/waf/dosarrest.py
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/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__ = "DOSarrest (DOSarrest Internet Security)"
-
-def detect(get_page):
- retval = False
-
- for vector in WAF_ATTACK_VECTORS:
- _, headers, _ = get_page(get=vector)
- retval = re.search(r"DOSarrest", headers.get(HTTP_HEADER.SERVER, ""), re.I) is not None
- retval |= headers.get("X-DIS-Request-ID") is not None
- if retval:
- break
-
- return retval
From 8ceff3dcc7539e4058d4720bae8c4d56fb3b8b90 Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Mon, 7 Jan 2019 14:13:29 +0100
Subject: [PATCH 012/800] Cleaning junk and updating asm.py WAF script
---
lib/core/settings.py | 2 +-
txt/checksum.md5 | 5 ++---
waf/asm.py | 5 ++++-
waf/bigip.py | 30 ------------------------------
4 files changed, 7 insertions(+), 35 deletions(-)
delete mode 100644 waf/bigip.py
diff --git a/lib/core/settings.py b/lib/core/settings.py
index 754aaad8591..66065bf8fd3 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.11"
+VERSION = "1.3.1.12"
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/txt/checksum.md5 b/txt/checksum.md5
index 125a98093c5..1cfe5de2404 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-de869bb9eb40f7f621d766c6560d0c13 lib/core/settings.py
+9c1d73674867a376be098517216c6c05 lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -402,11 +402,10 @@ ca3ab78d6ed53b7f2c07ed2530d47efd udf/postgresql/windows/32/8.4/lib_postgresqlud
94eec6c5d02357596292d36a8533f08f waf/anquanbao.py
7ab1a7cd51a02899592f4f755d36a02e waf/approach.py
425f2599f57ab81b4fff67e6b442cccc waf/armor.py
-fac23fc2e564edaf90a4346f3ee525b0 waf/asm.py
+f0aa6abf1f9af78374e58a64cb33c9de waf/asm.py
9dbec5d674ed4c762ffc9bc3ab402739 waf/aws.py
29b14801171574a3d92a30542a32be54 waf/baidu.py
4fd9a8e3aac364fe5509b23e7eb5a448 waf/barracuda.py
-2bb132ecea25e947e7e82e32e7dd6b3a waf/bigip.py
742f8c9b7f3a858e11dfd2ce3df65c6e waf/binarysec.py
ef8c5db49ad9973b59d6b9b65b001714 waf/blockdos.py
2608fbe2c80fae99bb09db1f93d80cdd waf/bluedon.py
diff --git a/waf/asm.py b/waf/asm.py
index 6f07d5909a7..0b757be90b9 100644
--- a/waf/asm.py
+++ b/waf/asm.py
@@ -5,6 +5,8 @@
See the file 'LICENSE' for copying permission
"""
+import re
+
from lib.core.settings import WAF_ATTACK_VECTORS
__product__ = "Application Security Manager (F5 Networks)"
@@ -13,9 +15,10 @@ def detect(get_page):
retval = False
for vector in WAF_ATTACK_VECTORS:
- page, _, _ = get_page(get=vector)
+ page, headers, code = get_page(get=vector)
retval = "The requested URL was rejected. Please consult with your administrator." in (page or "")
retval |= all(_ in (page or "") for _ in ("This page can't be displayed. Contact support for additional information", "The incident ID is:"))
+ retval |= (code >= 400) and "ID" in (page or "") and re.search(r"\b\d{19}\b", page or "") is not None
if retval:
break
diff --git a/waf/bigip.py b/waf/bigip.py
deleted file mode 100644
index ff1d5dc7833..00000000000
--- a/waf/bigip.py
+++ /dev/null
@@ -1,30 +0,0 @@
-#!/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__ = "BIG-IP Application Security Manager (F5 Networks)"
-
-def detect(get_page):
- retval = False
-
- for vector in WAF_ATTACK_VECTORS:
- _, headers, code = get_page(get=vector)
- retval = headers.get("X-Cnection", "").lower() == "close"
- retval |= headers.get("X-WA-Info") is not None
- retval |= re.search(r"\bTS[0-9a-f]+=", headers.get(HTTP_HEADER.SET_COOKIE, "")) is not None
- retval |= re.search(r"BigIP|BIGipServer", headers.get(HTTP_HEADER.SET_COOKIE, ""), re.I) is not None
- retval |= re.search(r"BigIP|BIGipServer", headers.get(HTTP_HEADER.SERVER, ""), re.I) is not None
- retval |= re.search(r"\AF5\Z", headers.get(HTTP_HEADER.SERVER, ""), re.I) is not None
- retval &= code >= 400
- if retval:
- break
-
- return retval
From bdddc5c333cc0924251b9571c2acf9fd74f67a61 Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Mon, 7 Jan 2019 14:21:09 +0100
Subject: [PATCH 013/800] Some more junk removal
---
lib/core/settings.py | 2 +-
txt/checksum.md5 | 3 +--
waf/baidu.py | 25 -------------------------
3 files changed, 2 insertions(+), 28 deletions(-)
delete mode 100644 waf/baidu.py
diff --git a/lib/core/settings.py b/lib/core/settings.py
index 66065bf8fd3..9aa07c70f0b 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.12"
+VERSION = "1.3.1.13"
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/txt/checksum.md5 b/txt/checksum.md5
index 1cfe5de2404..c6519339b25 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-9c1d73674867a376be098517216c6c05 lib/core/settings.py
+3374084a74747b46a1fa4f7dd77d6a84 lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -404,7 +404,6 @@ ca3ab78d6ed53b7f2c07ed2530d47efd udf/postgresql/windows/32/8.4/lib_postgresqlud
425f2599f57ab81b4fff67e6b442cccc waf/armor.py
f0aa6abf1f9af78374e58a64cb33c9de waf/asm.py
9dbec5d674ed4c762ffc9bc3ab402739 waf/aws.py
-29b14801171574a3d92a30542a32be54 waf/baidu.py
4fd9a8e3aac364fe5509b23e7eb5a448 waf/barracuda.py
742f8c9b7f3a858e11dfd2ce3df65c6e waf/binarysec.py
ef8c5db49ad9973b59d6b9b65b001714 waf/blockdos.py
diff --git a/waf/baidu.py b/waf/baidu.py
deleted file mode 100644
index 50e5542cad4..00000000000
--- a/waf/baidu.py
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/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__ = "Yunjiasu Web Application Firewall (Baidu)"
-
-def detect(get_page):
- retval = False
-
- for vector in WAF_ATTACK_VECTORS:
- _, headers, _ = get_page(get=vector)
- retval = re.search(r"fhl", headers.get("X-Server", ""), re.I) is not None
- retval |= re.search(r"yunjiasu-nginx", headers.get(HTTP_HEADER.SERVER, ""), re.I) is not None
- if retval:
- break
-
- return retval
From 3b7ef42b3035eae3efd6c0c3472fa9599d5be36b Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Mon, 7 Jan 2019 14:23:20 +0100
Subject: [PATCH 014/800] Goodbye junk
---
lib/core/settings.py | 2 +-
txt/checksum.md5 | 3 +--
waf/datapower.py | 23 -----------------------
3 files changed, 2 insertions(+), 26 deletions(-)
delete mode 100644 waf/datapower.py
diff --git a/lib/core/settings.py b/lib/core/settings.py
index 9aa07c70f0b..7b29d4b29f3 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.13"
+VERSION = "1.3.1.14"
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/txt/checksum.md5 b/txt/checksum.md5
index c6519339b25..76b7f48a205 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-3374084a74747b46a1fa4f7dd77d6a84 lib/core/settings.py
+5d00504dbff5507227df4f7cda1c41aa lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -416,7 +416,6 @@ af079de99a8ec6988d28aa4c0aa32cf9 waf/cloudbric.py
8414f766b0171fbc264c46ad40dff237 waf/cloudfront.py
847ee97f6e0f8aeec61afd3e0c91543b waf/comodo.py
4ed76fdf2add2405bb6157ac025e01b9 waf/crawlprotect.py
-f20b14ca9f7c2442fd1e9432d933a75b waf/datapower.py
e49bb75985f60556b4481dc085f3c62b waf/denyall.py
dbe50bbcb1b4664d6cebfcca63e75125 waf/distil.py
886c6502a6a2aae49921efed8d439f7b waf/dotdefender.py
diff --git a/waf/datapower.py b/waf/datapower.py
deleted file mode 100644
index b1af70a8f6a..00000000000
--- a/waf/datapower.py
+++ /dev/null
@@ -1,23 +0,0 @@
-#!/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__ = "IBM WebSphere DataPower (IBM)"
-
-def detect(get_page):
- retval = False
-
- for vector in WAF_ATTACK_VECTORS:
- _, headers, _ = get_page(get=vector)
- retval = re.search(r"\A(OK|FAIL)", headers.get("X-Backside-Transport", ""), re.I) is not None
- if retval:
- break
-
- return retval
From 48cdc6a308b43cc088d6cf9ce264fa37366efa0a Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Mon, 7 Jan 2019 14:44:31 +0100
Subject: [PATCH 015/800] Wrong naming fix
---
lib/core/settings.py | 2 +-
txt/checksum.md5 | 4 ++--
waf/{immunify360.py => imunify360.py} | 0
3 files changed, 3 insertions(+), 3 deletions(-)
rename waf/{immunify360.py => imunify360.py} (100%)
diff --git a/lib/core/settings.py b/lib/core/settings.py
index 7b29d4b29f3..3a3a6c1243e 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.14"
+VERSION = "1.3.1.15"
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/txt/checksum.md5 b/txt/checksum.md5
index 76b7f48a205..226833f0f5e 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-5d00504dbff5507227df4f7cda1c41aa lib/core/settings.py
+098028ac6cec0095c6ffd8019d448b1c lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -425,7 +425,7 @@ a8412619d7f26ed6bc9e0b20a57b2324 waf/edgecast.py
0e9eb20967d2dde941cca8c663a63e1f waf/generic.py
4ea580dd1b9679bd733866976ad5d81e waf/godaddy.py
2aa7775dac8df4a3cdb736fdf51dc9cb waf/hyperguard.py
-256a7ea2c1cd2745fe788cf8f6123f8a waf/immunify360.py
+256a7ea2c1cd2745fe788cf8f6123f8a waf/imunify360.py
1adbd0c470d1bbcec370722f05094255 waf/incapsula.py
fb6be55d21a70765e35549af2484f762 waf/__init__.py
a3ee375714987acccc26d1b07c2e8af7 waf/isaserver.py
diff --git a/waf/immunify360.py b/waf/imunify360.py
similarity index 100%
rename from waf/immunify360.py
rename to waf/imunify360.py
From 929df9bc34437942e3bb6257ad7948e50c541cca Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Mon, 7 Jan 2019 15:29:35 +0100
Subject: [PATCH 016/800] Minor update of WAF scripts
---
lib/core/settings.py | 2 +-
txt/checksum.md5 | 6 +++---
waf/asm.py | 2 +-
waf/paloalto.py | 1 +
4 files changed, 6 insertions(+), 5 deletions(-)
diff --git a/lib/core/settings.py b/lib/core/settings.py
index 3a3a6c1243e..be514744455 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.15"
+VERSION = "1.3.1.16"
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/txt/checksum.md5 b/txt/checksum.md5
index 226833f0f5e..153597df80f 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-098028ac6cec0095c6ffd8019d448b1c lib/core/settings.py
+4a682eb379b6eeec3ff41548baf8363f lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -402,7 +402,7 @@ ca3ab78d6ed53b7f2c07ed2530d47efd udf/postgresql/windows/32/8.4/lib_postgresqlud
94eec6c5d02357596292d36a8533f08f waf/anquanbao.py
7ab1a7cd51a02899592f4f755d36a02e waf/approach.py
425f2599f57ab81b4fff67e6b442cccc waf/armor.py
-f0aa6abf1f9af78374e58a64cb33c9de waf/asm.py
+069a99125ae1aa6fb3babe81e42d3e94 waf/asm.py
9dbec5d674ed4c762ffc9bc3ab402739 waf/aws.py
4fd9a8e3aac364fe5509b23e7eb5a448 waf/barracuda.py
742f8c9b7f3a858e11dfd2ce3df65c6e waf/binarysec.py
@@ -440,7 +440,7 @@ d4f36e44f496f4d51baa3241eabc60fd waf/malcare.py
d03dfe93a14c966b88f5baf59ce2b091 waf/ninjafirewall.py
69fc40e85751279e9018d643742db04e waf/nsfocus.py
a59aff03a5b3fb40ea0feb3489677040 waf/onmessage.py
-7ff3c93f2c77a984ebbf217c7c38a796 waf/paloalto.py
+532b6f8de357a9b88a313944e1756538 waf/paloalto.py
2979bb64c24256a83625d75a385dde9b waf/profense.py
8de0d46738335a4e498c4ac9038ac3c3 waf/proventia.py
ac60456fe7af4eb501d448910e98ee4b waf/radware.py
diff --git a/waf/asm.py b/waf/asm.py
index 0b757be90b9..5b9a4aff345 100644
--- a/waf/asm.py
+++ b/waf/asm.py
@@ -18,7 +18,7 @@ def detect(get_page):
page, headers, code = get_page(get=vector)
retval = "The requested URL was rejected. Please consult with your administrator." in (page or "")
retval |= all(_ in (page or "") for _ in ("This page can't be displayed. Contact support for additional information", "The incident ID is:"))
- retval |= (code >= 400) and "ID" in (page or "") and re.search(r"\b\d{19}\b", page or "") is not None
+ retval |= re.search(r"(?i)Support.ID", page or "") and re.search(r"\b\d{19}\b", page or "") is not None
if retval:
break
diff --git a/waf/paloalto.py b/waf/paloalto.py
index b23892a2c2d..ef059653107 100644
--- a/waf/paloalto.py
+++ b/waf/paloalto.py
@@ -17,6 +17,7 @@ def detect(get_page):
for vector in WAF_ATTACK_VECTORS:
page, _, _ = get_page(get=vector)
retval = re.search(r"has been blocked in accordance with company policy", page or "", re.I) is not None
+ retval |= all(_ in (page or "") for _ in ("Palo Alto Next Generation Security Platform", "Download Blocked"))
if retval:
break
From ba617c49a4d39c76ca12f6644c897b3ebee5a5c0 Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Mon, 7 Jan 2019 15:35:54 +0100
Subject: [PATCH 017/800] Minor patch
---
lib/core/settings.py | 2 +-
txt/checksum.md5 | 4 ++--
waf/asm.py | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/core/settings.py b/lib/core/settings.py
index be514744455..b626e194cb7 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.16"
+VERSION = "1.3.1.17"
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/txt/checksum.md5 b/txt/checksum.md5
index 153597df80f..4082e6d7538 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-4a682eb379b6eeec3ff41548baf8363f lib/core/settings.py
+b7fcdd7fd2733a559b004546438eaf72 lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -402,7 +402,7 @@ ca3ab78d6ed53b7f2c07ed2530d47efd udf/postgresql/windows/32/8.4/lib_postgresqlud
94eec6c5d02357596292d36a8533f08f waf/anquanbao.py
7ab1a7cd51a02899592f4f755d36a02e waf/approach.py
425f2599f57ab81b4fff67e6b442cccc waf/armor.py
-069a99125ae1aa6fb3babe81e42d3e94 waf/asm.py
+e1fb3427009619b39c42324f7e41c16e waf/asm.py
9dbec5d674ed4c762ffc9bc3ab402739 waf/aws.py
4fd9a8e3aac364fe5509b23e7eb5a448 waf/barracuda.py
742f8c9b7f3a858e11dfd2ce3df65c6e waf/binarysec.py
diff --git a/waf/asm.py b/waf/asm.py
index 5b9a4aff345..220c6fbd595 100644
--- a/waf/asm.py
+++ b/waf/asm.py
@@ -18,7 +18,7 @@ def detect(get_page):
page, headers, code = get_page(get=vector)
retval = "The requested URL was rejected. Please consult with your administrator." in (page or "")
retval |= all(_ in (page or "") for _ in ("This page can't be displayed. Contact support for additional information", "The incident ID is:"))
- retval |= re.search(r"(?i)Support.ID", page or "") and re.search(r"\b\d{19}\b", page or "") is not None
+ retval |= re.search(r"(?i)Support.ID", page or "") is not None and re.search(r"\b\d{19}\b", page or "") is not None
if retval:
break
From 97cf5b9ace428040fedfb3c76f751e582ed78a16 Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Mon, 7 Jan 2019 15:52:22 +0100
Subject: [PATCH 018/800] New WAF script
---
lib/core/settings.py | 2 +-
txt/checksum.md5 | 3 ++-
waf/stackpath.py | 22 ++++++++++++++++++++++
3 files changed, 25 insertions(+), 2 deletions(-)
create mode 100644 waf/stackpath.py
diff --git a/lib/core/settings.py b/lib/core/settings.py
index b626e194cb7..2cff35d8dc1 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.17"
+VERSION = "1.3.1.18"
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/txt/checksum.md5 b/txt/checksum.md5
index 4082e6d7538..1633f3525f4 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-b7fcdd7fd2733a559b004546438eaf72 lib/core/settings.py
+b23dad136d358b0b109459f85b713ed9 lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -455,6 +455,7 @@ ba37e1c37fa0e3688873f74183a9cb9c waf/senginx.py
4d79866c7cff0d7650a22d0a85126c05 waf/sitelock.py
a840fcd2bb042694f9aab2859e7c9b30 waf/sonicwall.py
45683bfe7a428f47745416c727a789bd waf/sophos.py
+197bae9ee9b7e8d4f77e814a33cfd665 waf/stackpath.py
a0aa5997d0d5db18920840220dc4ad36 waf/stingray.py
74bd52941b606d15f1a6cdc7b52f761c waf/sucuri.py
205beb7ed5e70119f8700a9e295b6a4a waf/tencent.py
diff --git a/waf/stackpath.py b/waf/stackpath.py
new file mode 100644
index 00000000000..20c1a630e63
--- /dev/null
+++ b/waf/stackpath.py
@@ -0,0 +1,22 @@
+#!/usr/bin/env python
+
+"""
+Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
+See the file 'LICENSE' for copying permission
+"""
+
+from lib.core.enums import HTTP_HEADER
+from lib.core.settings import WAF_ATTACK_VECTORS
+
+__product__ = "StackPath Web Application Firewall (StackPath LLC)"
+
+def detect(get_page):
+ retval = False
+
+ for vector in WAF_ATTACK_VECTORS:
+ page, _, _ = get_page(get=vector)
+ retval = all(_ in (page or "") for _ in ("This website is using a security service to protect itself from online attacks", "You performed an action that triggered the service and blocked your request"))
+ if retval:
+ break
+
+ return retval
From 3b4e44a38d061c7d5686ff8a701dc7f4358a6c0c Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Mon, 7 Jan 2019 16:05:59 +0100
Subject: [PATCH 019/800] Better results with following the redirect in
identifyWaf phase
---
lib/controller/checks.py | 2 +-
lib/core/settings.py | 2 +-
txt/checksum.md5 | 6 +++---
3 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/controller/checks.py b/lib/controller/checks.py
index 63194d46b10..334cc7511d8 100644
--- a/lib/controller/checks.py
+++ b/lib/controller/checks.py
@@ -1418,7 +1418,7 @@ def _(*args, **kwargs):
page, headers, code = None, None, None
try:
pushValue(kb.redirectChoice)
- kb.redirectChoice = REDIRECTION.NO
+ kb.redirectChoice = REDIRECTION.YES
if kwargs.get("get"):
kwargs["get"] = urlencode(kwargs["get"])
kwargs["raise404"] = False
diff --git a/lib/core/settings.py b/lib/core/settings.py
index 2cff35d8dc1..61da67448a0 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.18"
+VERSION = "1.3.1.19"
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/txt/checksum.md5 b/txt/checksum.md5
index 1633f3525f4..2eda37222a5 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -23,7 +23,7 @@ fb6be55d21a70765e35549af2484f762 extra/sqlharvest/__init__.py
fb6be55d21a70765e35549af2484f762 extra/wafdetectify/__init__.py
be1d8f7b74ad64226c61b1a74251f8ff extra/wafdetectify/wafdetectify.py
d0f2b424f5b2b06f26cdd7076d61be6e lib/controller/action.py
-32959690fd69f4131cbb8abc051114e9 lib/controller/checks.py
+02190e90bd7be774f800b7eabe589dd9 lib/controller/checks.py
3c18f0b1d1b9fda682201a264f170b31 lib/controller/controller.py
e97a9d34fef5761a8eab6432ce3c7c53 lib/controller/handler.py
fb6be55d21a70765e35549af2484f762 lib/controller/__init__.py
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-b23dad136d358b0b109459f85b713ed9 lib/core/settings.py
+3bf16fd13fe8bb9ec803ac0ae4d28b48 lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -402,7 +402,7 @@ ca3ab78d6ed53b7f2c07ed2530d47efd udf/postgresql/windows/32/8.4/lib_postgresqlud
94eec6c5d02357596292d36a8533f08f waf/anquanbao.py
7ab1a7cd51a02899592f4f755d36a02e waf/approach.py
425f2599f57ab81b4fff67e6b442cccc waf/armor.py
-e1fb3427009619b39c42324f7e41c16e waf/asm.py
+33b6e6793ed3add457d7c909ec599ad3 waf/asm.py
9dbec5d674ed4c762ffc9bc3ab402739 waf/aws.py
4fd9a8e3aac364fe5509b23e7eb5a448 waf/barracuda.py
742f8c9b7f3a858e11dfd2ce3df65c6e waf/binarysec.py
From bf207a7ea667a3e74e124368857199268d50bba3 Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Mon, 7 Jan 2019 16:06:33 +0100
Subject: [PATCH 020/800] Minor improvement
---
lib/core/settings.py | 2 +-
txt/checksum.md5 | 2 +-
waf/asm.py | 1 +
3 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/lib/core/settings.py b/lib/core/settings.py
index 61da67448a0..3bdf180f876 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.19"
+VERSION = "1.3.1.20"
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/txt/checksum.md5 b/txt/checksum.md5
index 2eda37222a5..04f59ab9f65 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-3bf16fd13fe8bb9ec803ac0ae4d28b48 lib/core/settings.py
+9a31fe00e29a69beeb4e4a7b78b58215 lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
diff --git a/waf/asm.py b/waf/asm.py
index 220c6fbd595..e34b0671c21 100644
--- a/waf/asm.py
+++ b/waf/asm.py
@@ -19,6 +19,7 @@ def detect(get_page):
retval = "The requested URL was rejected. Please consult with your administrator." in (page or "")
retval |= all(_ in (page or "") for _ in ("This page can't be displayed. Contact support for additional information", "The incident ID is:"))
retval |= re.search(r"(?i)Support.ID", page or "") is not None and re.search(r"\b\d{19}\b", page or "") is not None
+ retval |= all(_ in (page or "") for _ in ("security.f5aas.com", "Please enable JavaScript to view the page content"))
if retval:
break
From cb72223452335c96d8f6be636294ea1add73c0c6 Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Mon, 7 Jan 2019 16:23:18 +0100
Subject: [PATCH 021/800] Minor patch
---
extra/wafdetectify/wafdetectify.py | 2 +-
lib/core/settings.py | 2 +-
txt/checksum.md5 | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/extra/wafdetectify/wafdetectify.py b/extra/wafdetectify/wafdetectify.py
index 3842ad23738..d46f6fd64cc 100644
--- a/extra/wafdetectify/wafdetectify.py
+++ b/extra/wafdetectify/wafdetectify.py
@@ -19,7 +19,7 @@
NAME, VERSION, AUTHOR = "WAF Detectify", "0.1", "sqlmap developers (@sqlmap)"
TIMEOUT = 10
-HEADERS = {"User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Accept-Language": "en-US,en;q=0.5", "Accept-Encoding": "gzip, deflate", "Cache-Control": "max-age=0"}
+HEADERS = {"User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Accept-Language": "en-US,en;q=0.5", "Accept-Encoding": "identity", "Cache-Control": "max-age=0"}
SQLMAP_DIR = os.path.abspath(os.path.join(os.path.dirname(__file__), "..", ".."))
SCRIPTS_DIR = os.path.join(SQLMAP_DIR, "waf")
LEVEL_COLORS = {"o": "\033[00;94m", "x": "\033[00;91m", "!": "\033[00;93m", "i": "\033[00;92m"}
diff --git a/lib/core/settings.py b/lib/core/settings.py
index 3bdf180f876..fff5d165b52 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.20"
+VERSION = "1.3.1.21"
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/txt/checksum.md5 b/txt/checksum.md5
index 04f59ab9f65..6cf3da0ed13 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -21,7 +21,7 @@ e4805169a081b834ca51a60a150c7247 extra/shutils/newlines.py
fb6be55d21a70765e35549af2484f762 extra/sqlharvest/__init__.py
53d5dcba047f1285e32b9e88d2803ebf extra/sqlharvest/sqlharvest.py
fb6be55d21a70765e35549af2484f762 extra/wafdetectify/__init__.py
-be1d8f7b74ad64226c61b1a74251f8ff extra/wafdetectify/wafdetectify.py
+4d0912a9d16ab8cacd460649ed54d660 extra/wafdetectify/wafdetectify.py
d0f2b424f5b2b06f26cdd7076d61be6e lib/controller/action.py
02190e90bd7be774f800b7eabe589dd9 lib/controller/checks.py
3c18f0b1d1b9fda682201a264f170b31 lib/controller/controller.py
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-9a31fe00e29a69beeb4e4a7b78b58215 lib/core/settings.py
+694ae503d232f28a93f5ed5b4ff963e1 lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
From 243b564b6aa39fdf7189450a4901bcd140751282 Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Mon, 7 Jan 2019 17:22:16 +0100
Subject: [PATCH 022/800] Minor updates to WAF scripts
---
lib/core/settings.py | 2 +-
txt/checksum.md5 | 6 +++---
waf/sitelock.py | 2 +-
waf/virusdie.py | 2 +-
4 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/lib/core/settings.py b/lib/core/settings.py
index fff5d165b52..6a177aec394 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.21"
+VERSION = "1.3.1.22"
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/txt/checksum.md5 b/txt/checksum.md5
index 6cf3da0ed13..f988c712069 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-694ae503d232f28a93f5ed5b4ff963e1 lib/core/settings.py
+f32c2c0a78e084114e793736d30fb241 lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -452,7 +452,7 @@ ac60456fe7af4eb501d448910e98ee4b waf/radware.py
ac0728ddb7a15b46b0eabd78cd661f8c waf/secureiis.py
ba37e1c37fa0e3688873f74183a9cb9c waf/senginx.py
2602a8baed4da643e606a379e4dc75db waf/shieldsecurity.py
-4d79866c7cff0d7650a22d0a85126c05 waf/sitelock.py
+2e66f471c09149b56258e42883aae18d waf/sitelock.py
a840fcd2bb042694f9aab2859e7c9b30 waf/sonicwall.py
45683bfe7a428f47745416c727a789bd waf/sophos.py
197bae9ee9b7e8d4f77e814a33cfd665 waf/stackpath.py
@@ -464,7 +464,7 @@ ba0fb1e6b815446b9d6f30950900fc80 waf/trafficshield.py
876c746d96193071271cb8b7e00e1422 waf/urlscan.py
45f28286ffd89200d4c9b6d88a7a518f waf/uspses.py
2d9d9fa8359a9f721e4b977d3da52410 waf/varnish.py
-2be220869fae5a942a460428c84345af waf/virusdie.py
+455bb16f552e7943e0a5cf35e83a74ea waf/virusdie.py
67df54343a85fe053226e2a5483b2c64 waf/wallarm.py
114000c53115fa8f4dd9b1b9122ec32a waf/watchguard.py
c8dcaa89f6cde684a578fdc2e9ab2bb8 waf/webappsecure.py
diff --git a/waf/sitelock.py b/waf/sitelock.py
index 03eb231d1d5..d39d07a7143 100644
--- a/waf/sitelock.py
+++ b/waf/sitelock.py
@@ -14,7 +14,7 @@ def detect(get_page):
for vector in WAF_ATTACK_VECTORS:
page, _, _ = get_page(get=vector)
- retval |= any(_ in (page or "") for _ in ("SiteLock Incident ID", "sitelock-site-verification", "sitelock_shield_logo"))
+ retval |= any(_ in (page or "") for _ in ("SiteLock Incident ID", ''))
if retval:
break
diff --git a/waf/virusdie.py b/waf/virusdie.py
index b6d5f31ac8e..69c0ff76ce6 100644
--- a/waf/virusdie.py
+++ b/waf/virusdie.py
@@ -14,6 +14,6 @@ def detect(get_page):
for vector in WAF_ATTACK_VECTORS:
page, _, _ = get_page(get=vector)
- retval = any(_ in (page or "") for _ in ("| Virusdie", "http://cdn.virusdie.ru/splash/firewallstop.png", "© Virusdie.ru"))
+ retval = any(_ in (page or "") for _ in ("| Virusdie", "http://cdn.virusdie.ru/splash/firewallstop.png", "© Virusdie.ru", '
Date: Tue, 8 Jan 2019 11:17:42 +0100
Subject: [PATCH 023/800] Removing junk
---
lib/core/settings.py | 2 +-
txt/checksum.md5 | 3 +--
waf/webappsecure.py | 15 ---------------
3 files changed, 2 insertions(+), 18 deletions(-)
delete mode 100644 waf/webappsecure.py
diff --git a/lib/core/settings.py b/lib/core/settings.py
index 6a177aec394..65652d4e73a 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.22"
+VERSION = "1.3.1.23"
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/txt/checksum.md5 b/txt/checksum.md5
index f988c712069..419d8348792 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-f32c2c0a78e084114e793736d30fb241 lib/core/settings.py
+31b674a0b6ac1a6ef4ceefa5553ec310 lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -467,7 +467,6 @@ ba0fb1e6b815446b9d6f30950900fc80 waf/trafficshield.py
455bb16f552e7943e0a5cf35e83a74ea waf/virusdie.py
67df54343a85fe053226e2a5483b2c64 waf/wallarm.py
114000c53115fa8f4dd9b1b9122ec32a waf/watchguard.py
-c8dcaa89f6cde684a578fdc2e9ab2bb8 waf/webappsecure.py
a7b8c4c3d1463409e0e204932f0ddff0 waf/webknight.py
ac9e4e3ced77012ed97284634a9ffc74 waf/wordfence.py
e16122cb40e5f3a66cba359cfb672bd2 waf/yundun.py
diff --git a/waf/webappsecure.py b/waf/webappsecure.py
deleted file mode 100644
index e966302c0db..00000000000
--- a/waf/webappsecure.py
+++ /dev/null
@@ -1,15 +0,0 @@
-#!/usr/bin/env python
-
-"""
-Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
-See the file 'LICENSE' for copying permission
-"""
-
-__product__ = "webApp.secure (webScurity)"
-
-def detect(get_page):
- _, _, code = get_page()
- if code == 403:
- return False
- _, _, code = get_page(get="nx=@@")
- return code == 403
From 02b78d2691da7d88d8c8a42cf3877598174c8e40 Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Tue, 8 Jan 2019 12:41:05 +0100
Subject: [PATCH 024/800] Update of WAF scripts
---
lib/core/settings.py | 2 +-
txt/checksum.md5 | 7 ++++---
waf/cerber.py | 23 +++++++++++++++++++++++
waf/incapsula.py | 2 ++
waf/sitelock.py | 1 +
5 files changed, 31 insertions(+), 4 deletions(-)
create mode 100644 waf/cerber.py
diff --git a/lib/core/settings.py b/lib/core/settings.py
index 65652d4e73a..a9483c89286 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.23"
+VERSION = "1.3.1.24"
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/txt/checksum.md5 b/txt/checksum.md5
index 419d8348792..89f7744c603 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-31b674a0b6ac1a6ef4ceefa5553ec310 lib/core/settings.py
+a2e11fb9226d7b7348cff412042edd18 lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -408,6 +408,7 @@ ca3ab78d6ed53b7f2c07ed2530d47efd udf/postgresql/windows/32/8.4/lib_postgresqlud
742f8c9b7f3a858e11dfd2ce3df65c6e waf/binarysec.py
ef8c5db49ad9973b59d6b9b65b001714 waf/blockdos.py
2608fbe2c80fae99bb09db1f93d80cdd waf/bluedon.py
+51c13712456699f23324f0a410ce6f93 waf/cerber.py
5ae64cad95b7f904c350cc81230c3bd1 waf/chinacache.py
a05edf8f2962dfff0457b7a4fd5e169c waf/ciscoacexml.py
2565869c73a9a37f25deb317e8f5d9dd waf/cleantalk.py
@@ -426,7 +427,7 @@ a8412619d7f26ed6bc9e0b20a57b2324 waf/edgecast.py
4ea580dd1b9679bd733866976ad5d81e waf/godaddy.py
2aa7775dac8df4a3cdb736fdf51dc9cb waf/hyperguard.py
256a7ea2c1cd2745fe788cf8f6123f8a waf/imunify360.py
-1adbd0c470d1bbcec370722f05094255 waf/incapsula.py
+4c4d480c155ae99262043c80a76ec1d5 waf/incapsula.py
fb6be55d21a70765e35549af2484f762 waf/__init__.py
a3ee375714987acccc26d1b07c2e8af7 waf/isaserver.py
ce9cf35919a92d65347bb74ca0c5c86f waf/jiasule.py
@@ -452,7 +453,7 @@ ac60456fe7af4eb501d448910e98ee4b waf/radware.py
ac0728ddb7a15b46b0eabd78cd661f8c waf/secureiis.py
ba37e1c37fa0e3688873f74183a9cb9c waf/senginx.py
2602a8baed4da643e606a379e4dc75db waf/shieldsecurity.py
-2e66f471c09149b56258e42883aae18d waf/sitelock.py
+24f1cc66625e58e4c91c0cb4364a2202 waf/sitelock.py
a840fcd2bb042694f9aab2859e7c9b30 waf/sonicwall.py
45683bfe7a428f47745416c727a789bd waf/sophos.py
197bae9ee9b7e8d4f77e814a33cfd665 waf/stackpath.py
diff --git a/waf/cerber.py b/waf/cerber.py
new file mode 100644
index 00000000000..9141b31fda3
--- /dev/null
+++ b/waf/cerber.py
@@ -0,0 +1,23 @@
+#!/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__ = "WP Cerber Security (Cerber Tech)"
+
+def detect(get_page):
+ retval = False
+
+ for vector in WAF_ATTACK_VECTORS:
+ page, _, _ = get_page(get=vector)
+ retval = any(_ in (page or "") for _ in ("We're sorry, you are not allowed to proceed", "Your request looks suspicious or similar to automated requests from spam posting software"))
+ if retval:
+ break
+
+ return retval
diff --git a/waf/incapsula.py b/waf/incapsula.py
index 2d52644560b..6ece7005ed8 100644
--- a/waf/incapsula.py
+++ b/waf/incapsula.py
@@ -21,6 +21,8 @@ def detect(get_page):
retval |= re.search(r"Incapsula", headers.get("X-CDN", ""), re.I) is not None
retval |= any(_ in (page or "") for _ in ("Incapsula incident ID", "_Incapsula_Resource?", "?subject=WAF Block Page:"))
retval |= all(_ in (page or "") for _ in ("Application Firewall Error", "If you feel you have been blocked in error, please contact Customer Support"))
+ retval |= all(_ in (page or "") for _ in ("Error code 15", "This request was blocked by the security rules"))
+ retval |= re.search(r"(?i)incident.{1,100}?\b\d{19}\-\d{17}\b", page or "") is not None
retval |= headers.get("X-Iinfo") is not None
if retval:
break
diff --git a/waf/sitelock.py b/waf/sitelock.py
index d39d07a7143..42cb0e76821 100644
--- a/waf/sitelock.py
+++ b/waf/sitelock.py
@@ -9,6 +9,7 @@
__product__ = "TrueShield Web Application Firewall (SiteLock)"
+# Note: https://www.whitefirdesign.com/blog/2016/11/08/more-evidence-that-sitelocks-trueshield-web-application-firewall-is-really-incapsulas-waf/
def detect(get_page):
retval = False
From 49514adcd9bb893ebe1b6d1344195f4e58701e12 Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Tue, 8 Jan 2019 12:58:27 +0100
Subject: [PATCH 025/800] Minor patch
---
extra/wafdetectify/wafdetectify.py | 15 +++++++++++++--
lib/core/settings.py | 2 +-
txt/checksum.md5 | 4 ++--
3 files changed, 16 insertions(+), 5 deletions(-)
diff --git a/extra/wafdetectify/wafdetectify.py b/extra/wafdetectify/wafdetectify.py
index d46f6fd64cc..bf5dc4bdb3b 100644
--- a/extra/wafdetectify/wafdetectify.py
+++ b/extra/wafdetectify/wafdetectify.py
@@ -11,12 +11,17 @@
import inspect
import os
import re
+import socket
+import ssl
import subprocess
import sys
import urllib2
sys.dont_write_bytecode = True
+if hasattr(ssl, "_create_unverified_context"):
+ ssl._create_default_https_context = ssl._create_unverified_context
+
NAME, VERSION, AUTHOR = "WAF Detectify", "0.1", "sqlmap developers (@sqlmap)"
TIMEOUT = 10
HEADERS = {"User-Agent": "Mozilla/5.0 (X11; Ubuntu; Linux x86_64; rv:61.0) Gecko/20100101 Firefox/61.0", "Accept": "text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8", "Accept-Language": "en-US,en;q=0.5", "Accept-Encoding": "identity", "Cache-Control": "max-age=0"}
@@ -101,14 +106,20 @@ def main():
print colorize("[i] checking '%s'..." % sys.argv[1])
+ hostname = sys.argv[1].split("//")[-1].split('/')[0]
+ try:
+ socket.getaddrinfo(hostname, None)
+ except socket.gaierror:
+ print colorize("[x] host '%s' does not exist" % hostname)
+ exit(1)
+
found = False
for function, product in WAF_FUNCTIONS:
if found and "unknown" in product.lower():
continue
if function(get_page):
- print colorize("[!] WAF/IPS identified as '%s'" % product)
- found = True
+ exit(colorize("[!] WAF/IPS identified as '%s'" % product))
if not found:
print colorize("[o] nothing found")
diff --git a/lib/core/settings.py b/lib/core/settings.py
index a9483c89286..09c4d8860be 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.24"
+VERSION = "1.3.1.25"
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/txt/checksum.md5 b/txt/checksum.md5
index 89f7744c603..7f24a66f7e7 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -21,7 +21,7 @@ e4805169a081b834ca51a60a150c7247 extra/shutils/newlines.py
fb6be55d21a70765e35549af2484f762 extra/sqlharvest/__init__.py
53d5dcba047f1285e32b9e88d2803ebf extra/sqlharvest/sqlharvest.py
fb6be55d21a70765e35549af2484f762 extra/wafdetectify/__init__.py
-4d0912a9d16ab8cacd460649ed54d660 extra/wafdetectify/wafdetectify.py
+f73623c18b7f6ebb71f10e124b1b93c9 extra/wafdetectify/wafdetectify.py
d0f2b424f5b2b06f26cdd7076d61be6e lib/controller/action.py
02190e90bd7be774f800b7eabe589dd9 lib/controller/checks.py
3c18f0b1d1b9fda682201a264f170b31 lib/controller/controller.py
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-a2e11fb9226d7b7348cff412042edd18 lib/core/settings.py
+41376018e1ec67c302bb69ded1c2b427 lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
From debb64167af66e88864605ff5b39ccc871f63921 Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Tue, 8 Jan 2019 15:36:28 +0100
Subject: [PATCH 026/800] Minor update of WAF scripts
---
lib/core/settings.py | 2 +-
txt/checksum.md5 | 8 ++++----
waf/cerber.py | 2 --
waf/expressionengine.py | 6 +++++-
waf/stackpath.py | 1 -
5 files changed, 10 insertions(+), 9 deletions(-)
diff --git a/lib/core/settings.py b/lib/core/settings.py
index 09c4d8860be..c3d6200d1f2 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.25"
+VERSION = "1.3.1.26"
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/txt/checksum.md5 b/txt/checksum.md5
index 7f24a66f7e7..4dab4fa92c0 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-41376018e1ec67c302bb69ded1c2b427 lib/core/settings.py
+6696b297ceb42a671f3a326d9e63f99a lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -408,7 +408,7 @@ ca3ab78d6ed53b7f2c07ed2530d47efd udf/postgresql/windows/32/8.4/lib_postgresqlud
742f8c9b7f3a858e11dfd2ce3df65c6e waf/binarysec.py
ef8c5db49ad9973b59d6b9b65b001714 waf/blockdos.py
2608fbe2c80fae99bb09db1f93d80cdd waf/bluedon.py
-51c13712456699f23324f0a410ce6f93 waf/cerber.py
+8385218d8a1863dbfd4274db36880dfe waf/cerber.py
5ae64cad95b7f904c350cc81230c3bd1 waf/chinacache.py
a05edf8f2962dfff0457b7a4fd5e169c waf/ciscoacexml.py
2565869c73a9a37f25deb317e8f5d9dd waf/cleantalk.py
@@ -421,7 +421,7 @@ e49bb75985f60556b4481dc085f3c62b waf/denyall.py
dbe50bbcb1b4664d6cebfcca63e75125 waf/distil.py
886c6502a6a2aae49921efed8d439f7b waf/dotdefender.py
a8412619d7f26ed6bc9e0b20a57b2324 waf/edgecast.py
-3f440d629b31052e675ee9d48d4ce370 waf/expressionengine.py
+b65877b412a4c648aa442116ef94e2af waf/expressionengine.py
588d2f9a8f201e120e74e508564cb487 waf/fortiweb.py
0e9eb20967d2dde941cca8c663a63e1f waf/generic.py
4ea580dd1b9679bd733866976ad5d81e waf/godaddy.py
@@ -456,7 +456,7 @@ ba37e1c37fa0e3688873f74183a9cb9c waf/senginx.py
24f1cc66625e58e4c91c0cb4364a2202 waf/sitelock.py
a840fcd2bb042694f9aab2859e7c9b30 waf/sonicwall.py
45683bfe7a428f47745416c727a789bd waf/sophos.py
-197bae9ee9b7e8d4f77e814a33cfd665 waf/stackpath.py
+4a11ba8e5f3995b35f5fc189b8c2692e waf/stackpath.py
a0aa5997d0d5db18920840220dc4ad36 waf/stingray.py
74bd52941b606d15f1a6cdc7b52f761c waf/sucuri.py
205beb7ed5e70119f8700a9e295b6a4a waf/tencent.py
diff --git a/waf/cerber.py b/waf/cerber.py
index 9141b31fda3..bccb7f05450 100644
--- a/waf/cerber.py
+++ b/waf/cerber.py
@@ -5,8 +5,6 @@
See the file 'LICENSE' for copying permission
"""
-import re
-
from lib.core.settings import WAF_ATTACK_VECTORS
__product__ = "WP Cerber Security (Cerber Tech)"
diff --git a/waf/expressionengine.py b/waf/expressionengine.py
index 8d8d0fc6c8b..85befdc8422 100644
--- a/waf/expressionengine.py
+++ b/waf/expressionengine.py
@@ -5,6 +5,9 @@
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__ = "ExpressionEngine (EllisLab)"
@@ -13,8 +16,9 @@ def detect(get_page):
retval = False
for vector in WAF_ATTACK_VECTORS:
- page, _, _ = get_page(get=vector)
+ page, headers, _ = get_page(get=vector)
retval = any((page or "").strip() == _ for _ in ("Invalid GET Data", "Invalid URI"))
+ retval |= re.search(r"\Aexp_last_", headers.get(HTTP_HEADER.SET_COOKIE, ""), re.I) is not None
if retval:
break
diff --git a/waf/stackpath.py b/waf/stackpath.py
index 20c1a630e63..2e12b9c2a05 100644
--- a/waf/stackpath.py
+++ b/waf/stackpath.py
@@ -5,7 +5,6 @@
See the file 'LICENSE' for copying permission
"""
-from lib.core.enums import HTTP_HEADER
from lib.core.settings import WAF_ATTACK_VECTORS
__product__ = "StackPath Web Application Firewall (StackPath LLC)"
From 256ec755808a04a91dec865685da86fcfbd234f5 Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Wed, 9 Jan 2019 15:12:16 +0100
Subject: [PATCH 027/800] Trivial update of banner
---
lib/core/settings.py | 4 ++--
txt/checksum.md5 | 2 +-
2 files changed, 3 insertions(+), 3 deletions(-)
diff --git a/lib/core/settings.py b/lib/core/settings.py
index c3d6200d1f2..6e6f49ce067 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.26"
+VERSION = "1.3.1.27"
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)
@@ -39,7 +39,7 @@
___ ___[.]_____ ___ ___ \033[01;37m{\033[01;%dm%s\033[01;37m}\033[01;33m
|_ -| . [.] | .'| . |
|___|_ [.]_|_|_|__,| _|
- |_|V |_| \033[0m\033[4;37m%s\033[0m\n
+ |_|V... |_| \033[0m\033[4;37m%s\033[0m\n
""" % (TYPE_COLORS.get(TYPE, 31), VERSION_STRING.split('/')[-1], SITE)
# Minimum distance of ratio from kb.matchRatio to result in True
diff --git a/txt/checksum.md5 b/txt/checksum.md5
index 4dab4fa92c0..36a437b0d65 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-6696b297ceb42a671f3a326d9e63f99a lib/core/settings.py
+84d85e640164d17ee42889a68413344c lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
From 9a221470e7a4de16a72ece35b0091a13c93ed163 Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Wed, 9 Jan 2019 15:44:11 +0100
Subject: [PATCH 028/800] Minor patch
---
lib/controller/checks.py | 2 +-
lib/core/settings.py | 2 +-
txt/checksum.md5 | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/controller/checks.py b/lib/controller/checks.py
index 334cc7511d8..df951b10635 100644
--- a/lib/controller/checks.py
+++ b/lib/controller/checks.py
@@ -1588,7 +1588,7 @@ def checkConnection(suppressOutput=False):
conf.url = re.sub(r"https?://", "https://", conf.url)
match = re.search(r":(\d+)", threadData.lastRedirectURL[1])
port = match.group(1) if match else 443
- conf.url = re.sub(r":\d+/", ":%s/" % port, conf.url)
+ conf.url = re.sub(r":\d+(/|\Z)", ":%s\g<1>" % port, conf.url)
except SqlmapConnectionException, ex:
if conf.ipv6:
diff --git a/lib/core/settings.py b/lib/core/settings.py
index 6e6f49ce067..c8bf60b3f88 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.27"
+VERSION = "1.3.1.28"
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/txt/checksum.md5 b/txt/checksum.md5
index 36a437b0d65..9f69be0969b 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -23,7 +23,7 @@ fb6be55d21a70765e35549af2484f762 extra/sqlharvest/__init__.py
fb6be55d21a70765e35549af2484f762 extra/wafdetectify/__init__.py
f73623c18b7f6ebb71f10e124b1b93c9 extra/wafdetectify/wafdetectify.py
d0f2b424f5b2b06f26cdd7076d61be6e lib/controller/action.py
-02190e90bd7be774f800b7eabe589dd9 lib/controller/checks.py
+4b20581ddd8d026b8cad8a4b3e3aaad6 lib/controller/checks.py
3c18f0b1d1b9fda682201a264f170b31 lib/controller/controller.py
e97a9d34fef5761a8eab6432ce3c7c53 lib/controller/handler.py
fb6be55d21a70765e35549af2484f762 lib/controller/__init__.py
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-84d85e640164d17ee42889a68413344c lib/core/settings.py
+19d561e7ba93f697cc8ec095051fed5a lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
From 5274c88c7dee0febceb0ce798ae8329bf238b43c Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Wed, 9 Jan 2019 16:26:11 +0100
Subject: [PATCH 029/800] Minor patch of --identify-waf mechanism
---
lib/controller/checks.py | 1 +
lib/core/settings.py | 2 +-
lib/request/connect.py | 3 ++-
txt/checksum.md5 | 6 +++---
4 files changed, 7 insertions(+), 5 deletions(-)
diff --git a/lib/controller/checks.py b/lib/controller/checks.py
index df951b10635..aedb46e3218 100644
--- a/lib/controller/checks.py
+++ b/lib/controller/checks.py
@@ -1423,6 +1423,7 @@ def _(*args, **kwargs):
kwargs["get"] = urlencode(kwargs["get"])
kwargs["raise404"] = False
kwargs["silent"] = True
+ kwargs["finalCode"] = True
page, headers, code = Request.getPage(*args, **kwargs)
except Exception:
pass
diff --git a/lib/core/settings.py b/lib/core/settings.py
index c8bf60b3f88..c3da3428f22 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.28"
+VERSION = "1.3.1.29"
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/lib/request/connect.py b/lib/request/connect.py
index bc4f6714599..e336941fa41 100644
--- a/lib/request/connect.py
+++ b/lib/request/connect.py
@@ -270,6 +270,7 @@ def getPage(**kwargs):
crawling = kwargs.get("crawling", False)
checking = kwargs.get("checking", False)
skipRead = kwargs.get("skipRead", False)
+ finalCode = kwargs.get("finalCode", False)
if multipart:
post = multipart
@@ -496,7 +497,7 @@ class _(dict):
if hasattr(conn, "redurl"):
page = (threadData.lastRedirectMsg[1] if kb.redirectChoice == REDIRECTION.NO else Connect._connReadProxy(conn)) if not skipRead else None
skipLogTraffic = kb.redirectChoice == REDIRECTION.NO
- code = conn.redcode
+ code = conn.redcode if not finalCode else code
else:
page = Connect._connReadProxy(conn) if not skipRead else None
diff --git a/txt/checksum.md5 b/txt/checksum.md5
index 9f69be0969b..c393cd48ae1 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -23,7 +23,7 @@ fb6be55d21a70765e35549af2484f762 extra/sqlharvest/__init__.py
fb6be55d21a70765e35549af2484f762 extra/wafdetectify/__init__.py
f73623c18b7f6ebb71f10e124b1b93c9 extra/wafdetectify/wafdetectify.py
d0f2b424f5b2b06f26cdd7076d61be6e lib/controller/action.py
-4b20581ddd8d026b8cad8a4b3e3aaad6 lib/controller/checks.py
+eaccf6204d8c44cee9daba955af0c85e lib/controller/checks.py
3c18f0b1d1b9fda682201a264f170b31 lib/controller/controller.py
e97a9d34fef5761a8eab6432ce3c7c53 lib/controller/handler.py
fb6be55d21a70765e35549af2484f762 lib/controller/__init__.py
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-19d561e7ba93f697cc8ec095051fed5a lib/core/settings.py
+16e7294b01b6e705cb5c209cc17f1563 lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -71,7 +71,7 @@ fb6be55d21a70765e35549af2484f762 lib/parse/__init__.py
e4ea70bcd461f5176867dcd89d372386 lib/request/basicauthhandler.py
6076c01e84b589adb97cac421a7d5251 lib/request/basic.py
fc25d951217077fe655ed2a3a81552ae lib/request/comparison.py
-3b76bfadb74c069b17d73d2aba241005 lib/request/connect.py
+8e7f52dd4ef26f90310fc1082e17f4f8 lib/request/connect.py
7cba86090b02558f04c6692cef66e772 lib/request/direct.py
0a5cc34a7bbe709684ce32b4b46afd32 lib/request/dns.py
7bab2719ef2a6f1ddd838fa2335ae635 lib/request/httpshandler.py
From 880545cad44536d1bb2c96997e0b22cf9e7503d7 Mon Sep 17 00:00:00 2001
From: Nicolas Bonnet
Date: Thu, 10 Jan 2019 11:28:10 +0100
Subject: [PATCH 030/800] Fix incompatible errMsg for tor and osPwn args
(#3432)
---
lib/core/option.py | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/core/option.py b/lib/core/option.py
index 56ce2ce98bb..8324de5ab02 100644
--- a/lib/core/option.py
+++ b/lib/core/option.py
@@ -2306,7 +2306,7 @@ def _basicOptionValidation():
errMsg = "option '--not-string' is incompatible with switch '--null-connection'"
raise SqlmapSyntaxException(errMsg)
- if conf.notString and conf.nullConnection:
+ if conf.tor and conf.osPwn:
errMsg = "option '--tor' is incompatible with switch '--os-pwn'"
raise SqlmapSyntaxException(errMsg)
From beee81697c273c4007373d9aefe2cd085f4b8d65 Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Thu, 10 Jan 2019 11:31:09 +0100
Subject: [PATCH 031/800] Removing some junk
---
lib/core/settings.py | 2 +-
txt/checksum.md5 | 6 +++---
waf/cloudfront.py | 3 +--
3 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/lib/core/settings.py b/lib/core/settings.py
index c3da3428f22..1dc0e3ef6b7 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.29"
+VERSION = "1.3.1.30"
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/txt/checksum.md5 b/txt/checksum.md5
index c393cd48ae1..45529607815 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -42,14 +42,14 @@ b7c912e2af7a3354f6d7c04f556a80b2 lib/core/decorators.py
fb6be55d21a70765e35549af2484f762 lib/core/__init__.py
18c896b157b03af716542e5fe9233ef9 lib/core/log.py
fa9f24e88c81a6cef52da3dd5e637010 lib/core/optiondict.py
-95b2bc1fd01393771fc0cd239b2fe05a lib/core/option.py
+8867c1cb5a045cea99d8a9a7ceea6abf lib/core/option.py
fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
0f1d79ada721cf6def611b21b03d68af lib/core/profiling.py
5e2c16a8e2daee22dd545df13386e7a3 lib/core/readlineng.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-16e7294b01b6e705cb5c209cc17f1563 lib/core/settings.py
+5c94f9b2587f21f2229248a832803f4a lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -414,7 +414,7 @@ a05edf8f2962dfff0457b7a4fd5e169c waf/ciscoacexml.py
2565869c73a9a37f25deb317e8f5d9dd waf/cleantalk.py
af079de99a8ec6988d28aa4c0aa32cf9 waf/cloudbric.py
8fec83056c8728076ab17ab3a2ebbe7b waf/cloudflare.py
-8414f766b0171fbc264c46ad40dff237 waf/cloudfront.py
+b2331b1b17cf0fad5ac0d991d1efdfa0 waf/cloudfront.py
847ee97f6e0f8aeec61afd3e0c91543b waf/comodo.py
4ed76fdf2add2405bb6157ac025e01b9 waf/crawlprotect.py
e49bb75985f60556b4481dc085f3c62b waf/denyall.py
diff --git a/waf/cloudfront.py b/waf/cloudfront.py
index 46474c48959..c02163eed96 100644
--- a/waf/cloudfront.py
+++ b/waf/cloudfront.py
@@ -17,8 +17,7 @@ def detect(get_page):
for vector in WAF_ATTACK_VECTORS:
page, headers, _ = get_page(get=vector)
- retval = re.search(r"Error from cloudfront", headers.get("X-Cache", ""), re.I) is not None
- retval |= all(_ in (page or "") for _ in ("Generated by cloudfront", "Request blocked"))
+ retval = all(_ in (page or "") for _ in ("Generated by cloudfront", "Request blocked"))
if retval:
break
From 915ee5ce53e135322b9d6106c112ece97a3619f1 Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Thu, 10 Jan 2019 13:06:35 +0100
Subject: [PATCH 032/800] Trivial file renaming
---
lib/core/settings.py | 2 +-
txt/checksum.md5 | 4 ++--
waf/{onmessage.py => onmessageshield.py} | 0
3 files changed, 3 insertions(+), 3 deletions(-)
rename waf/{onmessage.py => onmessageshield.py} (100%)
diff --git a/lib/core/settings.py b/lib/core/settings.py
index 1dc0e3ef6b7..7c609aada4d 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.30"
+VERSION = "1.3.1.31"
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/txt/checksum.md5 b/txt/checksum.md5
index 45529607815..c3ee2b00aac 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-5c94f9b2587f21f2229248a832803f4a lib/core/settings.py
+897466b2b34e13e9013d6ad0e15f1c09 lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -440,7 +440,7 @@ d4f36e44f496f4d51baa3241eabc60fd waf/malcare.py
84e9c68b6ecffafb5ec8cd96acaf62b9 waf/newdefend.py
d03dfe93a14c966b88f5baf59ce2b091 waf/ninjafirewall.py
69fc40e85751279e9018d643742db04e waf/nsfocus.py
-a59aff03a5b3fb40ea0feb3489677040 waf/onmessage.py
+a59aff03a5b3fb40ea0feb3489677040 waf/onmessageshield.py
532b6f8de357a9b88a313944e1756538 waf/paloalto.py
2979bb64c24256a83625d75a385dde9b waf/profense.py
8de0d46738335a4e498c4ac9038ac3c3 waf/proventia.py
diff --git a/waf/onmessage.py b/waf/onmessageshield.py
similarity index 100%
rename from waf/onmessage.py
rename to waf/onmessageshield.py
From 241c6b02f08386de649614594b64a8ace139c37c Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Thu, 10 Jan 2019 13:23:34 +0100
Subject: [PATCH 033/800] Update of distil WAF script
---
lib/core/settings.py | 2 +-
txt/checksum.md5 | 4 ++--
waf/distil.py | 3 ++-
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/lib/core/settings.py b/lib/core/settings.py
index 7c609aada4d..a8b09b84a62 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.31"
+VERSION = "1.3.1.32"
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/txt/checksum.md5 b/txt/checksum.md5
index c3ee2b00aac..83f6073c6a3 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-897466b2b34e13e9013d6ad0e15f1c09 lib/core/settings.py
+00af73cfc49989f912a14303f0555eb2 lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -418,7 +418,7 @@ b2331b1b17cf0fad5ac0d991d1efdfa0 waf/cloudfront.py
847ee97f6e0f8aeec61afd3e0c91543b waf/comodo.py
4ed76fdf2add2405bb6157ac025e01b9 waf/crawlprotect.py
e49bb75985f60556b4481dc085f3c62b waf/denyall.py
-dbe50bbcb1b4664d6cebfcca63e75125 waf/distil.py
+4254527ec80588f5289f56c7b52c4b30 waf/distil.py
886c6502a6a2aae49921efed8d439f7b waf/dotdefender.py
a8412619d7f26ed6bc9e0b20a57b2324 waf/edgecast.py
b65877b412a4c648aa442116ef94e2af waf/expressionengine.py
diff --git a/waf/distil.py b/waf/distil.py
index 4747e17291e..e82093864e2 100644
--- a/waf/distil.py
+++ b/waf/distil.py
@@ -13,8 +13,9 @@ def detect(get_page):
retval = False
for vector in WAF_ATTACK_VECTORS:
- _, headers, _ = get_page(get=vector)
+ page, headers, _ = get_page(get=vector)
retval = headers.get("x-distil-cs") is not None
+ retval |= any(_ in (page or "") for _ in ("distilCaptchaForm", "distilCallbackGuard", "cdn.distilnetworks.com/images/anomaly-detected.png"))
if retval:
break
From aa7af33fd54f4bcebf9eedecaa27e7a6f31086db Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Thu, 10 Jan 2019 13:40:51 +0100
Subject: [PATCH 034/800] Update of airlock WAF script
---
lib/core/settings.py | 2 +-
txt/checksum.md5 | 4 ++--
waf/airlock.py | 3 ++-
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/lib/core/settings.py b/lib/core/settings.py
index a8b09b84a62..d84839bf6c0 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.32"
+VERSION = "1.3.1.33"
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/txt/checksum.md5 b/txt/checksum.md5
index 83f6073c6a3..7bf328305fb 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-00af73cfc49989f912a14303f0555eb2 lib/core/settings.py
+b1f45422ccaa4ffb67909daa015f85d6 lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -398,7 +398,7 @@ ca3ab78d6ed53b7f2c07ed2530d47efd udf/postgresql/windows/32/8.4/lib_postgresqlud
0d3fe0293573a4453463a0fa5a081de1 udf/postgresql/windows/32/9.0/lib_postgresqludf_sys.dll_
129c2436cf3e0dd9ba0429b2f45a0113 waf/360.py
2d63c46bed78aec2966a363d5db800fd waf/aesecure.py
-2add09865acdb6edc40d326446ac6e40 waf/airlock.py
+b6bc83ae9ea69cf96e9389bde8250c7c waf/airlock.py
94eec6c5d02357596292d36a8533f08f waf/anquanbao.py
7ab1a7cd51a02899592f4f755d36a02e waf/approach.py
425f2599f57ab81b4fff67e6b442cccc waf/armor.py
diff --git a/waf/airlock.py b/waf/airlock.py
index fe6b9db6eb4..4f24026368d 100644
--- a/waf/airlock.py
+++ b/waf/airlock.py
@@ -16,8 +16,9 @@ def detect(get_page):
retval = False
for vector in WAF_ATTACK_VECTORS:
- _, headers, _ = get_page(get=vector)
+ page, headers, _ = get_page(get=vector)
retval = re.search(r"\AAL[_-]?(SESS|LB)", headers.get(HTTP_HEADER.SET_COOKIE, ""), re.I) is not None
+ retval |= all(_ in (page or "") for _ in ("The server detected a syntax error in your request", "Check your request and all parameters", "Bad Request", "Your request ID was"))
if retval:
break
From 9fef4336b00abd62a275cadcb36a0a59f2a41038 Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Thu, 10 Jan 2019 14:19:03 +0100
Subject: [PATCH 035/800] Minor update of safe3 WAF script
---
lib/core/settings.py | 2 +-
txt/checksum.md5 | 4 ++--
waf/safe3.py | 3 ++-
3 files changed, 5 insertions(+), 4 deletions(-)
diff --git a/lib/core/settings.py b/lib/core/settings.py
index d84839bf6c0..f8a87fc7ba5 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.33"
+VERSION = "1.3.1.34"
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/txt/checksum.md5 b/txt/checksum.md5
index 7bf328305fb..49701452c5a 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-b1f45422ccaa4ffb67909daa015f85d6 lib/core/settings.py
+030191317120c2bae605d2ef3ad5ff3b lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -448,7 +448,7 @@ ac60456fe7af4eb501d448910e98ee4b waf/radware.py
1315066be1abb4f1d34290239be0af14 waf/reblaze.py
987389e4f403b7615d6d8006420a6260 waf/requestvalidationmode.py
8dae5619edafaaceccf1c4eb051c7d22 waf/rsfirewall.py
-2a7b234e903d13b3c21d6c17e05d1c46 waf/safe3.py
+d2d9718de217dd07d9e66b2e6ad61380 waf/safe3.py
4382cb217354d816580ee07178d0a8c7 waf/safedog.py
ac0728ddb7a15b46b0eabd78cd661f8c waf/secureiis.py
ba37e1c37fa0e3688873f74183a9cb9c waf/senginx.py
diff --git a/waf/safe3.py b/waf/safe3.py
index 2ed28a06529..81d6cbe5950 100644
--- a/waf/safe3.py
+++ b/waf/safe3.py
@@ -16,9 +16,10 @@ def detect(get_page):
retval = False
for vector in WAF_ATTACK_VECTORS:
- _, headers, _ = get_page(get=vector)
+ page, headers, _ = get_page(get=vector)
retval = re.search(r"Safe3WAF", headers.get(HTTP_HEADER.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
+ retval |= all(_ in (page or "") for _ in ("403 Forbidden", "Safe3waf/"))
if retval:
break
From d16252e959a1c94a42fcf9b084ee2607a15b41b0 Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Thu, 10 Jan 2019 14:19:20 +0100
Subject: [PATCH 036/800] Removing junk
---
lib/core/settings.py | 2 +-
txt/checksum.md5 | 3 +--
waf/blockdos.py | 24 ------------------------
3 files changed, 2 insertions(+), 27 deletions(-)
delete mode 100644 waf/blockdos.py
diff --git a/lib/core/settings.py b/lib/core/settings.py
index f8a87fc7ba5..8ec5e503f3e 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.34"
+VERSION = "1.3.1.35"
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/txt/checksum.md5 b/txt/checksum.md5
index 49701452c5a..d6301a7be20 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-030191317120c2bae605d2ef3ad5ff3b lib/core/settings.py
+ea3015b1f6bd7e4f462818ce2c11f6eb lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -406,7 +406,6 @@ b6bc83ae9ea69cf96e9389bde8250c7c waf/airlock.py
9dbec5d674ed4c762ffc9bc3ab402739 waf/aws.py
4fd9a8e3aac364fe5509b23e7eb5a448 waf/barracuda.py
742f8c9b7f3a858e11dfd2ce3df65c6e waf/binarysec.py
-ef8c5db49ad9973b59d6b9b65b001714 waf/blockdos.py
2608fbe2c80fae99bb09db1f93d80cdd waf/bluedon.py
8385218d8a1863dbfd4274db36880dfe waf/cerber.py
5ae64cad95b7f904c350cc81230c3bd1 waf/chinacache.py
diff --git a/waf/blockdos.py b/waf/blockdos.py
deleted file mode 100644
index fe430ad70c7..00000000000
--- a/waf/blockdos.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/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__ = "BlockDoS"
-
-def detect(get_page):
- retval = False
-
- for vector in WAF_ATTACK_VECTORS:
- _, headers, _ = get_page(get=vector)
- retval = re.search(r"BlockDos\.net", headers.get(HTTP_HEADER.SERVER, ""), re.I) is not None
- if retval:
- break
-
- return retval
From c74c58c47e5a455103c83b95d4748e4d5eec435b Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Thu, 10 Jan 2019 14:27:19 +0100
Subject: [PATCH 037/800] Varnish Cache is not a proof of Varnish WAF usage
---
lib/core/settings.py | 2 +-
txt/checksum.md5 | 4 ++--
waf/varnish.py | 5 ++---
3 files changed, 5 insertions(+), 6 deletions(-)
diff --git a/lib/core/settings.py b/lib/core/settings.py
index 8ec5e503f3e..c5a986af1b1 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.35"
+VERSION = "1.3.1.36"
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/txt/checksum.md5 b/txt/checksum.md5
index d6301a7be20..d0440e320ac 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-ea3015b1f6bd7e4f462818ce2c11f6eb lib/core/settings.py
+361ca22d9a342cf10e107b123f990733 lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -463,7 +463,7 @@ ef6f83952ce6b5a7bbb19f9b903af2b6 waf/teros.py
ba0fb1e6b815446b9d6f30950900fc80 waf/trafficshield.py
876c746d96193071271cb8b7e00e1422 waf/urlscan.py
45f28286ffd89200d4c9b6d88a7a518f waf/uspses.py
-2d9d9fa8359a9f721e4b977d3da52410 waf/varnish.py
+879315dc70deadc55b345c9bc65fa1d5 waf/varnish.py
455bb16f552e7943e0a5cf35e83a74ea waf/virusdie.py
67df54343a85fe053226e2a5483b2c64 waf/wallarm.py
114000c53115fa8f4dd9b1b9122ec32a waf/watchguard.py
diff --git a/waf/varnish.py b/waf/varnish.py
index 946e1271396..50263fe6930 100644
--- a/waf/varnish.py
+++ b/waf/varnish.py
@@ -15,9 +15,8 @@ def detect(get_page):
retval = False
for vector in WAF_ATTACK_VECTORS:
- page, headers, code = get_page(get=vector)
- retval = code == 404 and re.search(r"\bXID: \d+", page or "") is not None
- retval |= code >= 400 and "Request rejected by xVarnish-WAF" in (page or "")
+ page, _, code = get_page(get=vector)
+ retval = code >= 400 and "Request rejected by xVarnish-WAF" in (page or "")
if retval:
break
From d31d2eeb273a39a1128e2bfd60bb87500edb0514 Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Thu, 10 Jan 2019 15:35:52 +0100
Subject: [PATCH 038/800] Minor updates and removal of faulty denyall.py WAF
script (junk - FP)
---
lib/core/settings.py | 2 +-
txt/checksum.md5 | 12 +++++-------
waf/360.py | 5 ++---
waf/anquanbao.py | 3 +--
waf/cloudfront.py | 2 --
waf/denyall.py | 25 -------------------------
waf/hyperguard.py | 24 ------------------------
waf/varnish.py | 2 --
8 files changed, 9 insertions(+), 66 deletions(-)
delete mode 100644 waf/denyall.py
delete mode 100644 waf/hyperguard.py
diff --git a/lib/core/settings.py b/lib/core/settings.py
index c5a986af1b1..4304cefb399 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.36"
+VERSION = "1.3.1.37"
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/txt/checksum.md5 b/txt/checksum.md5
index d0440e320ac..b0b0c58d50d 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-361ca22d9a342cf10e107b123f990733 lib/core/settings.py
+dc3b667a4287d48bd2e95b1e51439d67 lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -396,10 +396,10 @@ a6b9c964f7c7d7012f8f434bbd84a041 udf/postgresql/windows/32/8.2/lib_postgresqlud
d9006810684baf01ea33281d21522519 udf/postgresql/windows/32/8.3/lib_postgresqludf_sys.dll_
ca3ab78d6ed53b7f2c07ed2530d47efd udf/postgresql/windows/32/8.4/lib_postgresqludf_sys.dll_
0d3fe0293573a4453463a0fa5a081de1 udf/postgresql/windows/32/9.0/lib_postgresqludf_sys.dll_
-129c2436cf3e0dd9ba0429b2f45a0113 waf/360.py
+d6f06b1463501392e7e578d511ffb4d8 waf/360.py
2d63c46bed78aec2966a363d5db800fd waf/aesecure.py
b6bc83ae9ea69cf96e9389bde8250c7c waf/airlock.py
-94eec6c5d02357596292d36a8533f08f waf/anquanbao.py
+8dcba3e7509e87e7829f445299bd2d3b waf/anquanbao.py
7ab1a7cd51a02899592f4f755d36a02e waf/approach.py
425f2599f57ab81b4fff67e6b442cccc waf/armor.py
33b6e6793ed3add457d7c909ec599ad3 waf/asm.py
@@ -413,10 +413,9 @@ a05edf8f2962dfff0457b7a4fd5e169c waf/ciscoacexml.py
2565869c73a9a37f25deb317e8f5d9dd waf/cleantalk.py
af079de99a8ec6988d28aa4c0aa32cf9 waf/cloudbric.py
8fec83056c8728076ab17ab3a2ebbe7b waf/cloudflare.py
-b2331b1b17cf0fad5ac0d991d1efdfa0 waf/cloudfront.py
+9ae3dfb7c03da53fb67c6c3cb56b4827 waf/cloudfront.py
847ee97f6e0f8aeec61afd3e0c91543b waf/comodo.py
4ed76fdf2add2405bb6157ac025e01b9 waf/crawlprotect.py
-e49bb75985f60556b4481dc085f3c62b waf/denyall.py
4254527ec80588f5289f56c7b52c4b30 waf/distil.py
886c6502a6a2aae49921efed8d439f7b waf/dotdefender.py
a8412619d7f26ed6bc9e0b20a57b2324 waf/edgecast.py
@@ -424,7 +423,6 @@ b65877b412a4c648aa442116ef94e2af waf/expressionengine.py
588d2f9a8f201e120e74e508564cb487 waf/fortiweb.py
0e9eb20967d2dde941cca8c663a63e1f waf/generic.py
4ea580dd1b9679bd733866976ad5d81e waf/godaddy.py
-2aa7775dac8df4a3cdb736fdf51dc9cb waf/hyperguard.py
256a7ea2c1cd2745fe788cf8f6123f8a waf/imunify360.py
4c4d480c155ae99262043c80a76ec1d5 waf/incapsula.py
fb6be55d21a70765e35549af2484f762 waf/__init__.py
@@ -463,7 +461,7 @@ ef6f83952ce6b5a7bbb19f9b903af2b6 waf/teros.py
ba0fb1e6b815446b9d6f30950900fc80 waf/trafficshield.py
876c746d96193071271cb8b7e00e1422 waf/urlscan.py
45f28286ffd89200d4c9b6d88a7a518f waf/uspses.py
-879315dc70deadc55b345c9bc65fa1d5 waf/varnish.py
+80314083009c87d32bf32d84e8bbb7be waf/varnish.py
455bb16f552e7943e0a5cf35e83a74ea waf/virusdie.py
67df54343a85fe053226e2a5483b2c64 waf/wallarm.py
114000c53115fa8f4dd9b1b9122ec32a waf/watchguard.py
diff --git a/waf/360.py b/waf/360.py
index 25c61f75a3d..06d287e2168 100644
--- a/waf/360.py
+++ b/waf/360.py
@@ -5,8 +5,6 @@
See the file 'LICENSE' for copying permission
"""
-import re
-
from lib.core.settings import WAF_ATTACK_VECTORS
__product__ = "360 Web Application Firewall (360)"
@@ -16,8 +14,9 @@ def detect(get_page):
for vector in WAF_ATTACK_VECTORS:
page, headers, code = get_page(get=vector)
- retval = re.search(r"wangzhan\.360\.cn", headers.get("X-Powered-By-360wzb", ""), re.I) is not None
+ retval = headers.get("X-Powered-By-360wzb") is not None
retval |= code == 493 and "/wzws-waf-cgi/" in (page or "")
+ retval |= all(_ in (page or "") for _ in ("eventID", "If you are the Webmaster", "493"))
if retval:
break
diff --git a/waf/anquanbao.py b/waf/anquanbao.py
index d0b3d36e6b5..c20934de71d 100644
--- a/waf/anquanbao.py
+++ b/waf/anquanbao.py
@@ -16,8 +16,7 @@ def detect(get_page):
for vector in WAF_ATTACK_VECTORS:
page, headers, code = get_page(get=vector)
- retval = re.search(r"MISS", headers.get("X-Powered-By-Anquanbao", ""), re.I) is not None
- retval |= code == 405 and any(_ in (page or "") for _ in ("/aqb_cc/error/", "hidden_intercept_time"))
+ retval = code == 405 and any(_ in (page or "") for _ in ("/aqb_cc/error/", "hidden_intercept_time"))
if retval:
break
diff --git a/waf/cloudfront.py b/waf/cloudfront.py
index c02163eed96..230c1fcb760 100644
--- a/waf/cloudfront.py
+++ b/waf/cloudfront.py
@@ -5,8 +5,6 @@
See the file 'LICENSE' for copying permission
"""
-import re
-
from lib.core.settings import WAF_ATTACK_VECTORS
__product__ = "CloudFront (Amazon)"
diff --git a/waf/denyall.py b/waf/denyall.py
deleted file mode 100644
index 6da57b63d6e..00000000000
--- a/waf/denyall.py
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/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__ = "Deny All Web Application Firewall (DenyAll)"
-
-def detect(get_page):
- retval = False
-
- for vector in WAF_ATTACK_VECTORS:
- page, headers, code = get_page(get=vector)
- retval = re.search(r"\Asessioncookie=", headers.get(HTTP_HEADER.SET_COOKIE, ""), re.I) is not None
- retval |= code == 200 and re.search(r"\ACondition Intercepted", page or "", re.I) is not None
- if retval:
- break
-
- return retval
diff --git a/waf/hyperguard.py b/waf/hyperguard.py
deleted file mode 100644
index 619e6f04fad..00000000000
--- a/waf/hyperguard.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/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__ = "Hyperguard Web Application Firewall (art of defence)"
-
-def detect(get_page):
- retval = False
-
- for vector in WAF_ATTACK_VECTORS:
- _, headers, _ = get_page(get=vector)
- retval = re.search(r"\AODSESSION=", headers.get(HTTP_HEADER.SET_COOKIE, ""), re.I) is not None
- if retval:
- break
-
- return retval
diff --git a/waf/varnish.py b/waf/varnish.py
index 50263fe6930..f92ade613d0 100644
--- a/waf/varnish.py
+++ b/waf/varnish.py
@@ -5,8 +5,6 @@
See the file 'LICENSE' for copying permission
"""
-import re
-
from lib.core.settings import WAF_ATTACK_VECTORS
__product__ = "Varnish FireWall (OWASP)"
From d7ba7150ce610e1b4c31d9f3760e02fb252ee11e Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Thu, 10 Jan 2019 15:56:49 +0100
Subject: [PATCH 039/800] Removing junk
---
lib/core/settings.py | 2 +-
txt/checksum.md5 | 3 +--
waf/stingray.py | 24 ------------------------
3 files changed, 2 insertions(+), 27 deletions(-)
delete mode 100644 waf/stingray.py
diff --git a/lib/core/settings.py b/lib/core/settings.py
index 4304cefb399..f5c05a939cb 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.37"
+VERSION = "1.3.1.38"
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/txt/checksum.md5 b/txt/checksum.md5
index b0b0c58d50d..26031afa3c7 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-dc3b667a4287d48bd2e95b1e51439d67 lib/core/settings.py
+28e6d63edd15884c6f33ecbda6f399c6 lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -454,7 +454,6 @@ ba37e1c37fa0e3688873f74183a9cb9c waf/senginx.py
a840fcd2bb042694f9aab2859e7c9b30 waf/sonicwall.py
45683bfe7a428f47745416c727a789bd waf/sophos.py
4a11ba8e5f3995b35f5fc189b8c2692e waf/stackpath.py
-a0aa5997d0d5db18920840220dc4ad36 waf/stingray.py
74bd52941b606d15f1a6cdc7b52f761c waf/sucuri.py
205beb7ed5e70119f8700a9e295b6a4a waf/tencent.py
ef6f83952ce6b5a7bbb19f9b903af2b6 waf/teros.py
diff --git a/waf/stingray.py b/waf/stingray.py
deleted file mode 100644
index bdbda8edf3a..00000000000
--- a/waf/stingray.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/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__ = "Stingray Application Firewall (Riverbed / Brocade)"
-
-def detect(get_page):
- retval = False
-
- for vector in WAF_ATTACK_VECTORS:
- _, headers, code = get_page(get=vector)
- retval = code in (403, 500) and re.search(r"\AX-Mapping-", headers.get(HTTP_HEADER.SET_COOKIE, ""), re.I) is not None
- if retval:
- break
-
- return retval
From 17be4d63741d5a0b8576d2a1e60a13d0e10430ed Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Thu, 10 Jan 2019 16:05:46 +0100
Subject: [PATCH 040/800] Minor update
---
lib/core/settings.py | 2 +-
txt/checksum.md5 | 4 ++--
waf/{uspses.py => secureentry.py} | 6 +++---
3 files changed, 6 insertions(+), 6 deletions(-)
rename waf/{uspses.py => secureentry.py} (61%)
diff --git a/lib/core/settings.py b/lib/core/settings.py
index f5c05a939cb..36b42c2fad5 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.38"
+VERSION = "1.3.1.39"
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/txt/checksum.md5 b/txt/checksum.md5
index 26031afa3c7..4a6b726d292 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-28e6d63edd15884c6f33ecbda6f399c6 lib/core/settings.py
+8013b106ba03ae4fbaef343f20a0fa86 lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -447,6 +447,7 @@ ac60456fe7af4eb501d448910e98ee4b waf/radware.py
8dae5619edafaaceccf1c4eb051c7d22 waf/rsfirewall.py
d2d9718de217dd07d9e66b2e6ad61380 waf/safe3.py
4382cb217354d816580ee07178d0a8c7 waf/safedog.py
+34440ee94fcff88b4158e86635176547 waf/secureentry.py
ac0728ddb7a15b46b0eabd78cd661f8c waf/secureiis.py
ba37e1c37fa0e3688873f74183a9cb9c waf/senginx.py
2602a8baed4da643e606a379e4dc75db waf/shieldsecurity.py
@@ -459,7 +460,6 @@ a840fcd2bb042694f9aab2859e7c9b30 waf/sonicwall.py
ef6f83952ce6b5a7bbb19f9b903af2b6 waf/teros.py
ba0fb1e6b815446b9d6f30950900fc80 waf/trafficshield.py
876c746d96193071271cb8b7e00e1422 waf/urlscan.py
-45f28286ffd89200d4c9b6d88a7a518f waf/uspses.py
80314083009c87d32bf32d84e8bbb7be waf/varnish.py
455bb16f552e7943e0a5cf35e83a74ea waf/virusdie.py
67df54343a85fe053226e2a5483b2c64 waf/wallarm.py
diff --git a/waf/uspses.py b/waf/secureentry.py
similarity index 61%
rename from waf/uspses.py
rename to waf/secureentry.py
index 7f857240e27..601f13b2264 100644
--- a/waf/uspses.py
+++ b/waf/secureentry.py
@@ -10,14 +10,14 @@
from lib.core.enums import HTTP_HEADER
from lib.core.settings import WAF_ATTACK_VECTORS
-__product__ = "USP Secure Entry Server (United Security Providers)"
+__product__ = "Secure Entry Server (United Security Providers)"
def detect(get_page):
retval = False
for vector in WAF_ATTACK_VECTORS:
- _, headers, _ = get_page(get=vector)
- retval = re.search(r"Secure Entry Server", headers.get(HTTP_HEADER.SERVER, ""), re.I) is not None
+ page, headers, code = get_page(get=vector)
+ retval = code >= 400 and re.search(r"Secure Entry Server", headers.get(HTTP_HEADER.SERVER, ""), re.I) is not None
if retval:
break
From 204c1950fc5b9bdc5bd6bdd884a57101b2f0e8e1 Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Thu, 10 Jan 2019 16:43:06 +0100
Subject: [PATCH 041/800] Fixes #3433
---
lib/core/settings.py | 2 +-
lib/utils/hash.py | 2 +-
txt/checksum.md5 | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/core/settings.py b/lib/core/settings.py
index 36b42c2fad5..a206eb7d08d 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.39"
+VERSION = "1.3.1.40"
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/lib/utils/hash.py b/lib/utils/hash.py
index 3985670f96b..4ea776607ab 100644
--- a/lib/utils/hash.py
+++ b/lib/utils/hash.py
@@ -19,7 +19,7 @@
# problems with ctypes (Reference: https://github.com/sqlmapproject/sqlmap/issues/2952)
_ = multiprocessing.Value('i')
-except (ImportError, OSError):
+except (ImportError, OSError, AttributeError):
pass
else:
try:
diff --git a/txt/checksum.md5 b/txt/checksum.md5
index 4a6b726d292..b0e4b75741d 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-8013b106ba03ae4fbaef343f20a0fa86 lib/core/settings.py
+af9f5e98db9e56caf828065cbadecc6f lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -108,7 +108,7 @@ da4bc159e6920f1f7e45c92c39941690 lib/utils/deps.py
f7c64515a3e4fcfe8266ca2be77be565 lib/utils/getch.py
0d497906b06eb82d14da676e9f9c98f5 lib/utils/har.py
1fc47aa8860f809d103048e4eb51cdd2 lib/utils/hashdb.py
-e571f559826c08f05d060625b4e9dcdd lib/utils/hash.py
+ef3fadd11bc45552d26f00b34f732097 lib/utils/hash.py
17009289bb5c0dc0cceaa483113101e1 lib/utils/htmlentities.py
fb6be55d21a70765e35549af2484f762 lib/utils/__init__.py
2a40a6bd1779f7db5199f089411b1c1c lib/utils/pivotdumptable.py
From aea3749015a958e65036e73d31e035ce13f1e3dc Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Fri, 11 Jan 2019 12:35:35 +0100
Subject: [PATCH 042/800] Dealing with FP for expressionengine.py
---
lib/core/settings.py | 2 +-
txt/checksum.md5 | 4 ++--
waf/expressionengine.py | 3 +--
3 files changed, 4 insertions(+), 5 deletions(-)
diff --git a/lib/core/settings.py b/lib/core/settings.py
index a206eb7d08d..32ce8db7c78 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.40"
+VERSION = "1.3.1.41"
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/txt/checksum.md5 b/txt/checksum.md5
index b0e4b75741d..72dff681531 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-af9f5e98db9e56caf828065cbadecc6f lib/core/settings.py
+df03aea681ed80e9850697b60db1b0eb lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -419,7 +419,7 @@ af079de99a8ec6988d28aa4c0aa32cf9 waf/cloudbric.py
4254527ec80588f5289f56c7b52c4b30 waf/distil.py
886c6502a6a2aae49921efed8d439f7b waf/dotdefender.py
a8412619d7f26ed6bc9e0b20a57b2324 waf/edgecast.py
-b65877b412a4c648aa442116ef94e2af waf/expressionengine.py
+5df01dde939c0d22bc163730873e9854 waf/expressionengine.py
588d2f9a8f201e120e74e508564cb487 waf/fortiweb.py
0e9eb20967d2dde941cca8c663a63e1f waf/generic.py
4ea580dd1b9679bd733866976ad5d81e waf/godaddy.py
diff --git a/waf/expressionengine.py b/waf/expressionengine.py
index 85befdc8422..d2cbf57d1a7 100644
--- a/waf/expressionengine.py
+++ b/waf/expressionengine.py
@@ -17,8 +17,7 @@ def detect(get_page):
for vector in WAF_ATTACK_VECTORS:
page, headers, _ = get_page(get=vector)
- retval = any((page or "").strip() == _ for _ in ("Invalid GET Data", "Invalid URI"))
- retval |= re.search(r"\Aexp_last_", headers.get(HTTP_HEADER.SET_COOKIE, ""), re.I) is not None
+ retval = any((page or "").strip() == _ for _ in ("Invalid GET Data", "Invalid URI")) and re.search(r"\bexp_last_", headers.get(HTTP_HEADER.SET_COOKIE, ""), re.I) is not None
if retval:
break
From c94bddd9248e14de4ed03b38708a58b92edb7f88 Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Fri, 11 Jan 2019 22:33:08 +0100
Subject: [PATCH 043/800] Adding new WAF script
---
lib/core/settings.py | 2 +-
txt/checksum.md5 | 5 +++--
waf/kona.py | 3 +--
waf/urlmaster.py | 21 +++++++++++++++++++++
4 files changed, 26 insertions(+), 5 deletions(-)
create mode 100644 waf/urlmaster.py
diff --git a/lib/core/settings.py b/lib/core/settings.py
index 32ce8db7c78..8872e837424 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.41"
+VERSION = "1.3.1.42"
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/txt/checksum.md5 b/txt/checksum.md5
index 72dff681531..b774dc306dc 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-df03aea681ed80e9850697b60db1b0eb lib/core/settings.py
+da97136510824fdec55455dde8c674c3 lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -429,7 +429,7 @@ fb6be55d21a70765e35549af2484f762 waf/__init__.py
a3ee375714987acccc26d1b07c2e8af7 waf/isaserver.py
ce9cf35919a92d65347bb74ca0c5c86f waf/jiasule.py
f44ed04eeb4287c11ce277703ec7d72d waf/knownsec.py
-d50d82bec48814eb5b699d302dbdae9a waf/kona.py
+8c3977c543ca4ec6d4231f604217cf94 waf/kona.py
d4f36e44f496f4d51baa3241eabc60fd waf/malcare.py
4397c299d27a500851726444fb89759e waf/modsecurity.py
78af8e791207db9723a14bddeb7524af waf/naxsi.py
@@ -459,6 +459,7 @@ a840fcd2bb042694f9aab2859e7c9b30 waf/sonicwall.py
205beb7ed5e70119f8700a9e295b6a4a waf/tencent.py
ef6f83952ce6b5a7bbb19f9b903af2b6 waf/teros.py
ba0fb1e6b815446b9d6f30950900fc80 waf/trafficshield.py
+1c15216824f96e23a76591ac29eb6d7d waf/urlmaster.py
876c746d96193071271cb8b7e00e1422 waf/urlscan.py
80314083009c87d32bf32d84e8bbb7be waf/varnish.py
455bb16f552e7943e0a5cf35e83a74ea waf/virusdie.py
diff --git a/waf/kona.py b/waf/kona.py
index be124a92c18..c6c8bfaf879 100644
--- a/waf/kona.py
+++ b/waf/kona.py
@@ -17,8 +17,7 @@ def detect(get_page):
for vector in WAF_ATTACK_VECTORS:
page, headers, code = get_page(get=vector)
- retval = code in (400, 403, 501) and all(_ in (page or "") for _ in ("Access Denied", "You don't have permission to access", "on this server", "Reference"))
- retval |= re.search(r"AkamaiGHost", headers.get(HTTP_HEADER.SERVER, ""), re.I) is not None
+ retval = code >= 400 and re.search(r"AkamaiGHost", headers.get(HTTP_HEADER.SERVER, ""), re.I) is not None
if retval:
break
diff --git a/waf/urlmaster.py b/waf/urlmaster.py
new file mode 100644
index 00000000000..65d31c03bb0
--- /dev/null
+++ b/waf/urlmaster.py
@@ -0,0 +1,21 @@
+#!/usr/bin/env python
+
+"""
+Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
+See the file 'LICENSE' for copying permission
+"""
+
+from lib.core.settings import WAF_ATTACK_VECTORS
+
+__product__ = "Url Master SecurityCheck (iFinity/DotNetNuke)"
+
+def detect(get_page):
+ retval = False
+
+ for vector in WAF_ATTACK_VECTORS:
+ page, _, code = get_page(get=vector)
+ retval = code >= 400 and all(_ in (page or "") for _ in ("UrlMaster", "UrlRewriteModule", "SecurityCheck"))
+ if retval:
+ break
+
+ return retval
From 02d66db7e00134f31ddc285f239fb691a1b1babc Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Fri, 11 Jan 2019 23:00:28 +0100
Subject: [PATCH 044/800] New WAF script (SiteGuard)
---
lib/core/settings.py | 2 +-
txt/checksum.md5 | 7 ++++---
waf/anquanbao.py | 2 --
waf/siteguard.py | 21 +++++++++++++++++++++
waf/sitelock.py | 2 +-
5 files changed, 27 insertions(+), 7 deletions(-)
create mode 100644 waf/siteguard.py
diff --git a/lib/core/settings.py b/lib/core/settings.py
index 8872e837424..2703a06aa42 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.42"
+VERSION = "1.3.1.43"
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/txt/checksum.md5 b/txt/checksum.md5
index b774dc306dc..9b4c2dfd323 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-da97136510824fdec55455dde8c674c3 lib/core/settings.py
+c6bb49602e081b6ad551053145b95f52 lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -399,7 +399,7 @@ ca3ab78d6ed53b7f2c07ed2530d47efd udf/postgresql/windows/32/8.4/lib_postgresqlud
d6f06b1463501392e7e578d511ffb4d8 waf/360.py
2d63c46bed78aec2966a363d5db800fd waf/aesecure.py
b6bc83ae9ea69cf96e9389bde8250c7c waf/airlock.py
-8dcba3e7509e87e7829f445299bd2d3b waf/anquanbao.py
+34b8ec9f438d7daa56aa016e6c09fadb waf/anquanbao.py
7ab1a7cd51a02899592f4f755d36a02e waf/approach.py
425f2599f57ab81b4fff67e6b442cccc waf/armor.py
33b6e6793ed3add457d7c909ec599ad3 waf/asm.py
@@ -451,7 +451,8 @@ d2d9718de217dd07d9e66b2e6ad61380 waf/safe3.py
ac0728ddb7a15b46b0eabd78cd661f8c waf/secureiis.py
ba37e1c37fa0e3688873f74183a9cb9c waf/senginx.py
2602a8baed4da643e606a379e4dc75db waf/shieldsecurity.py
-24f1cc66625e58e4c91c0cb4364a2202 waf/sitelock.py
+332f27cfa02abca513719851850c782e waf/siteguard.py
+c842d298e61a87b32668c8402a0d87b5 waf/sitelock.py
a840fcd2bb042694f9aab2859e7c9b30 waf/sonicwall.py
45683bfe7a428f47745416c727a789bd waf/sophos.py
4a11ba8e5f3995b35f5fc189b8c2692e waf/stackpath.py
diff --git a/waf/anquanbao.py b/waf/anquanbao.py
index c20934de71d..51a1eb19384 100644
--- a/waf/anquanbao.py
+++ b/waf/anquanbao.py
@@ -5,8 +5,6 @@
See the file 'LICENSE' for copying permission
"""
-import re
-
from lib.core.settings import WAF_ATTACK_VECTORS
__product__ = "Anquanbao Web Application Firewall (Anquanbao)"
diff --git a/waf/siteguard.py b/waf/siteguard.py
new file mode 100644
index 00000000000..9a0498fa56e
--- /dev/null
+++ b/waf/siteguard.py
@@ -0,0 +1,21 @@
+#!/usr/bin/env python
+
+"""
+Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
+See the file 'LICENSE' for copying permission
+"""
+
+from lib.core.settings import WAF_ATTACK_VECTORS
+
+__product__ = "SiteGuard (JP-Secure)"
+
+def detect(get_page):
+ retval = False
+
+ for vector in WAF_ATTACK_VECTORS:
+ page, _, _ = get_page(get=vector)
+ retval = any(_ in (page or "") for _ in ("Powered by SiteGuard", "The server refuse to browse the page"))
+ if retval:
+ break
+
+ return retval
diff --git a/waf/sitelock.py b/waf/sitelock.py
index 42cb0e76821..09d611f152c 100644
--- a/waf/sitelock.py
+++ b/waf/sitelock.py
@@ -15,7 +15,7 @@ def detect(get_page):
for vector in WAF_ATTACK_VECTORS:
page, _, _ = get_page(get=vector)
- retval |= any(_ in (page or "") for _ in ("SiteLock Incident ID", ''))
+ retval = any(_ in (page or "") for _ in ("SiteLock Incident ID", ''))
if retval:
break
From 0a3144ebb5e2d70ada7be47f939771a43f0ee20e Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Sat, 12 Jan 2019 00:15:13 +0100
Subject: [PATCH 045/800] New WAF script (Squarespace)
---
lib/core/settings.py | 2 +-
txt/checksum.md5 | 3 ++-
waf/squarespace.py | 21 +++++++++++++++++++++
3 files changed, 24 insertions(+), 2 deletions(-)
create mode 100644 waf/squarespace.py
diff --git a/lib/core/settings.py b/lib/core/settings.py
index 2703a06aa42..62b9cceb3ae 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.43"
+VERSION = "1.3.1.44"
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/txt/checksum.md5 b/txt/checksum.md5
index 9b4c2dfd323..4a3f65ae89d 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-c6bb49602e081b6ad551053145b95f52 lib/core/settings.py
+b5217540e886d7e5f9eb813288401923 lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -455,6 +455,7 @@ ba37e1c37fa0e3688873f74183a9cb9c waf/senginx.py
c842d298e61a87b32668c8402a0d87b5 waf/sitelock.py
a840fcd2bb042694f9aab2859e7c9b30 waf/sonicwall.py
45683bfe7a428f47745416c727a789bd waf/sophos.py
+ed1ecabfa8396e70494b0a3d70a22eb1 waf/squarespace.py
4a11ba8e5f3995b35f5fc189b8c2692e waf/stackpath.py
74bd52941b606d15f1a6cdc7b52f761c waf/sucuri.py
205beb7ed5e70119f8700a9e295b6a4a waf/tencent.py
diff --git a/waf/squarespace.py b/waf/squarespace.py
new file mode 100644
index 00000000000..143b55bd693
--- /dev/null
+++ b/waf/squarespace.py
@@ -0,0 +1,21 @@
+#!/usr/bin/env python
+
+"""
+Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
+See the file 'LICENSE' for copying permission
+"""
+
+from lib.core.settings import WAF_ATTACK_VECTORS
+
+__product__ = "Squarespace Web Application Firewall (Squarespace)"
+
+def detect(get_page):
+ retval = False
+
+ for vector in WAF_ATTACK_VECTORS:
+ page, _, _ = get_page(get=vector)
+ retval = all(_ in (page or "") for _ in ("BRICK-50", " @ ", "404 Not Found"))
+ if retval:
+ break
+
+ return retval
From 660036c38b730310a854815e64b2d2bd24105c0b Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Sat, 12 Jan 2019 01:56:18 +0100
Subject: [PATCH 046/800] New WAF script
---
extra/wafdetectify/wafdetectify.py | 0
lib/core/settings.py | 2 +-
txt/checksum.md5 | 6 ++++--
waf/modsecurity.py | 2 +-
waf/nginx.py | 21 +++++++++++++++++++++
waf/siteground.py | 21 +++++++++++++++++++++
6 files changed, 48 insertions(+), 4 deletions(-)
mode change 100644 => 100755 extra/wafdetectify/wafdetectify.py
create mode 100644 waf/nginx.py
create mode 100644 waf/siteground.py
diff --git a/extra/wafdetectify/wafdetectify.py b/extra/wafdetectify/wafdetectify.py
old mode 100644
new mode 100755
diff --git a/lib/core/settings.py b/lib/core/settings.py
index 62b9cceb3ae..373bbf8af91 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.44"
+VERSION = "1.3.1.45"
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/txt/checksum.md5 b/txt/checksum.md5
index 4a3f65ae89d..ae19548e72f 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-b5217540e886d7e5f9eb813288401923 lib/core/settings.py
+848552f020168105797ed2e9b7538666 lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -431,10 +431,11 @@ ce9cf35919a92d65347bb74ca0c5c86f waf/jiasule.py
f44ed04eeb4287c11ce277703ec7d72d waf/knownsec.py
8c3977c543ca4ec6d4231f604217cf94 waf/kona.py
d4f36e44f496f4d51baa3241eabc60fd waf/malcare.py
-4397c299d27a500851726444fb89759e waf/modsecurity.py
+509af267f45485f3cb1c839fa040ff07 waf/modsecurity.py
78af8e791207db9723a14bddeb7524af waf/naxsi.py
504ade4d32bdbbd2932eebb07f57c3eb waf/netcontinuum.py
84e9c68b6ecffafb5ec8cd96acaf62b9 waf/newdefend.py
+9217767400caaf2c09379b694e0038e5 waf/nginx.py
d03dfe93a14c966b88f5baf59ce2b091 waf/ninjafirewall.py
69fc40e85751279e9018d643742db04e waf/nsfocus.py
a59aff03a5b3fb40ea0feb3489677040 waf/onmessageshield.py
@@ -451,6 +452,7 @@ d2d9718de217dd07d9e66b2e6ad61380 waf/safe3.py
ac0728ddb7a15b46b0eabd78cd661f8c waf/secureiis.py
ba37e1c37fa0e3688873f74183a9cb9c waf/senginx.py
2602a8baed4da643e606a379e4dc75db waf/shieldsecurity.py
+fc21ce1e6e597e44818c03d9cb859e83 waf/siteground.py
332f27cfa02abca513719851850c782e waf/siteguard.py
c842d298e61a87b32668c8402a0d87b5 waf/sitelock.py
a840fcd2bb042694f9aab2859e7c9b30 waf/sonicwall.py
diff --git a/waf/modsecurity.py b/waf/modsecurity.py
index 4751b06da3a..0d5400b2764 100644
--- a/waf/modsecurity.py
+++ b/waf/modsecurity.py
@@ -18,7 +18,7 @@ def detect(get_page):
for vector in WAF_ATTACK_VECTORS:
page, headers, code = get_page(get=vector)
retval = re.search(r"Mod_Security|NOYB", headers.get(HTTP_HEADER.SERVER, ""), re.I) is not None
- retval |= any(_ in (page or "") for _ in ("This error was generated by Mod_Security", "One or more things in your request were suspicious", "rules of the mod_security module", "The page you are trying to access is restricted due to a security rule", "Protected by Mod Security"))
+ retval |= any(_ in (page or "") for _ in ("This error was generated by Mod_Security", "One or more things in your request were suspicious", "rules of the mod_security module", "Protected by Mod Security"))
if retval:
break
diff --git a/waf/nginx.py b/waf/nginx.py
new file mode 100644
index 00000000000..5e12122b6dd
--- /dev/null
+++ b/waf/nginx.py
@@ -0,0 +1,21 @@
+#!/usr/bin/env python
+
+"""
+Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
+See the file 'LICENSE' for copying permission
+"""
+
+from lib.core.settings import WAF_ATTACK_VECTORS
+
+__product__ = "NGINX Web Application Firewall (NGINX Inc.)"
+
+def detect(get_page):
+ retval = False
+
+ for vector in WAF_ATTACK_VECTORS:
+ page, _, _ = get_page(get=vector)
+ retval = all(_ in (page or "") for _ in ("403 Forbidden
", "nginx"))
+ if retval:
+ break
+
+ return retval
diff --git a/waf/siteground.py b/waf/siteground.py
new file mode 100644
index 00000000000..ff6d2071328
--- /dev/null
+++ b/waf/siteground.py
@@ -0,0 +1,21 @@
+#!/usr/bin/env python
+
+"""
+Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
+See the file 'LICENSE' for copying permission
+"""
+
+from lib.core.settings import WAF_ATTACK_VECTORS
+
+__product__ = "SiteGround Web Application Firewall (SiteGround)"
+
+def detect(get_page):
+ retval = False
+
+ for vector in WAF_ATTACK_VECTORS:
+ page, _, _ = get_page(get=vector)
+ retval = "The page you are trying to access is restricted due to a security rule" in (page or "")
+ if retval:
+ break
+
+ return retval
From 7cf4b0e1d2f69529f38b969a2cc22a963dbf87c0 Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Sat, 12 Jan 2019 02:38:54 +0100
Subject: [PATCH 047/800] Too generic (removing)
---
lib/core/settings.py | 2 +-
txt/checksum.md5 | 3 +--
waf/nginx.py | 21 ---------------------
3 files changed, 2 insertions(+), 24 deletions(-)
delete mode 100644 waf/nginx.py
diff --git a/lib/core/settings.py b/lib/core/settings.py
index 373bbf8af91..e59d51681d0 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.45"
+VERSION = "1.3.1.46"
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/txt/checksum.md5 b/txt/checksum.md5
index ae19548e72f..14b5ce27f3d 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-848552f020168105797ed2e9b7538666 lib/core/settings.py
+0aa1b299611d496be282fd02f95f3cd4 lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -435,7 +435,6 @@ d4f36e44f496f4d51baa3241eabc60fd waf/malcare.py
78af8e791207db9723a14bddeb7524af waf/naxsi.py
504ade4d32bdbbd2932eebb07f57c3eb waf/netcontinuum.py
84e9c68b6ecffafb5ec8cd96acaf62b9 waf/newdefend.py
-9217767400caaf2c09379b694e0038e5 waf/nginx.py
d03dfe93a14c966b88f5baf59ce2b091 waf/ninjafirewall.py
69fc40e85751279e9018d643742db04e waf/nsfocus.py
a59aff03a5b3fb40ea0feb3489677040 waf/onmessageshield.py
diff --git a/waf/nginx.py b/waf/nginx.py
deleted file mode 100644
index 5e12122b6dd..00000000000
--- a/waf/nginx.py
+++ /dev/null
@@ -1,21 +0,0 @@
-#!/usr/bin/env python
-
-"""
-Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
-See the file 'LICENSE' for copying permission
-"""
-
-from lib.core.settings import WAF_ATTACK_VECTORS
-
-__product__ = "NGINX Web Application Firewall (NGINX Inc.)"
-
-def detect(get_page):
- retval = False
-
- for vector in WAF_ATTACK_VECTORS:
- page, _, _ = get_page(get=vector)
- retval = all(_ in (page or "") for _ in ("403 Forbidden
", "nginx"))
- if retval:
- break
-
- return retval
From d086b2aca02e07a91ff7d0bd6c765c8e12c8b07f Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Sat, 12 Jan 2019 17:47:43 +0100
Subject: [PATCH 048/800] Minor update of WAF scripts
---
lib/core/settings.py | 2 +-
txt/checksum.md5 | 8 ++++----
waf/newdefend.py | 5 +++--
waf/safedog.py | 3 ++-
waf/yundun.py | 3 ++-
5 files changed, 12 insertions(+), 9 deletions(-)
diff --git a/lib/core/settings.py b/lib/core/settings.py
index e59d51681d0..58a11dc5d61 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.46"
+VERSION = "1.3.1.47"
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/txt/checksum.md5 b/txt/checksum.md5
index 14b5ce27f3d..54adfe61277 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-0aa1b299611d496be282fd02f95f3cd4 lib/core/settings.py
+5e0f2b028357ec0b63678438fca8c4d5 lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -434,7 +434,7 @@ d4f36e44f496f4d51baa3241eabc60fd waf/malcare.py
509af267f45485f3cb1c839fa040ff07 waf/modsecurity.py
78af8e791207db9723a14bddeb7524af waf/naxsi.py
504ade4d32bdbbd2932eebb07f57c3eb waf/netcontinuum.py
-84e9c68b6ecffafb5ec8cd96acaf62b9 waf/newdefend.py
+96e1902b7e4297173d519b00c86f6a02 waf/newdefend.py
d03dfe93a14c966b88f5baf59ce2b091 waf/ninjafirewall.py
69fc40e85751279e9018d643742db04e waf/nsfocus.py
a59aff03a5b3fb40ea0feb3489677040 waf/onmessageshield.py
@@ -446,7 +446,7 @@ ac60456fe7af4eb501d448910e98ee4b waf/radware.py
987389e4f403b7615d6d8006420a6260 waf/requestvalidationmode.py
8dae5619edafaaceccf1c4eb051c7d22 waf/rsfirewall.py
d2d9718de217dd07d9e66b2e6ad61380 waf/safe3.py
-4382cb217354d816580ee07178d0a8c7 waf/safedog.py
+213062db202a6eb0939a6674f96be551 waf/safedog.py
34440ee94fcff88b4158e86635176547 waf/secureentry.py
ac0728ddb7a15b46b0eabd78cd661f8c waf/secureiis.py
ba37e1c37fa0e3688873f74183a9cb9c waf/senginx.py
@@ -470,7 +470,7 @@ ba0fb1e6b815446b9d6f30950900fc80 waf/trafficshield.py
114000c53115fa8f4dd9b1b9122ec32a waf/watchguard.py
a7b8c4c3d1463409e0e204932f0ddff0 waf/webknight.py
ac9e4e3ced77012ed97284634a9ffc74 waf/wordfence.py
-e16122cb40e5f3a66cba359cfb672bd2 waf/yundun.py
+e69f77220558564785f0b3c961782a93 waf/yundun.py
a560bee3e948b97af2c88805933dcaad waf/yunsuo.py
c8b6517da2c8a28d474956e3a6b8c1ed waf/zenedge.py
e68f399aeaa5b516f043af88dd4871a0 xml/banner/generic.xml
diff --git a/waf/newdefend.py b/waf/newdefend.py
index c96208a36b0..720d5544490 100644
--- a/waf/newdefend.py
+++ b/waf/newdefend.py
@@ -16,8 +16,9 @@ def detect(get_page):
retval = False
for vector in WAF_ATTACK_VECTORS:
- _, headers, _ = get_page(get=vector)
- retval = re.search(r"newdefend", headers.get(HTTP_HEADER.SERVER, ""), re.I) is not None
+ page, headers, _ = get_page(get=vector)
+ retval = re.search(r"NewDefend", headers.get(HTTP_HEADER.SERVER, ""), re.I) is not None
+ retval |= any(_ in (page or "") for _ in ("/nd_block/", "http://www.newdefend.com/feedback/misinformation/"))
if retval:
break
diff --git a/waf/safedog.py b/waf/safedog.py
index 2e0f8fd0b32..91f2726c32f 100644
--- a/waf/safedog.py
+++ b/waf/safedog.py
@@ -16,10 +16,11 @@ def detect(get_page):
retval = False
for vector in WAF_ATTACK_VECTORS:
- _, headers, _ = get_page(get=vector)
+ page, headers, _ = get_page(get=vector)
retval = re.search(r"WAF/2\.0", headers.get(HTTP_HEADER.X_POWERED_BY, ""), re.I) is not None
retval |= re.search(r"Safedog", headers.get(HTTP_HEADER.SERVER, ""), re.I) is not None
retval |= re.search(r"safedog", headers.get(HTTP_HEADER.SET_COOKIE, ""), re.I) is not None
+ retval |= any(_ in (page or "") for _ in ("safedogsite/broswer_logo.jpg", "404.safedog.cn/sitedog_stat.html"))
if retval:
break
diff --git a/waf/yundun.py b/waf/yundun.py
index e9b57cac4ca..ac753ce9871 100644
--- a/waf/yundun.py
+++ b/waf/yundun.py
@@ -16,9 +16,10 @@ def detect(get_page):
retval = False
for vector in WAF_ATTACK_VECTORS:
- _, headers, _ = get_page(get=vector)
+ page, headers, _ = get_page(get=vector)
retval = re.search(r"YUNDUN", headers.get(HTTP_HEADER.SERVER, ""), re.I) is not None
retval |= re.search(r"YUNDUN", headers.get("X-Cache", ""), re.I) is not None
+ retval |= "Blocked by YUNDUN Cloud WAF" in (page or "")
if retval:
break
From c0d4db3aba40c7f373b8895f334cd21e8569ebf3 Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Sun, 13 Jan 2019 12:07:46 +0100
Subject: [PATCH 049/800] URI injection patch (on request by @bojanisc)
---
lib/core/agent.py | 2 +-
lib/core/settings.py | 2 +-
txt/checksum.md5 | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/core/agent.py b/lib/core/agent.py
index 19b6a07b735..b20e368e216 100644
--- a/lib/core/agent.py
+++ b/lib/core/agent.py
@@ -107,7 +107,7 @@ def payload(self, place=None, parameter=None, value=None, newValue=None, where=N
else:
origValue = filter(None, (re.search(_, origValue.split(BOUNDED_INJECTION_MARKER)[0]) for _ in (r"\w+\Z", r"[^\"'><]+\Z", r"[^ ]+\Z")))[0].group(0)
origValue = origValue[origValue.rfind('/') + 1:]
- for char in ('?', '=', ':', ','):
+ for char in ('?', '=', ':', ',', '&'):
if char in origValue:
origValue = origValue[origValue.rfind(char) + 1:]
elif place == PLACE.CUSTOM_POST:
diff --git a/lib/core/settings.py b/lib/core/settings.py
index 58a11dc5d61..315c58ad703 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.47"
+VERSION = "1.3.1.48"
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/txt/checksum.md5 b/txt/checksum.md5
index 54adfe61277..7da8b442314 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -27,7 +27,7 @@ eaccf6204d8c44cee9daba955af0c85e lib/controller/checks.py
3c18f0b1d1b9fda682201a264f170b31 lib/controller/controller.py
e97a9d34fef5761a8eab6432ce3c7c53 lib/controller/handler.py
fb6be55d21a70765e35549af2484f762 lib/controller/__init__.py
-6da66134fec9d81492e5b7c7241fdbd9 lib/core/agent.py
+ed7874be0d2d3802f3d20184f2b280d5 lib/core/agent.py
fdabbf8dda7277e5f4e3d0a6252cffb6 lib/core/bigarray.py
4706fb856c1662ef5afd747544d0d8cb lib/core/common.py
de8d27ae6241163ff9e97aa9e7c51a18 lib/core/convert.py
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-5e0f2b028357ec0b63678438fca8c4d5 lib/core/settings.py
+e6b4873ae0e82e43a62dcdfd670feb61 lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
From 6cdb90ddf87b5c19d678e09b5b4b7d080ef3dbf6 Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Mon, 14 Jan 2019 11:35:54 +0100
Subject: [PATCH 050/800] Same sentence in Cloudflare (too)
---
lib/core/settings.py | 2 +-
txt/checksum.md5 | 4 ++--
waf/stackpath.py | 2 +-
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/core/settings.py b/lib/core/settings.py
index 315c58ad703..29e78af1697 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.48"
+VERSION = "1.3.1.49"
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/txt/checksum.md5 b/txt/checksum.md5
index 7da8b442314..7517354006f 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-e6b4873ae0e82e43a62dcdfd670feb61 lib/core/settings.py
+4f9aafb24e5b12eb078b1b68719d9afe lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -457,7 +457,7 @@ c842d298e61a87b32668c8402a0d87b5 waf/sitelock.py
a840fcd2bb042694f9aab2859e7c9b30 waf/sonicwall.py
45683bfe7a428f47745416c727a789bd waf/sophos.py
ed1ecabfa8396e70494b0a3d70a22eb1 waf/squarespace.py
-4a11ba8e5f3995b35f5fc189b8c2692e waf/stackpath.py
+8ace2ad70a4bba8825c8538e349839da waf/stackpath.py
74bd52941b606d15f1a6cdc7b52f761c waf/sucuri.py
205beb7ed5e70119f8700a9e295b6a4a waf/tencent.py
ef6f83952ce6b5a7bbb19f9b903af2b6 waf/teros.py
diff --git a/waf/stackpath.py b/waf/stackpath.py
index 2e12b9c2a05..74478ccc9ae 100644
--- a/waf/stackpath.py
+++ b/waf/stackpath.py
@@ -14,7 +14,7 @@ def detect(get_page):
for vector in WAF_ATTACK_VECTORS:
page, _, _ = get_page(get=vector)
- retval = all(_ in (page or "") for _ in ("This website is using a security service to protect itself from online attacks", "You performed an action that triggered the service and blocked your request"))
+ retval = all(_ in (page or "") for _ in ("You performed an action that triggered the service and blocked your request",))
if retval:
break
From 40f067aa17aafca9421b3f482d474ce5ee0c4452 Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Tue, 15 Jan 2019 00:41:00 +0100
Subject: [PATCH 051/800] Adding new WAF scripts (merging from identYwaf - same
author)
---
lib/core/settings.py | 2 +-
txt/checksum.md5 | 11 ++++++++---
waf/barracuda.py | 3 ++-
waf/bitninja.py | 21 +++++++++++++++++++++
waf/greywizard.py | 25 +++++++++++++++++++++++++
waf/incapsula.py | 3 +--
waf/janusec.py | 21 +++++++++++++++++++++
waf/netscaler.py | 21 +++++++++++++++++++++
waf/perimeterx.py | 19 +++++++++++++++++++
9 files changed, 119 insertions(+), 7 deletions(-)
create mode 100644 waf/bitninja.py
create mode 100644 waf/greywizard.py
create mode 100644 waf/janusec.py
create mode 100644 waf/netscaler.py
create mode 100644 waf/perimeterx.py
diff --git a/lib/core/settings.py b/lib/core/settings.py
index 29e78af1697..7ec84b35b4c 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.49"
+VERSION = "1.3.1.50"
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/txt/checksum.md5 b/txt/checksum.md5
index 7517354006f..8b809361590 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-4f9aafb24e5b12eb078b1b68719d9afe lib/core/settings.py
+80cfb89595be410e564c7501c530c58e lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -404,8 +404,9 @@ b6bc83ae9ea69cf96e9389bde8250c7c waf/airlock.py
425f2599f57ab81b4fff67e6b442cccc waf/armor.py
33b6e6793ed3add457d7c909ec599ad3 waf/asm.py
9dbec5d674ed4c762ffc9bc3ab402739 waf/aws.py
-4fd9a8e3aac364fe5509b23e7eb5a448 waf/barracuda.py
+e57a22864477ad23ae6a3d308f9b5410 waf/barracuda.py
742f8c9b7f3a858e11dfd2ce3df65c6e waf/binarysec.py
+1712d76bd4adb705f3317ff5908acdcd waf/bitninja.py
2608fbe2c80fae99bb09db1f93d80cdd waf/bluedon.py
8385218d8a1863dbfd4274db36880dfe waf/cerber.py
5ae64cad95b7f904c350cc81230c3bd1 waf/chinacache.py
@@ -423,10 +424,12 @@ a8412619d7f26ed6bc9e0b20a57b2324 waf/edgecast.py
588d2f9a8f201e120e74e508564cb487 waf/fortiweb.py
0e9eb20967d2dde941cca8c663a63e1f waf/generic.py
4ea580dd1b9679bd733866976ad5d81e waf/godaddy.py
+27385b15477031a3aff25df601a1ff51 waf/greywizard.py
256a7ea2c1cd2745fe788cf8f6123f8a waf/imunify360.py
-4c4d480c155ae99262043c80a76ec1d5 waf/incapsula.py
+f4e3fb185b92483832d14b532f467b35 waf/incapsula.py
fb6be55d21a70765e35549af2484f762 waf/__init__.py
a3ee375714987acccc26d1b07c2e8af7 waf/isaserver.py
+e6994165497cef25d7a785cd3d4a3c64 waf/janusec.py
ce9cf35919a92d65347bb74ca0c5c86f waf/jiasule.py
f44ed04eeb4287c11ce277703ec7d72d waf/knownsec.py
8c3977c543ca4ec6d4231f604217cf94 waf/kona.py
@@ -434,11 +437,13 @@ d4f36e44f496f4d51baa3241eabc60fd waf/malcare.py
509af267f45485f3cb1c839fa040ff07 waf/modsecurity.py
78af8e791207db9723a14bddeb7524af waf/naxsi.py
504ade4d32bdbbd2932eebb07f57c3eb waf/netcontinuum.py
+8004b57e9b8e19060aae5b82ecb87472 waf/netscaler.py
96e1902b7e4297173d519b00c86f6a02 waf/newdefend.py
d03dfe93a14c966b88f5baf59ce2b091 waf/ninjafirewall.py
69fc40e85751279e9018d643742db04e waf/nsfocus.py
a59aff03a5b3fb40ea0feb3489677040 waf/onmessageshield.py
532b6f8de357a9b88a313944e1756538 waf/paloalto.py
+f9de9375ffd0447ba93b215493d327a1 waf/perimeterx.py
2979bb64c24256a83625d75a385dde9b waf/profense.py
8de0d46738335a4e498c4ac9038ac3c3 waf/proventia.py
ac60456fe7af4eb501d448910e98ee4b waf/radware.py
diff --git a/waf/barracuda.py b/waf/barracuda.py
index 0e769a65b17..a8e7754c6d6 100644
--- a/waf/barracuda.py
+++ b/waf/barracuda.py
@@ -16,9 +16,10 @@ def detect(get_page):
retval = False
for vector in WAF_ATTACK_VECTORS:
- _, headers, _ = get_page(get=vector)
+ page, headers, _ = get_page(get=vector)
retval = re.search(r"\Abarra_counter_session=", headers.get(HTTP_HEADER.SET_COOKIE, ""), re.I) is not None
retval |= re.search(r"(\A|\b)barracuda_", headers.get(HTTP_HEADER.SET_COOKIE, ""), re.I) is not None
+ retval |= "when this page occurred and the event ID found at the bottom of the page" in (page or "")
if retval:
break
diff --git a/waf/bitninja.py b/waf/bitninja.py
new file mode 100644
index 00000000000..648446388c6
--- /dev/null
+++ b/waf/bitninja.py
@@ -0,0 +1,21 @@
+#!/usr/bin/env python
+
+"""
+Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
+See the file 'LICENSE' for copying permission
+"""
+
+from lib.core.settings import WAF_ATTACK_VECTORS
+
+__product__ = "BitNinja (BitNinja)"
+
+def detect(get_page):
+ retval = False
+
+ for vector in WAF_ATTACK_VECTORS:
+ page, _, _ = get_page(get=vector)
+ retval = any(_ in (page or "") for _ in ("alt=\"BitNinja|Security check by BitNinja", "your IP will be removed from BitNinja", "Visitor anti-robot validation"))
+ if retval:
+ break
+
+ return retval
diff --git a/waf/greywizard.py b/waf/greywizard.py
new file mode 100644
index 00000000000..b26f4415063
--- /dev/null
+++ b/waf/greywizard.py
@@ -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__ = "Greywizard (Grey Wizard)"
+
+def detect(get_page):
+ retval = False
+
+ for vector in WAF_ATTACK_VECTORS:
+ page, headers, _ = get_page(get=vector)
+ retval = re.search(r"\Agreywizard", headers.get(HTTP_HEADER.SERVER, ""), re.I) is not None
+ retval |= any(_ in (page or "") for _ in ("We've detected attempted attack or non standard traffic from your IP address", "Grey Wizard"))
+ if retval:
+ break
+
+ return retval
diff --git a/waf/incapsula.py b/waf/incapsula.py
index 6ece7005ed8..fb8b8655a97 100644
--- a/waf/incapsula.py
+++ b/waf/incapsula.py
@@ -19,8 +19,7 @@ def detect(get_page):
page, headers, _ = get_page(get=vector)
retval = re.search(r"incap_ses|visid_incap", headers.get(HTTP_HEADER.SET_COOKIE, ""), re.I) is not None
retval |= re.search(r"Incapsula", headers.get("X-CDN", ""), re.I) is not None
- retval |= any(_ in (page or "") for _ in ("Incapsula incident ID", "_Incapsula_Resource?", "?subject=WAF Block Page:"))
- retval |= all(_ in (page or "") for _ in ("Application Firewall Error", "If you feel you have been blocked in error, please contact Customer Support"))
+ retval |= "Incapsula incident ID" in (page or "")
retval |= all(_ in (page or "") for _ in ("Error code 15", "This request was blocked by the security rules"))
retval |= re.search(r"(?i)incident.{1,100}?\b\d{19}\-\d{17}\b", page or "") is not None
retval |= headers.get("X-Iinfo") is not None
diff --git a/waf/janusec.py b/waf/janusec.py
new file mode 100644
index 00000000000..442236e7cdf
--- /dev/null
+++ b/waf/janusec.py
@@ -0,0 +1,21 @@
+#!/usr/bin/env python
+
+"""
+Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
+See the file 'LICENSE' for copying permission
+"""
+
+from lib.core.settings import WAF_ATTACK_VECTORS
+
+__product__ = "Janusec Application Gateway (Janusec)"
+
+def detect(get_page):
+ retval = False
+
+ for vector in WAF_ATTACK_VECTORS:
+ page, _, _ = get_page(get=vector)
+ retval = all(_ in (page or "") for _ in ("Reason:", "by Janusec Application Gateway"))
+ if retval:
+ break
+
+ return retval
diff --git a/waf/netscaler.py b/waf/netscaler.py
new file mode 100644
index 00000000000..c3a5472fd34
--- /dev/null
+++ b/waf/netscaler.py
@@ -0,0 +1,21 @@
+#!/usr/bin/env python
+
+"""
+Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
+See the file 'LICENSE' for copying permission
+"""
+
+from lib.core.settings import WAF_ATTACK_VECTORS
+
+__product__ = "NetScaler AppFirewall (Citrix)"
+
+def detect(get_page):
+ retval = False
+
+ for vector in WAF_ATTACK_VECTORS:
+ page, _, _ = get_page(get=vector)
+ retval |= any(_ in (page or "") for _ in ("Application Firewall Block Page", "Violation Category: APPFW_", "AppFW Session ID", "Access has been blocked - if you feel this is in error, please contact the site administrators quoting the following"))
+ if retval:
+ break
+
+ return retval
diff --git a/waf/perimeterx.py b/waf/perimeterx.py
new file mode 100644
index 00000000000..f034dd5306c
--- /dev/null
+++ b/waf/perimeterx.py
@@ -0,0 +1,19 @@
+#!/usr/bin/env python
+
+"""
+Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
+See the file 'LICENSE' for copying permission
+"""
+
+from lib.core.settings import WAF_ATTACK_VECTORS
+
+__product__ = "PerimeterX (PerimeterX, Inc.)"
+
+def detect(get_page):
+ retval = False
+
+ for vector in WAF_ATTACK_VECTORS:
+ page, _, _ = get_page(get=vector)
+ retval = "https://www.perimeterx.com/whywasiblocked" in (page or "")
+
+ return retval
From 21ce71bee82bdb3e5091c19b42b55c30703e4e9e Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Wed, 16 Jan 2019 10:32:56 +0100
Subject: [PATCH 052/800] Removing junk
---
lib/core/settings.py | 2 +-
txt/checksum.md5 | 3 +--
waf/teros.py | 24 ------------------------
3 files changed, 2 insertions(+), 27 deletions(-)
delete mode 100644 waf/teros.py
diff --git a/lib/core/settings.py b/lib/core/settings.py
index 7ec84b35b4c..b3224bb00f0 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.50"
+VERSION = "1.3.1.51"
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/txt/checksum.md5 b/txt/checksum.md5
index 8b809361590..4bb02d0d0bf 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-80cfb89595be410e564c7501c530c58e lib/core/settings.py
+540a2dab2853ea2599996b12183a7c2f lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -465,7 +465,6 @@ ed1ecabfa8396e70494b0a3d70a22eb1 waf/squarespace.py
8ace2ad70a4bba8825c8538e349839da waf/stackpath.py
74bd52941b606d15f1a6cdc7b52f761c waf/sucuri.py
205beb7ed5e70119f8700a9e295b6a4a waf/tencent.py
-ef6f83952ce6b5a7bbb19f9b903af2b6 waf/teros.py
ba0fb1e6b815446b9d6f30950900fc80 waf/trafficshield.py
1c15216824f96e23a76591ac29eb6d7d waf/urlmaster.py
876c746d96193071271cb8b7e00e1422 waf/urlscan.py
diff --git a/waf/teros.py b/waf/teros.py
deleted file mode 100644
index 1d4c8019da7..00000000000
--- a/waf/teros.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/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__ = "Teros/Citrix Application Firewall Enterprise (Teros/Citrix Systems)"
-
-def detect(get_page):
- retval = False
-
- for vector in WAF_ATTACK_VECTORS:
- _, headers, _ = get_page(get=vector)
- retval = re.search(r"\Ast8(id|_wat|_wlf)", headers.get(HTTP_HEADER.SET_COOKIE, ""), re.I) is not None
- if retval:
- break
-
- return retval
From 669afdd81b37bc40c111a7e0537ad83bda5f96b5 Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Wed, 16 Jan 2019 14:38:50 +0100
Subject: [PATCH 053/800] Adding new waf script
---
lib/core/settings.py | 2 +-
txt/checksum.md5 | 5 +++--
waf/asm.py | 2 --
waf/securesphere.py | 24 ++++++++++++++++++++++++
4 files changed, 28 insertions(+), 5 deletions(-)
create mode 100644 waf/securesphere.py
diff --git a/lib/core/settings.py b/lib/core/settings.py
index b3224bb00f0..469ea9059fe 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.51"
+VERSION = "1.3.1.52"
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/txt/checksum.md5 b/txt/checksum.md5
index 4bb02d0d0bf..2e74299f48a 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-540a2dab2853ea2599996b12183a7c2f lib/core/settings.py
+d678e90ba0f7ce756b88a0540e5e7db9 lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -402,7 +402,7 @@ b6bc83ae9ea69cf96e9389bde8250c7c waf/airlock.py
34b8ec9f438d7daa56aa016e6c09fadb waf/anquanbao.py
7ab1a7cd51a02899592f4f755d36a02e waf/approach.py
425f2599f57ab81b4fff67e6b442cccc waf/armor.py
-33b6e6793ed3add457d7c909ec599ad3 waf/asm.py
+2d03af372a8e660e67437438264a144d waf/asm.py
9dbec5d674ed4c762ffc9bc3ab402739 waf/aws.py
e57a22864477ad23ae6a3d308f9b5410 waf/barracuda.py
742f8c9b7f3a858e11dfd2ce3df65c6e waf/binarysec.py
@@ -454,6 +454,7 @@ d2d9718de217dd07d9e66b2e6ad61380 waf/safe3.py
213062db202a6eb0939a6674f96be551 waf/safedog.py
34440ee94fcff88b4158e86635176547 waf/secureentry.py
ac0728ddb7a15b46b0eabd78cd661f8c waf/secureiis.py
+c6cbe2de808d7a6b614a9ba3c85b4141 waf/securesphere.py
ba37e1c37fa0e3688873f74183a9cb9c waf/senginx.py
2602a8baed4da643e606a379e4dc75db waf/shieldsecurity.py
fc21ce1e6e597e44818c03d9cb859e83 waf/siteground.py
diff --git a/waf/asm.py b/waf/asm.py
index e34b0671c21..057bd3154c4 100644
--- a/waf/asm.py
+++ b/waf/asm.py
@@ -17,8 +17,6 @@ def detect(get_page):
for vector in WAF_ATTACK_VECTORS:
page, headers, code = get_page(get=vector)
retval = "The requested URL was rejected. Please consult with your administrator." in (page or "")
- retval |= all(_ in (page or "") for _ in ("This page can't be displayed. Contact support for additional information", "The incident ID is:"))
- retval |= re.search(r"(?i)Support.ID", page or "") is not None and re.search(r"\b\d{19}\b", page or "") is not None
retval |= all(_ in (page or "") for _ in ("security.f5aas.com", "Please enable JavaScript to view the page content"))
if retval:
break
diff --git a/waf/securesphere.py b/waf/securesphere.py
new file mode 100644
index 00000000000..3de61f9c0cb
--- /dev/null
+++ b/waf/securesphere.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.enums import HTTP_HEADER
+from lib.core.settings import WAF_ATTACK_VECTORS
+
+__product__ = "SecureSphere Web Application Firewall (Imperva)"
+
+def detect(get_page):
+ retval = False
+
+ for vector in WAF_ATTACK_VECTORS:
+ page, _, _ = get_page(get=vector)
+ retval = re.search(r"Error
.+?#FEEE7A.+?Error|Contact support for additional information.
The incident ID is: (\\d{19}|N/A)", page or "", re.I) is not None
+ if retval:
+ break
+
+ return retval
From 7eb45b9d8f29dc266da141b2198361a5677abd7b Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Thu, 17 Jan 2019 15:06:00 +0100
Subject: [PATCH 054/800] Patch related to the #3438
---
lib/core/settings.py | 4 ++--
lib/utils/search.py | 17 ++++++++++++++---
txt/checksum.md5 | 4 ++--
3 files changed, 18 insertions(+), 7 deletions(-)
diff --git a/lib/core/settings.py b/lib/core/settings.py
index 469ea9059fe..f3a79d53de5 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.52"
+VERSION = "1.3.1.53"
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)
@@ -109,7 +109,7 @@
GOOGLE_REGEX = r"webcache\.googleusercontent\.com/search\?q=cache:[^:]+:([^+]+)\+&cd=|url\?\w+=((?![^>]+webcache\.googleusercontent\.com)http[^>]+)&(sa=U|rct=j)"
# Regular expression used for extracting results from DuckDuckGo search
-DUCKDUCKGO_REGEX = r'"u":"([^"]+)'
+DUCKDUCKGO_REGEX = r'
Date: Thu, 17 Jan 2019 15:12:31 +0100
Subject: [PATCH 055/800] Minor patch related to the 3438
---
lib/core/settings.py | 2 +-
lib/utils/search.py | 2 +-
txt/checksum.md5 | 4 ++--
3 files changed, 4 insertions(+), 4 deletions(-)
diff --git a/lib/core/settings.py b/lib/core/settings.py
index f3a79d53de5..e36b35215ab 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.53"
+VERSION = "1.3.1.54"
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/lib/utils/search.py b/lib/utils/search.py
index 280fe2502c4..24ef82449f4 100644
--- a/lib/utils/search.py
+++ b/lib/utils/search.py
@@ -163,7 +163,7 @@ def _search(dork):
errMsg = "unable to connect"
raise SqlmapConnectionException(errMsg)
- retVal = [urllib.unquote(match.group(1)) for match in re.finditer(regex, page, re.I | re.S)]
+ retVal = [urllib.unquote(match.group(1).replace("&", "&")) for match in re.finditer(regex, page, re.I | re.S)]
if not retVal and "issue with the Tor Exit Node you are currently using" in page:
warnMsg = "DuckDuckGo has detected 'unusual' traffic from "
diff --git a/txt/checksum.md5 b/txt/checksum.md5
index 66a4baa36d5..4b8788d21f8 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-bba284b24e810f3f7b319ee06a7844bc lib/core/settings.py
+bb703eabbfa9794c9438392dd7ac4d76 lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -114,7 +114,7 @@ fb6be55d21a70765e35549af2484f762 lib/utils/__init__.py
2a40a6bd1779f7db5199f089411b1c1c lib/utils/pivotdumptable.py
5a8902fd6fa94ea73cf44952f9ed5a57 lib/utils/progress.py
a41136344768902f82b2855e88fd228d lib/utils/purge.py
-ba40e595754bc6e8ad16e944cb578d99 lib/utils/search.py
+631aa9e193e459875528fee78e9a770b lib/utils/search.py
8d6b244ca3d6f99a9d6cd8c1856ccfeb lib/utils/sqlalchemy.py
a90c568a9b88eaea832a77581bd39d85 lib/utils/timeout.py
164f830baad3e13b226ee57d44d69dfa lib/utils/versioncheck.py
From b5db4dc15a7c191066278629e052251c98f5fafb Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Fri, 18 Jan 2019 14:31:37 +0100
Subject: [PATCH 056/800] Trivial update (comment)
---
lib/core/settings.py | 8 ++++----
txt/checksum.md5 | 2 +-
2 files changed, 5 insertions(+), 5 deletions(-)
diff --git a/lib/core/settings.py b/lib/core/settings.py
index e36b35215ab..e73bdb8d41b 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.54"
+VERSION = "1.3.1.55"
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)
@@ -526,9 +526,6 @@
# Template used for common column existence check
BRUTE_COLUMN_EXISTS_TEMPLATE = "EXISTS(SELECT %s FROM %s)"
-# Payload used for checking of existence of IDS/IPS/WAF (dummier the better)
-IDS_WAF_CHECK_PAYLOAD = "AND 1=1 UNION ALL SELECT 1,NULL,'',table_name FROM information_schema.tables WHERE 2>1--/**/; EXEC xp_cmdshell('cat ../../../etc/passwd')#"
-
# Data inside shellcodeexec to be filled with random string
SHELLCODEEXEC_RANDOM_STRING_MARKER = "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
@@ -538,6 +535,9 @@
# Value to look for in response to CHECK_INTERNET_ADDRESS
CHECK_INTERNET_VALUE = "IP Address Details"
+# Payload used for checking of existence of WAF/IPS (dummier the better)
+IDS_WAF_CHECK_PAYLOAD = "AND 1=1 UNION ALL SELECT 1,NULL,'',table_name FROM information_schema.tables WHERE 2>1--/**/; EXEC xp_cmdshell('cat ../../../etc/passwd')#"
+
# Vectors used for provoking specific WAF/IPS behavior(s)
WAF_ATTACK_VECTORS = (
"", # NIL
diff --git a/txt/checksum.md5 b/txt/checksum.md5
index 4b8788d21f8..c82a00bd3a3 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-bb703eabbfa9794c9438392dd7ac4d76 lib/core/settings.py
+0a47c8e9c509d2e499ff60054b38d804 lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
From 01dba5c50593b0e7973f8f8dfa687a6d72261e90 Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Sun, 20 Jan 2019 15:13:43 +0100
Subject: [PATCH 057/800] Removing obsolete WAF
---
lib/core/settings.py | 2 +-
txt/checksum.md5 | 3 +--
waf/binarysec.py | 25 -------------------------
3 files changed, 2 insertions(+), 28 deletions(-)
delete mode 100644 waf/binarysec.py
diff --git a/lib/core/settings.py b/lib/core/settings.py
index e73bdb8d41b..2b9614e0c6f 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.55"
+VERSION = "1.3.1.56"
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/txt/checksum.md5 b/txt/checksum.md5
index c82a00bd3a3..f159116e7c6 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-0a47c8e9c509d2e499ff60054b38d804 lib/core/settings.py
+0328a4b5e5880289b867aa143387b9a9 lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -405,7 +405,6 @@ b6bc83ae9ea69cf96e9389bde8250c7c waf/airlock.py
2d03af372a8e660e67437438264a144d waf/asm.py
9dbec5d674ed4c762ffc9bc3ab402739 waf/aws.py
e57a22864477ad23ae6a3d308f9b5410 waf/barracuda.py
-742f8c9b7f3a858e11dfd2ce3df65c6e waf/binarysec.py
1712d76bd4adb705f3317ff5908acdcd waf/bitninja.py
2608fbe2c80fae99bb09db1f93d80cdd waf/bluedon.py
8385218d8a1863dbfd4274db36880dfe waf/cerber.py
diff --git a/waf/binarysec.py b/waf/binarysec.py
deleted file mode 100644
index 31905d1de51..00000000000
--- a/waf/binarysec.py
+++ /dev/null
@@ -1,25 +0,0 @@
-#!/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__ = "BinarySEC Web Application Firewall (BinarySEC)"
-
-def detect(get_page):
- retval = False
-
- for vector in WAF_ATTACK_VECTORS:
- _, headers, _ = get_page(get=vector)
- retval = any(headers.get(_) for _ in ("x-binarysec-via", "x-binarysec-nocache"))
- retval |= re.search(r"BinarySec", headers.get(HTTP_HEADER.SERVER, ""), re.I) is not None
- if retval:
- break
-
- return retval
From daa915a6f21812d6a93292517829d3cf40e9f936 Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Sun, 20 Jan 2019 15:26:57 +0100
Subject: [PATCH 058/800] Removing unusable WAF script
---
lib/core/settings.py | 2 +-
txt/checksum.md5 | 3 +--
waf/nsfocus.py | 24 ------------------------
3 files changed, 2 insertions(+), 27 deletions(-)
delete mode 100644 waf/nsfocus.py
diff --git a/lib/core/settings.py b/lib/core/settings.py
index 2b9614e0c6f..9fec08c2759 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.56"
+VERSION = "1.3.1.57"
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/txt/checksum.md5 b/txt/checksum.md5
index f159116e7c6..a0ac063ade2 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-0328a4b5e5880289b867aa143387b9a9 lib/core/settings.py
+65d7f43d13347de8fe30238a082c2066 lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -439,7 +439,6 @@ d4f36e44f496f4d51baa3241eabc60fd waf/malcare.py
8004b57e9b8e19060aae5b82ecb87472 waf/netscaler.py
96e1902b7e4297173d519b00c86f6a02 waf/newdefend.py
d03dfe93a14c966b88f5baf59ce2b091 waf/ninjafirewall.py
-69fc40e85751279e9018d643742db04e waf/nsfocus.py
a59aff03a5b3fb40ea0feb3489677040 waf/onmessageshield.py
532b6f8de357a9b88a313944e1756538 waf/paloalto.py
f9de9375ffd0447ba93b215493d327a1 waf/perimeterx.py
diff --git a/waf/nsfocus.py b/waf/nsfocus.py
deleted file mode 100644
index b5c95804e71..00000000000
--- a/waf/nsfocus.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/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__ = "NSFOCUS Web Application Firewall (NSFOCUS)"
-
-def detect(get_page):
- retval = False
-
- for vector in WAF_ATTACK_VECTORS:
- _, headers, _ = get_page(get=vector)
- retval = re.search(r"NSFocus", headers.get(HTTP_HEADER.SERVER, ""), re.I) is not None
- if retval:
- break
-
- return retval
From 36b69bbe7958265d171385c03f98f025483a82ed Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Sun, 20 Jan 2019 15:34:30 +0100
Subject: [PATCH 059/800] More cleaning up
---
lib/core/settings.py | 2 +-
txt/checksum.md5 | 3 +--
waf/netcontinuum.py | 24 ------------------------
3 files changed, 2 insertions(+), 27 deletions(-)
delete mode 100644 waf/netcontinuum.py
diff --git a/lib/core/settings.py b/lib/core/settings.py
index 9fec08c2759..7579be70714 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.57"
+VERSION = "1.3.1.58"
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/txt/checksum.md5 b/txt/checksum.md5
index a0ac063ade2..87fc3070814 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-65d7f43d13347de8fe30238a082c2066 lib/core/settings.py
+318a4670831fc731de473681797042fb lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -435,7 +435,6 @@ f44ed04eeb4287c11ce277703ec7d72d waf/knownsec.py
d4f36e44f496f4d51baa3241eabc60fd waf/malcare.py
509af267f45485f3cb1c839fa040ff07 waf/modsecurity.py
78af8e791207db9723a14bddeb7524af waf/naxsi.py
-504ade4d32bdbbd2932eebb07f57c3eb waf/netcontinuum.py
8004b57e9b8e19060aae5b82ecb87472 waf/netscaler.py
96e1902b7e4297173d519b00c86f6a02 waf/newdefend.py
d03dfe93a14c966b88f5baf59ce2b091 waf/ninjafirewall.py
diff --git a/waf/netcontinuum.py b/waf/netcontinuum.py
deleted file mode 100644
index 2a5aaf1b7c0..00000000000
--- a/waf/netcontinuum.py
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/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__ = "NetContinuum Web Application Firewall (NetContinuum/Barracuda Networks)"
-
-def detect(get_page):
- retval = False
-
- for vector in WAF_ATTACK_VECTORS:
- _, headers, _ = get_page(get=vector)
- retval = re.search(r"\ANCI__SessionId=", headers.get(HTTP_HEADER.SET_COOKIE, ""), re.I) is not None
- if retval:
- break
-
- return retval
From 17b79cd21b937d80aa86ca07e79d30761f31162e Mon Sep 17 00:00:00 2001
From: Miroslav Stampar
Date: Sun, 20 Jan 2019 16:49:14 +0100
Subject: [PATCH 060/800] Minor cleanup
---
lib/core/settings.py | 2 +-
txt/checksum.md5 | 3 +--
waf/cleantalk.py | 19 -------------------
3 files changed, 2 insertions(+), 22 deletions(-)
delete mode 100644 waf/cleantalk.py
diff --git a/lib/core/settings.py b/lib/core/settings.py
index 7579be70714..eaa457465aa 100644
--- a/lib/core/settings.py
+++ b/lib/core/settings.py
@@ -19,7 +19,7 @@
from lib.core.enums import OS
# sqlmap version (...)
-VERSION = "1.3.1.58"
+VERSION = "1.3.1.59"
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/txt/checksum.md5 b/txt/checksum.md5
index 87fc3070814..c7145c32fed 100644
--- a/txt/checksum.md5
+++ b/txt/checksum.md5
@@ -49,7 +49,7 @@ fe370021c6bc99daf44b2bfc0d1effb3 lib/core/patch.py
9a7d68d5fa01561500423791f15cc676 lib/core/replication.py
3179d34f371e0295dd4604568fb30bcd lib/core/revision.py
d6269c55789f78cf707e09a0f5b45443 lib/core/session.py
-318a4670831fc731de473681797042fb lib/core/settings.py
+a6c91e706b0c752a7c89ed1a5737b8e6 lib/core/settings.py
a8a7501d1e6b21669b858a62e921d191 lib/core/shell.py
5dc606fdf0afefd4b305169c21ab2612 lib/core/subprocessng.py
eec3080ba5baca44c6de4595f1c92a0d lib/core/target.py
@@ -410,7 +410,6 @@ e57a22864477ad23ae6a3d308f9b5410 waf/barracuda.py
8385218d8a1863dbfd4274db36880dfe waf/cerber.py
5ae64cad95b7f904c350cc81230c3bd1 waf/chinacache.py
a05edf8f2962dfff0457b7a4fd5e169c waf/ciscoacexml.py
-2565869c73a9a37f25deb317e8f5d9dd waf/cleantalk.py
af079de99a8ec6988d28aa4c0aa32cf9 waf/cloudbric.py
8fec83056c8728076ab17ab3a2ebbe7b waf/cloudflare.py
9ae3dfb7c03da53fb67c6c3cb56b4827 waf/cloudfront.py
diff --git a/waf/cleantalk.py b/waf/cleantalk.py
deleted file mode 100644
index 006d2a75cc3..00000000000
--- a/waf/cleantalk.py
+++ /dev/null
@@ -1,19 +0,0 @@
-#!/usr/bin/env python
-
-"""
-Copyright (c) 2006-2019 sqlmap developers (http://sqlmap.org/)
-See the file 'LICENSE' for copying permission
-"""
-
-from lib.core.settings import WAF_ATTACK_VECTORS
-
-__product__ = "CleanTalk Web Application FireWall (CleanTalk)"
-
-def detect(get_page):
- retval = False
-
- for vector in WAF_ATTACK_VECTORS:
- page, _, _ = get_page(get=vector)
- retval = any(_ in (page or "") for _ in ("Blocked by Web Application Firewall", "Security by CleanTalk"))
-
- return retval
From 7672b9a0a27747f2becfacb28f891fcabd9cb35a Mon Sep 17 00:00:00 2001
From: Miroslav Stampar