Force the back-end DBMS option.
()
| 713 | conf.technique = _ |
| 714 | |
| 715 | def _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 | |
| 746 | def _listTamperingFunctions(): |
| 747 | """ |
no test coverage detected
searching dependent graphs…