mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2024-11-22 17:46:37 +03:00
bug fix
This commit is contained in:
parent
1bdde51d0e
commit
9a1ac96756
|
@ -1166,22 +1166,24 @@ class Enumeration:
|
|||
infoMsg = "fetching columns "
|
||||
|
||||
if len(colList) > 0:
|
||||
condQuery = " AND (%s)" % " OR ".join("%s LIKE '%%%s%%'" % (condition, unsafeSQLIdentificatorNaming(col)) for col in sorted(colList))
|
||||
likeMsg = "like '%s' " % ", ".join(unsafeSQLIdentificatorNaming(col) for col in sorted(colList))
|
||||
infoMsg += likeMsg
|
||||
if colTuple is None:
|
||||
colConsider, colCondParam = self.likeOrExact("column")
|
||||
else:
|
||||
colConsider, colCondParam = colTuple
|
||||
condQueryStr = "%%s%s" % colCondParam
|
||||
condQuery = " AND (%s)" % " OR ".join(condQueryStr % (condition, unsafeSQLIdentificatorNaming(col)) for col in sorted(colList))
|
||||
|
||||
if colConsider == "1":
|
||||
infoMsg += "LIKE '%s' " % ", ".join(unsafeSQLIdentificatorNaming(col) for col in sorted(colList))
|
||||
else:
|
||||
infoMsg += "'%s' " % ", ".join(unsafeSQLIdentificatorNaming(col) for col in sorted(colList))
|
||||
else:
|
||||
condQuery = ""
|
||||
likeMsg = ""
|
||||
|
||||
infoMsg += "for table '%s' " % tbl
|
||||
infoMsg += "on database '%s'" % conf.db
|
||||
logger.info(infoMsg)
|
||||
|
||||
countMsg = "fetching number of columns %s" % likeMsg
|
||||
countMsg += "for table '%s'" % tbl
|
||||
countMsg += " on database '%s'" % conf.db
|
||||
logger.info(countMsg)
|
||||
|
||||
if Backend.getIdentifiedDbms() in ( DBMS.MYSQL, DBMS.PGSQL ):
|
||||
query = rootQuery.blind.count % (unsafeSQLIdentificatorNaming(tbl), unsafeSQLIdentificatorNaming(conf.db))
|
||||
query += condQuery
|
||||
|
|
Loading…
Reference in New Issue
Block a user