Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 10 additions & 1 deletion shuffle-tools/1.2.0/src/app.py
Original file line number Diff line number Diff line change
Expand Up @@ -2632,10 +2632,19 @@ def run_ssh_command(self, host, port, user_name, private_key_file_id, password,

try:
stdin, stdout, stderr = ssh_client.exec_command(str(command))
try:
errorLog = stderr.read().decode(errors='ignore')
except Exception as e:
errorLog = f"Failed to read stderr {e}"
try:
output = stdout.read().decode(errors='ignore')
except Exception as e:
output = f"Failed to read stdout {e}"

except Exception as e:
return {"success":"false","message":str(e)}

return {"success":"true","output": stdout.read().decode(errors='ignore')}
return {"success":"true","output": output, "error_logs": errorLog}

def cleanup_ioc_data(self, input_data):
# Remove unecessary parts like { and }, quotes etc
Expand Down
Loading