mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-09-05 03:44:45 +03:00
fixes #370 (the bug was introduced with commit edb977a74e
)#
This commit is contained in:
parent
7ee07d031a
commit
45af22872a
|
@ -56,6 +56,7 @@ class Search:
|
||||||
dbConsider, dbCondParam = self.likeOrExact("database")
|
dbConsider, dbCondParam = self.likeOrExact("database")
|
||||||
|
|
||||||
for db in dbList:
|
for db in dbList:
|
||||||
|
values = []
|
||||||
db = safeSQLIdentificatorNaming(db)
|
db = safeSQLIdentificatorNaming(db)
|
||||||
|
|
||||||
if Backend.getIdentifiedDbms() in (DBMS.ORACLE, DBMS.DB2):
|
if Backend.getIdentifiedDbms() in (DBMS.ORACLE, DBMS.DB2):
|
||||||
|
@ -93,7 +94,7 @@ class Search:
|
||||||
value = safeSQLIdentificatorNaming(value)
|
value = safeSQLIdentificatorNaming(value)
|
||||||
foundDbs.append(value)
|
foundDbs.append(value)
|
||||||
|
|
||||||
if len(foundDbs) == 0 and isInferenceAvailable() and not conf.direct:
|
if not values and isInferenceAvailable() and not conf.direct:
|
||||||
infoMsg = "fetching number of database"
|
infoMsg = "fetching number of database"
|
||||||
if dbConsider == "1":
|
if dbConsider == "1":
|
||||||
infoMsg += "s like"
|
infoMsg += "s like"
|
||||||
|
@ -166,6 +167,7 @@ class Search:
|
||||||
tblConsider, tblCondParam = self.likeOrExact("table")
|
tblConsider, tblCondParam = self.likeOrExact("table")
|
||||||
|
|
||||||
for tbl in tblList:
|
for tbl in tblList:
|
||||||
|
values = []
|
||||||
tbl = safeSQLIdentificatorNaming(tbl, True)
|
tbl = safeSQLIdentificatorNaming(tbl, True)
|
||||||
|
|
||||||
if Backend.getIdentifiedDbms() in (DBMS.ORACLE, DBMS.DB2, DBMS.FIREBIRD):
|
if Backend.getIdentifiedDbms() in (DBMS.ORACLE, DBMS.DB2, DBMS.FIREBIRD):
|
||||||
|
@ -219,8 +221,9 @@ class Search:
|
||||||
else:
|
else:
|
||||||
foundTbls[foundDb] = [foundTbl]
|
foundTbls[foundDb] = [foundTbl]
|
||||||
|
|
||||||
if len(foundTbls) == 0 and isInferenceAvailable() and not conf.direct:
|
if not values and isInferenceAvailable() and not conf.direct:
|
||||||
if Backend.getIdentifiedDbms() not in (DBMS.SQLITE, DBMS.FIREBIRD):
|
if Backend.getIdentifiedDbms() not in (DBMS.SQLITE, DBMS.FIREBIRD):
|
||||||
|
if len(whereDbsQuery) == 0:
|
||||||
infoMsg = "fetching number of databases with table"
|
infoMsg = "fetching number of databases with table"
|
||||||
if tblConsider == "1":
|
if tblConsider == "1":
|
||||||
infoMsg += "s like"
|
infoMsg += "s like"
|
||||||
|
@ -262,6 +265,9 @@ class Search:
|
||||||
|
|
||||||
if tblConsider == "2":
|
if tblConsider == "2":
|
||||||
continue
|
continue
|
||||||
|
else:
|
||||||
|
for db in conf.db.split(","):
|
||||||
|
foundTbls[db] = []
|
||||||
else:
|
else:
|
||||||
dbName = "SQLite" if Backend.isDbms(DBMS.SQLITE) else "Firebird"
|
dbName = "SQLite" if Backend.isDbms(DBMS.SQLITE) else "Firebird"
|
||||||
foundTbls["%s%s" % (dbName, METADB_SUFFIX)] = []
|
foundTbls["%s%s" % (dbName, METADB_SUFFIX)] = []
|
||||||
|
@ -364,6 +370,7 @@ class Search:
|
||||||
colConsider, colCondParam = self.likeOrExact("column")
|
colConsider, colCondParam = self.likeOrExact("column")
|
||||||
|
|
||||||
for column in colList:
|
for column in colList:
|
||||||
|
values = []
|
||||||
column = safeSQLIdentificatorNaming(column)
|
column = safeSQLIdentificatorNaming(column)
|
||||||
conf.db = origDb
|
conf.db = origDb
|
||||||
conf.tbl = origTbl
|
conf.tbl = origTbl
|
||||||
|
@ -449,7 +456,7 @@ class Search:
|
||||||
|
|
||||||
kb.data.cachedColumns = {}
|
kb.data.cachedColumns = {}
|
||||||
|
|
||||||
if len(dbs) == 0 and isInferenceAvailable() and not conf.direct:
|
if not values and isInferenceAvailable() and not conf.direct:
|
||||||
if not conf.db:
|
if not conf.db:
|
||||||
infoMsg = "fetching number of databases with tables containing column"
|
infoMsg = "fetching number of databases with tables containing column"
|
||||||
if colConsider == "1":
|
if colConsider == "1":
|
||||||
|
|
Loading…
Reference in New Issue
Block a user