mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-29 13:03:50 +03:00
Minor improvement (safer to use column name in COUNT than *, especially when only one column is needed)
This commit is contained in:
parent
d37be5f97b
commit
a40d7a5bca
|
@ -306,7 +306,7 @@ def errorUse(expression, dump=False):
|
||||||
stopLimit = conf.limitStop
|
stopLimit = conf.limitStop
|
||||||
|
|
||||||
# Count the number of SQL query entries output
|
# Count the number of SQL query entries output
|
||||||
countedExpression = expression.replace(expressionFields, queries[Backend.getIdentifiedDbms()].count.query % '*', 1)
|
countedExpression = expression.replace(expressionFields, queries[Backend.getIdentifiedDbms()].count.query % ('*' if len(expressionFieldsList) > 1 else expressionFields), 1)
|
||||||
|
|
||||||
if " ORDER BY " in expression:
|
if " ORDER BY " in expression:
|
||||||
countedExpression = countedExpression[:countedExpression.index(" ORDER BY ")]
|
countedExpression = countedExpression[:countedExpression.index(" ORDER BY ")]
|
||||||
|
|
|
@ -233,7 +233,7 @@ def unionUse(expression, unpack=True, dump=False):
|
||||||
stopLimit = conf.limitStop
|
stopLimit = conf.limitStop
|
||||||
|
|
||||||
# Count the number of SQL query entries output
|
# Count the number of SQL query entries output
|
||||||
countedExpression = expression.replace(expressionFields, queries[Backend.getIdentifiedDbms()].count.query % '*', 1)
|
countedExpression = expression.replace(expressionFields, queries[Backend.getIdentifiedDbms()].count.query % ('*' if len(expressionFieldsList) > 1 else expressionFields), 1)
|
||||||
|
|
||||||
if " ORDER BY " in countedExpression.upper():
|
if " ORDER BY " in countedExpression.upper():
|
||||||
_ = countedExpression.upper().rindex(" ORDER BY ")
|
_ = countedExpression.upper().rindex(" ORDER BY ")
|
||||||
|
|
Loading…
Reference in New Issue
Block a user