diff --git a/lib/core/common.py b/lib/core/common.py index 097b7c864..1ae589399 100644 --- a/lib/core/common.py +++ b/lib/core/common.py @@ -1374,9 +1374,9 @@ def safeStringFormat(format_, params): retVal = format_.replace("%d", "%s") if isinstance(params, basestring): - retVal = retVal.replace("%s", params) + retVal = retVal.replace("%s", params, 1) elif not isListLike(params): - retVal = retVal.replace("%s", str(params)) + retVal = retVal.replace("%s", str(params), 1) else: count, index = 0, 0 while index != -1: diff --git a/plugins/generic/search.py b/plugins/generic/search.py index 942057cde..6c9bdffbc 100644 --- a/plugins/generic/search.py +++ b/plugins/generic/search.py @@ -314,7 +314,7 @@ class Search: query = agent.limitQuery(index, query) foundTbl = unArrayizeValue(inject.getValue(query, union=False, error=False)) - if not isNoneValue(foundTbls[db]): + if not isNoneValue(foundTbl): kb.hintValue = foundTbl foundTbl = safeSQLIdentificatorNaming(foundTbl, True) foundTbls[db].append(foundTbl)