mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2026-01-25 15:49:03 +00:00
Patching issue that got into with patch for #2934 (ORDER BY was unusable in majority of regular cases)
This commit is contained in:
@@ -19,7 +19,7 @@ from lib.core.enums import DBMS_DIRECTORY_NAME
|
||||
from lib.core.enums import OS
|
||||
|
||||
# sqlmap version (<major>.<minor>.<month>.<monthly commit>)
|
||||
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)
|
||||
|
||||
@@ -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 "")
|
||||
|
||||
Reference in New Issue
Block a user