MCPcopy Create free account
hub / github.com/sqlmapproject/sqlmap / checkDbmsOs

Method checkDbmsOs

plugins/dbms/mysql/fingerprint.py:322–342  ·  view source on GitHub ↗
(self, detailed=False)

Source from the content-addressed store, hash-verified

320 return False
321
322 def checkDbmsOs(self, detailed=False):
323 if Backend.getOs():
324 return
325
326 infoMsg = "fingerprinting the back-end DBMS operating system"
327 logger.info(infoMsg)
328
329 result = inject.checkBooleanExpression("'W'=UPPER(MID(@@version_compile_os,1,1))")
330
331 if result:
332 Backend.setOs(OS.WINDOWS)
333 elif not result:
334 Backend.setOs(OS.LINUX)
335
336 if Backend.getOs():
337 infoMsg = "the back-end DBMS operating system is %s" % Backend.getOs()
338 logger.info(infoMsg)
339 else:
340 self.userChooseDbmsOs()
341
342 self.cleanup(onlyFileTbl=True)

Callers

nothing calls this directly

Calls 5

userChooseDbmsOsMethod · 0.95
infoMethod · 0.80
setOsMethod · 0.80
cleanupMethod · 0.80
getOsMethod · 0.45

Tested by

no test coverage detected