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

Skip to content

Commit f848f25

Browse files
committed
upper() -D value for certain DBMSes
1 parent f1534a1 commit f848f25

1 file changed

Lines changed: 7 additions & 0 deletions

File tree

lib/techniques/brute/use.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ def _addPageTextWords():
5050
def tableExists(tableFile, regex=None):
5151
result = inject.checkBooleanExpression("%s" % safeStringFormat(BRUTE_TABLE_EXISTS_TEMPLATE, (randomInt(1), randomStr())))
5252

53+
if conf.db and Backend.getIdentifiedDbms() in (DBMS.ORACLE, DBMS.DB2):
54+
conf.db = conf.db.upper()
55+
5356
if result:
5457
errMsg = "can't use table existence check because of detected invalid results "
5558
errMsg += "(most probably caused by inability of the used injection "
@@ -141,7 +144,11 @@ def columnExists(columnFile, regex=None):
141144
errMsg = "missing table parameter"
142145
raise SqlmapMissingMandatoryOptionException(errMsg)
143146

147+
if conf.db and Backend.getIdentifiedDbms() in (DBMS.ORACLE, DBMS.DB2):
148+
conf.db = conf.db.upper()
149+
144150
result = inject.checkBooleanExpression(safeStringFormat(BRUTE_COLUMN_EXISTS_TEMPLATE, (randomStr(), randomStr())))
151+
145152
if result:
146153
errMsg = "can't use column existence check because of detected invalid results "
147154
errMsg += "(most probably caused by inability of the used injection "

0 commit comments

Comments
 (0)