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

Method osCmd

plugins/generic/takeover.py:46–66  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

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:

Callers 1

actionFunction · 0.45

Calls 8

isStackingAvailableFunction · 0.90
isDbmsMethod · 0.80
infoMethod · 0.80
getRemoteTempPathMethod · 0.80
initEnvMethod · 0.80
runCmdMethod · 0.80
cleanupMethod · 0.80

Tested by

no test coverage detected