diff --git a/plugins/dbms/firebird/enumeration.py b/plugins/dbms/firebird/enumeration.py
index 1f7fc8cab..0d49a9028 100644
--- a/plugins/dbms/firebird/enumeration.py
+++ b/plugins/dbms/firebird/enumeration.py
@@ -30,22 +30,12 @@ class Enumeration(GenericEnumeration):
return []
- def searchTable(self):
- warnMsg = "on Firebird searching of tables is not implemented"
- logger.warn(warnMsg)
-
- return []
-
def searchColumn(self):
warnMsg = "on Firebird searching of columns is not implemented"
logger.warn(warnMsg)
return []
- def search(self):
- warnMsg = "on Firebird search option is not available"
- logger.warn(warnMsg)
-
def getHostname(self):
warnMsg = "on Firebird it is not possible to enumerate the hostname"
logger.warn(warnMsg)
diff --git a/plugins/generic/search.py b/plugins/generic/search.py
index e4d6a89e6..69364d8f2 100644
--- a/plugins/generic/search.py
+++ b/plugins/generic/search.py
@@ -194,13 +194,14 @@ class Search:
query += whereDbsQuery
values = inject.getValue(query, blind=False, time=False)
- if Backend.isDbms(DBMS.SQLITE):
+ if Backend.getIdentifiedDbms() in (DBMS.SQLITE, DBMS.FIREBIRD):
newValues = []
if isinstance(values, basestring):
values = [values]
for value in values:
- newValues.append(["SQLite%s" % METADB_SUFFIX, value])
+ dbName = "SQLite" if Backend.isDbms(DBMS.SQLITE) else "Firebird"
+ newValues.append(["%s%s" % (dbName, METADB_SUFFIX), value])
values = newValues
@@ -216,7 +217,7 @@ class Search:
else:
foundTbls[foundDb] = [foundTbl]
else:
- if not Backend.isDbms(DBMS.SQLITE):
+ if Backend.getIdentifiedDbms() not in (DBMS.SQLITE, DBMS.FIREBIRD):
infoMsg = "fetching number of databases with table"
if tblConsider == "1":
infoMsg += "s like"
@@ -259,7 +260,8 @@ class Search:
if tblConsider == "2":
continue
else:
- foundTbls["SQLite%s" % METADB_SUFFIX] = []
+ dbName = "SQLite" if Backend.isDbms(DBMS.SQLITE) else "Firebird"
+ foundTbls["%s%s" % (dbName, METADB_SUFFIX)] = []
for db in foundTbls.keys():
db = safeSQLIdentificatorNaming(db)
@@ -271,7 +273,7 @@ class Search:
logger.info(infoMsg)
query = rootQuery.blind.count2
- if not Backend.isDbms(DBMS.SQLITE):
+ if Backend.getIdentifiedDbms() not in (DBMS.SQLITE, DBMS.FIREBIRD):
query = query % unsafeSQLIdentificatorNaming(db)
query += " AND %s" % tblQuery
count = inject.getValue(query, union=False, error=False, expected=EXPECTED.INT, charsetType=CHARSET_TYPE.DIGITS)
@@ -290,10 +292,17 @@ class Search:
for index in indexRange:
query = rootQuery.blind.query2
- if not Backend.isDbms(DBMS.SQLITE):
+
+ if Backend.isDbms(DBMS.FIREBIRD):
+ query = query % index
+
+ if Backend.getIdentifiedDbms() not in (DBMS.SQLITE, DBMS.FIREBIRD):
query = query % unsafeSQLIdentificatorNaming(db)
+
query += " AND %s" % tblQuery
- query = agent.limitQuery(index, query)
+
+ if not Backend.isDbms(DBMS.FIREBIRD):
+ query = agent.limitQuery(index, query)
foundTbl = unArrayizeValue(inject.getValue(query, union=False, error=False))
kb.hintValue = foundTbl
diff --git a/xml/queries.xml b/xml/queries.xml
index 63c5983dd..83fdc416f 100644
--- a/xml/queries.xml
+++ b/xml/queries.xml
@@ -431,17 +431,19 @@
-
+
+
+
+
+
-
-