Check and set the DBMS authentication credentials to run statements as another user, not the session user
()
| 530 | logger.warning(warnMsg) |
| 531 | |
| 532 | def _setDBMSAuthentication(): |
| 533 | """ |
| 534 | Check and set the DBMS authentication credentials to run statements as |
| 535 | another user, not the session user |
| 536 | """ |
| 537 | |
| 538 | if not conf.dbmsCred: |
| 539 | return |
| 540 | |
| 541 | debugMsg = "setting the DBMS authentication credentials" |
| 542 | logger.debug(debugMsg) |
| 543 | |
| 544 | match = re.search(r"^(.+?):(.*?)$", conf.dbmsCred) |
| 545 | |
| 546 | if not match: |
| 547 | errMsg = "DBMS authentication credentials value must be in format " |
| 548 | errMsg += "username:password" |
| 549 | raise SqlmapSyntaxException(errMsg) |
| 550 | |
| 551 | conf.dbmsUsername = match.group(1) |
| 552 | conf.dbmsPassword = match.group(2) |
| 553 | |
| 554 | def _setMetasploit(): |
| 555 | if not conf.osPwn and not conf.osSmb and not conf.osBof: |
no test coverage detected
searching dependent graphs…