(self)
| 66 | self.cleanup(web=web) |
| 67 | |
| 68 | def osShell(self): |
| 69 | if isStackingAvailable() or conf.direct: |
| 70 | web = False |
| 71 | elif not isStackingAvailable() and Backend.isDbms(DBMS.MYSQL): |
| 72 | infoMsg = "going to use a web backdoor for command prompt" |
| 73 | logger.info(infoMsg) |
| 74 | |
| 75 | web = True |
| 76 | else: |
| 77 | errMsg = "unable to prompt for an interactive operating " |
| 78 | errMsg += "system shell via the back-end DBMS because " |
| 79 | errMsg += "stacked queries SQL injection is not supported" |
| 80 | raise SqlmapNotVulnerableException(errMsg) |
| 81 | |
| 82 | self.getRemoteTempPath() |
| 83 | |
| 84 | try: |
| 85 | self.initEnv(web=web) |
| 86 | except SqlmapFilePathException: |
| 87 | if not web and not conf.direct: |
| 88 | infoMsg = "falling back to web backdoor method..." |
| 89 | logger.info(infoMsg) |
| 90 | |
| 91 | web = True |
| 92 | kb.udfFail = True |
| 93 | |
| 94 | self.initEnv(web=web) |
| 95 | else: |
| 96 | raise |
| 97 | |
| 98 | if not web or (web and self.webBackdoorUrl is not None): |
| 99 | self.shell() |
| 100 | |
| 101 | if not conf.osPwn and not conf.cleanup: |
| 102 | self.cleanup(web=web) |
| 103 | |
| 104 | def osPwn(self): |
| 105 | goUdf = False |
no test coverage detected