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