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

Skip to content

Commit 0128153

Browse files
committed
minor bug fix to ignore provided -D when brute-forcing columns/tables names and the DBMS is either Access, Firebird or SQLite
1 parent c83f468 commit 0128153

1 file changed

Lines changed: 4 additions & 2 deletions

File tree

lib/techniques/brute/use.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ def _addPageTextWords():
4949

5050
def tableExists(tableFile, regex=None):
5151
result = inject.checkBooleanExpression("%s" % safeStringFormat(BRUTE_TABLE_EXISTS_TEMPLATE, (randomInt(1), randomStr())))
52+
5253
if result:
5354
errMsg = "can't use table existence check because of detected invalid results "
5455
errMsg += "(most probably caused by inability of the used injection "
@@ -82,7 +83,7 @@ def tableExistsThread():
8283
kb.locks.count.release()
8384
break
8485

85-
if conf.db and METADB_SUFFIX not in conf.db:
86+
if conf.db and METADB_SUFFIX not in conf.db and Backend.getIdentifiedDbms() not in (DBMS.SQLITE, DBMS.ACCESS, DBMS.FIREBIRD):
8687
fullTableName = "%s%s%s" % (conf.db, '..' if Backend.getIdentifiedDbms() in (DBMS.MSSQL, DBMS.SYBASE) else '.', table)
8788
else:
8889
fullTableName = table
@@ -155,7 +156,8 @@ def columnExists(columnFile, regex=None):
155156
columns = filterListValue(columns, regex)
156157

157158
table = safeSQLIdentificatorNaming(conf.tbl, True)
158-
if conf.db and METADB_SUFFIX not in conf.db:
159+
160+
if conf.db and METADB_SUFFIX not in conf.db and Backend.getIdentifiedDbms() not in (DBMS.SQLITE, DBMS.ACCESS, DBMS.FIREBIRD):
159161
table = "%s.%s" % (safeSQLIdentificatorNaming(conf.db), table)
160162

161163
kb.threadContinue = True

0 commit comments

Comments
 (0)