(self)
| 44 | Abstraction.__init__(self) |
| 45 | |
| 46 | def osCmd(self): |
| 47 | if isStackingAvailable() or conf.direct: |
| 48 | web = False |
| 49 | elif not isStackingAvailable() and Backend.isDbms(DBMS.MYSQL): |
| 50 | infoMsg = "going to use a web backdoor for command execution" |
| 51 | logger.info(infoMsg) |
| 52 | |
| 53 | web = True |
| 54 | else: |
| 55 | errMsg = "unable to execute operating system commands via " |
| 56 | errMsg += "the back-end DBMS" |
| 57 | raise SqlmapNotVulnerableException(errMsg) |
| 58 | |
| 59 | self.getRemoteTempPath() |
| 60 | self.initEnv(web=web) |
| 61 | |
| 62 | if not web or (web and self.webBackdoorUrl is not None): |
| 63 | self.runCmd(conf.osCmd) |
| 64 | |
| 65 | if not conf.osShell and not conf.osPwn and not conf.cleanup: |
| 66 | self.cleanup(web=web) |
| 67 | |
| 68 | def osShell(self): |
| 69 | if isStackingAvailable() or conf.direct: |
no test coverage detected