MCPcopy Index your code
hub / github.com/sqlmapproject/sqlmap / _setDBMS

Function _setDBMS

lib/core/option.py:715–744  ·  view source on GitHub ↗

Force the back-end DBMS option.

()

Source from the content-addressed store, hash-verified

713 conf.technique = _
714
715def _setDBMS():
716 """
717 Force the back-end DBMS option.
718 """
719
720 if not conf.dbms:
721 return
722
723 debugMsg = "forcing back-end DBMS to user defined value"
724 logger.debug(debugMsg)
725
726 conf.dbms = conf.dbms.lower()
727 regex = re.search(r"%s ([\d\.]+)" % ("(%s)" % "|".join(SUPPORTED_DBMS)), conf.dbms, re.I)
728
729 if regex:
730 conf.dbms = regex.group(1)
731 Backend.setVersion(regex.group(2))
732
733 if conf.dbms not in SUPPORTED_DBMS:
734 errMsg = "you provided an unsupported back-end database management "
735 errMsg += "system. Supported DBMSes are as follows: %s. " % ', '.join(sorted((_ for _ in (list(DBMS_DICT) + getPublicTypeMembers(FORK, True))), key=str.lower))
736 errMsg += "If you do not know the back-end DBMS, do not provide "
737 errMsg += "it and sqlmap will fingerprint it for you."
738 raise SqlmapUnsupportedDBMSException(errMsg)
739
740 for dbms, aliases in DBMS_ALIASES:
741 if conf.dbms in aliases:
742 conf.dbms = dbms
743
744 break
745
746def _listTamperingFunctions():
747 """

Callers 2

initTargetEnvFunction · 0.90
initFunction · 0.85

Calls 5

getPublicTypeMembersFunction · 0.90
debugMethod · 0.80
setVersionMethod · 0.80
searchMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…