Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 4bc6f3f

Browse files
committed
Minor bug fix so that --search -T tablename -D db1,db2 now correctly forges the query concatenating db1 and db2 with a OR, not an AND anymore
1 parent 68b9d48 commit 4bc6f3f

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

plugins/generic/enumeration.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2012,7 +2012,7 @@ def searchTable(self):
20122012

20132013
if conf.db and conf.db != CURRENT_DB:
20142014
_ = conf.db.split(",")
2015-
whereDbsQuery = "".join(" AND '%s' = %s" % (unsafeSQLIdentificatorNaming(db), dbCond) for db in _)
2015+
whereDbsQuery = " AND (" + " OR ".join("%s = '%s'" % (dbCond, unsafeSQLIdentificatorNaming(db)) for db in _) + ")"
20162016
infoMsg += " for database%s '%s'" % ("s" if len(_) > 1 else "", ", ".join(db for db in _))
20172017
elif conf.excludeSysDbs:
20182018
whereDbsQuery = "".join(" AND '%s' != %s" % (unsafeSQLIdentificatorNaming(db), dbCond) for db in self.excludeDbsList)

0 commit comments

Comments
 (0)