22 lines
891 B
Python
22 lines
891 B
Python
import paramiko
|
|
import sys
|
|
import io
|
|
|
|
if sys.platform == 'win32':
|
|
sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8', errors='replace')
|
|
sys.stderr = io.TextIOWrapper(sys.stderr.buffer, encoding='utf-8', errors='replace')
|
|
|
|
client = paramiko.SSHClient()
|
|
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
|
client.connect('161.97.93.156', username='carlos', password='Innova1978+*?', timeout=20)
|
|
|
|
print("=== LOGS RECIENTES DE EVOLUTION API ===")
|
|
stdin, stdout, stderr = client.exec_command('docker logs --tail 30 $(docker ps -q --filter "name=evolution" | head -n 1)')
|
|
print(stdout.read().decode('utf-8', errors='replace'))
|
|
|
|
print("=== LOGS RECIENTES DE DRIPZONE ===")
|
|
stdin, stdout, stderr = client.exec_command('docker logs --tail 40 $(docker ps -q --filter "name=bfmnoga3" | head -n 1)')
|
|
print(stdout.read().decode('utf-8', errors='replace'))
|
|
|
|
client.close()
|