mirror of
https://github.com/sqlmapproject/sqlmap.git
synced 2025-02-03 13:14:13 +03:00
bug fix so that if search fails with union/error and blind techniques are available, it falls back to them (like any other enumeration switch) and minor bug fix so that in search mode, the provided table name to search is upped
This commit is contained in:
parent
11413a0f03
commit
edb977a74e
|
@ -91,7 +91,8 @@ class Search:
|
|||
for value in values:
|
||||
value = safeSQLIdentificatorNaming(value)
|
||||
foundDbs.append(value)
|
||||
else:
|
||||
|
||||
if len(foundDbs) == 0 and isInferenceAvailable() and not conf.direct:
|
||||
infoMsg = "fetching number of database"
|
||||
if dbConsider == "1":
|
||||
infoMsg += "s like"
|
||||
|
@ -166,7 +167,7 @@ class Search:
|
|||
for tbl in tblList:
|
||||
tbl = safeSQLIdentificatorNaming(tbl, True)
|
||||
|
||||
if Backend.getIdentifiedDbms() in (DBMS.ORACLE, DBMS.DB2):
|
||||
if Backend.getIdentifiedDbms() in (DBMS.ORACLE, DBMS.DB2, DBMS.FIREBIRD):
|
||||
tbl = tbl.upper()
|
||||
|
||||
infoMsg = "searching table"
|
||||
|
@ -194,7 +195,7 @@ class Search:
|
|||
query += whereDbsQuery
|
||||
values = inject.getValue(query, blind=False, time=False)
|
||||
|
||||
if Backend.getIdentifiedDbms() in (DBMS.SQLITE, DBMS.FIREBIRD):
|
||||
if values and Backend.getIdentifiedDbms() in (DBMS.SQLITE, DBMS.FIREBIRD):
|
||||
newValues = []
|
||||
|
||||
if isinstance(values, basestring):
|
||||
|
@ -216,7 +217,8 @@ class Search:
|
|||
foundTbls[foundDb].append(foundTbl)
|
||||
else:
|
||||
foundTbls[foundDb] = [foundTbl]
|
||||
else:
|
||||
|
||||
if len(foundTbls) == 0 and isInferenceAvailable() and not conf.direct:
|
||||
if Backend.getIdentifiedDbms() not in (DBMS.SQLITE, DBMS.FIREBIRD):
|
||||
infoMsg = "fetching number of databases with table"
|
||||
if tblConsider == "1":
|
||||
|
@ -445,7 +447,8 @@ class Search:
|
|||
foundCols[column][db] = [tbl]
|
||||
|
||||
kb.data.cachedColumns = {}
|
||||
else:
|
||||
|
||||
if len(dbs) == 0 and isInferenceAvailable() and not conf.direct:
|
||||
if not conf.db:
|
||||
infoMsg = "fetching number of databases with tables containing column"
|
||||
if colConsider == "1":
|
||||
|
|
Loading…
Reference in New Issue
Block a user