From 60767de2eb9645001c6559dc2cd2680f06de6159 Mon Sep 17 00:00:00 2001 From: Miroslav Stampar Date: Thu, 12 Apr 2018 12:25:37 +0200 Subject: [PATCH] Patching issue that got into with patch for #2934 (ORDER BY was unusable in majority of regular cases) --- lib/core/settings.py | 2 +- lib/techniques/union/test.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 5da90e1dd..bcc427d57 100644 --- 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.2.4.15" +VERSION = "1.2.4.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/lib/techniques/union/test.py b/lib/techniques/union/test.py index 7a63bc37f..6d94cb875 100644 --- a/lib/techniques/union/test.py +++ b/lib/techniques/union/test.py @@ -50,7 +50,7 @@ def _findUnionCharCount(comment, place, parameter, value, prefix, suffix, where= retVal = None @stackedmethod - def _orderByTechnique(lowerCount, upperCount): + def _orderByTechnique(lowerCount=None, upperCount=None): def _orderByTest(cols): query = agent.prefixQuery("ORDER BY %d" % cols, prefix=prefix) query = agent.suffixQuery(query, suffix=suffix, comment=comment) @@ -91,7 +91,7 @@ def _findUnionCharCount(comment, place, parameter, value, prefix, suffix, where= lowerCount, upperCount = conf.uColsStart, conf.uColsStop if lowerCount == 1 or conf.uCols: - found = kb.orderByColumns or _orderByTechnique(lowerCount, upperCount) + found = kb.orderByColumns or (_orderByTechnique(lowerCount, upperCount) if conf.uCols else _orderByTechnique()) if found: kb.orderByColumns = found infoMsg = "target URL appears to have %d column%s in query" % (found, 's' if found > 1 else "") diff --git a/txt/checksum.md5 b/txt/checksum.md5 index 303f31cad..0bc9ebc11 100644 --- a/txt/checksum.md5 +++ b/txt/checksum.md5 @@ -46,7 +46,7 @@ c9a56e58984420a5abb7a3f7aadc196d lib/core/optiondict.py 0c3eef46bdbf87e29a3f95f90240d192 lib/core/replication.py a7db43859b61569b601b97f187dd31c5 lib/core/revision.py fcb74fcc9577523524659ec49e2e964b lib/core/session.py -e22083ec5717d91e68a18bf73ebcc628 lib/core/settings.py +f01ac839011009e7c219fc11f528f348 lib/core/settings.py 0dfc2ed40adf72e302291f6ecd4406f6 lib/core/shell.py a7edc9250d13af36ac0108f259859c19 lib/core/subprocessng.py a35efa7bec9f1e6cedf17c9830a79241 lib/core/target.py @@ -96,7 +96,7 @@ f1decf0a987bd3a4bc757212cbe6a6c8 lib/takeover/xp_cmdshell.py f999f2e88dea9ac8831eb2f468478b5f lib/techniques/error/use.py 1e5532ede194ac9c083891c2f02bca93 lib/techniques/__init__.py 1e5532ede194ac9c083891c2f02bca93 lib/techniques/union/__init__.py -cbe59feb11526068bbbd35dca97b3b37 lib/techniques/union/test.py +a36be917cf86a5ee407c83d74567f324 lib/techniques/union/test.py 11ecf2effbe9f40b361843d546c3c521 lib/techniques/union/use.py c552f8d924d962a26f2ded250bcea3b8 lib/utils/api.py 37dfb641358669f62c2acedff241348b lib/utils/brute.py