From a3249019d949d9c114d9ec9e6670f78cbeaba959 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Fri, 8 Sep 2017 11:43:10 +0200 Subject: [PATCH] Patch for an Issue #2690 --- lib/core/settings.py | 2 +- tamper/greatest.py | 4 ++-- txt/checksum.md5 | 4 ++-- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/core/settings.py b/lib/core/settings.py index 46fdf0ee9..6bc308c59 100755 --- a/lib/core/settings.py +++ b/lib/core/settings.py @@ -19,7 +19,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME from lib.core.enums import OS # sqlmap version (...) -VERSION = "1.1.9.7" +VERSION = "1.1.9.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/tamper/greatest.py b/tamper/greatest.py index 012cc6771..2a54326f6 100644 --- a/tamper/greatest.py +++ b/tamper/greatest.py @@ -36,10 +36,10 @@ def tamper(payload, **kwargs): retVal = payload if payload: - match = re.search(r"(?i)(\b(AND|OR)\b\s+)(?!.*\b(AND|OR)\b)([^>]+?)\s*>\s*([^>#-]+)", payload) + match = re.search(r"(?i)(\b(AND|OR)\b\s+)([^>]+?)\s*>\s*(\w+|'[^']+')", payload) if match: - _ = "%sGREATEST(%s,%s+1)=%s" % (match.group(1), match.group(4), match.group(5), match.group(4)) + _ = "%sGREATEST(%s,%s+1)=%s" % (match.group(1), match.group(3), match.group(4), match.group(3)) retVal = retVal.replace(match.group(0), _) return retVal diff --git a/txt/checksum.md5 b/txt/checksum.md5 index 049f0cc37..bddc503bb 100644 --- a/txt/checksum.md5 +++ b/txt/checksum.md5 @@ -46,7 +46,7 @@ c5f09788ee8ff9c9d12a052986875bc6 lib/core/option.py d8e9250f3775119df07e9070eddccd16 lib/core/replication.py 785f86e3f963fa3798f84286a4e83ff2 lib/core/revision.py 40c80b28b3a5819b737a5a17d4565ae9 lib/core/session.py -4bb83f1325fdd8aea4f88b090ce304f2 lib/core/settings.py +0462adcff8d2d98318bbcaf29e9c9ca9 lib/core/settings.py d91291997d2bd2f6028aaf371bf1d3b6 lib/core/shell.py 2ad85c130cc5f2b3701ea85c2f6bbf20 lib/core/subprocessng.py 1576b63db3261e2afd5459189abf967b lib/core/target.py @@ -240,7 +240,7 @@ f341a48112354a50347546fa73f4f531 tamper/commalessmid.py 28c21fd9c9801d398698c646bb894260 tamper/concat2concatws.py d496b8abd40ea1a86c771d9d20174f61 tamper/equaltolike.py fb3c31b72675f6ef27fa420a4e974a55 tamper/escapequotes.py -9efcdbfd3012d3c84ee67e87550d8432 tamper/greatest.py +a5770c537c7e05510108af62fa0ad7b0 tamper/greatest.py b3df54fef913223b4f4fd90aa122870f tamper/halfversionedmorekeywords.py a3a0e76922b4f40f422a0daca4e71af3 tamper/htmlencode.py 6fa2d48bf8a1020a07d1cb95a14688a8 tamper/ifnull2ifisnull.py