mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-01-24 00:04:23 +03:00
minor refactoring
This commit is contained in:
parent
cd00c0d084
commit
23bf52e496
|
@ -294,7 +294,7 @@ def errorUse(expression, expected=None, resumeValue=True, dump=False):
|
|||
stopLimit = conf.limitStop
|
||||
|
||||
# Count the number of SQL query entries output
|
||||
countedExpression = expression.replace(expressionFields, "COUNT(*)", 1)
|
||||
countedExpression = expression.replace(expressionFields, queries[Backend.getIdentifiedDbms()].count.query % '*', 1)
|
||||
|
||||
if re.search(" ORDER BY ", expression, re.I):
|
||||
untilOrderChar = countedExpression.index(" ORDER BY ")
|
||||
|
|
|
@ -234,7 +234,7 @@ def unionUse(expression, unpack=True, dump=False):
|
|||
stopLimit = conf.limitStop
|
||||
|
||||
# Count the number of SQL query entries output
|
||||
countedExpression = expression.replace(expressionFields, "COUNT(*)", 1)
|
||||
countedExpression = expression.replace(expressionFields, queries[Backend.getIdentifiedDbms()].count.query % '*', 1)
|
||||
|
||||
if re.search(" ORDER BY ", expression, re.I):
|
||||
untilOrderChar = countedExpression.index(" ORDER BY ")
|
||||
|
|
|
@ -1322,9 +1322,9 @@ class Enumeration:
|
|||
|
||||
def __tableGetCount(self, db, table):
|
||||
if Backend.isDbms(DBMS.DB2):
|
||||
query = "SELECT COUNT(*) FROM %s.%s--" % (safeSQLIdentificatorNaming(db.upper()), safeSQLIdentificatorNaming(table.upper(), True))
|
||||
query = "SELECT %s FROM %s.%s--" % (queries[Backend.getIdentifiedDbms()].count.query % '*', safeSQLIdentificatorNaming(db.upper()), safeSQLIdentificatorNaming(table.upper(), True))
|
||||
else:
|
||||
query = "SELECT COUNT(*) FROM %s.%s" % (safeSQLIdentificatorNaming(db), safeSQLIdentificatorNaming(table, True))
|
||||
query = "SELECT %s FROM %s.%s" % (queries[Backend.getIdentifiedDbms()].count.query % '*', safeSQLIdentificatorNaming(db), safeSQLIdentificatorNaming(table, True))
|
||||
|
||||
count = inject.getValue(query, expected=EXPECTED.INT, charsetType=2)
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user