Execute a remote command
(self, cmd)
| 334 | yield "".join(r_out), "".join(r_err), rcode |
| 335 | |
| 336 | def exec_cmd(self, cmd): |
| 337 | """ |
| 338 | Execute a remote command |
| 339 | """ |
| 340 | cmd = self._cmd_str(cmd) |
| 341 | |
| 342 | logmsg = f"Executing command: {cmd}" |
| 343 | if self.passwd: |
| 344 | logmsg = logmsg.replace(self.passwd, ("*" * 6)) |
| 345 | if 'decode("base64")' in logmsg or "base64.b64decode(" in logmsg: |
| 346 | log.debug("Executed SHIM command. Command logged to TRACE") |
| 347 | log.trace(logmsg) |
| 348 | else: |
| 349 | log.debug(logmsg) |
| 350 | |
| 351 | ret = self._run_cmd(cmd) |
| 352 | return ret |
| 353 | |
| 354 | def send(self, local, remote, makedirs=False): |
| 355 | """ |