| 84 | return safechardecode(retVal) |
| 85 | |
| 86 | def runCmd(self, cmd): |
| 87 | choice = None |
| 88 | |
| 89 | if not self.alwaysRetrieveCmdOutput: |
| 90 | message = "do you want to retrieve the command standard " |
| 91 | message += "output? [Y/n/a] " |
| 92 | choice = readInput(message, default='Y').upper() |
| 93 | |
| 94 | if choice == 'A': |
| 95 | self.alwaysRetrieveCmdOutput = True |
| 96 | |
| 97 | if choice == 'Y' or self.alwaysRetrieveCmdOutput: |
| 98 | output = self.evalCmd(cmd) |
| 99 | |
| 100 | if output: |
| 101 | conf.dumper.string("command standard output", output) |
| 102 | else: |
| 103 | dataToStdout("No output\n") |
| 104 | else: |
| 105 | self.execCmd(cmd) |
| 106 | |
| 107 | def shell(self): |
| 108 | if self.webBackdoorUrl and (not isStackingAvailable() or kb.udfFail): |