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

Skip to content

Commit d71e51e

Browse files
committed
Minor improvement
1 parent 4741874 commit d71e51e

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

plugins/dbms/mysql/fingerprint.py

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ def checkDbms(self):
211211
kb.dbmsVersion = [">= 5.0.38", "< 5.1.2"]
212212
elif inject.checkBooleanExpression("%s=(SELECT %s FROM DUAL)" % (randInt, randInt)):
213213
kb.dbmsVersion = [">= 5.0.11", "< 5.0.38"]
214-
elif inject.getValue("SELECT DATABASE() LIKE SCHEMA()", suppressOutput=True):
214+
elif inject.checkBooleanExpression("DATABASE() LIKE SCHEMA()"):
215215
kb.dbmsVersion = [">= 5.0.2", "< 5.0.11"]
216216
else:
217217
kb.dbmsVersion = [">= 5.0.0", "<= 5.0.1"]
@@ -264,9 +264,7 @@ def checkDbmsOs(self, detailed=False):
264264
infoMsg = "fingerprinting the back-end DBMS operating system"
265265
logger.info(infoMsg)
266266

267-
datadirSubstr = inject.getValue("SELECT MID(@@datadir, 1, 1)", unpack=False, suppressOutput=True)
268-
269-
if datadirSubstr == "/":
267+
if inject.checkBooleanExpression("'/'=(SELECT MID(@@datadir, 1, 1))"):
270268
kb.os = "Linux"
271269
else:
272270
kb.os = "Windows"

0 commit comments

Comments
 (0)