19 lines
743 B
Python
19 lines
743 B
Python
#!/usr/bin/env python3
|
|
import paramiko
|
|
|
|
PASS = "Bbt9115xty9176!"
|
|
c = paramiko.SSHClient()
|
|
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
|
c.connect("10.10.0.11", username="localadministrator", password=PASS, timeout=20)
|
|
cmds = [
|
|
"cat /home/localadministrator/mail-proxy/default.conf",
|
|
"cat /home/localadministrator/mail-proxy/start.sh",
|
|
"curl -sSI --max-time 10 -H 'Host: coolify.onsethost.com' http://127.0.0.1/ | head -8",
|
|
"curl -sSL --max-time 10 -H 'Host: coolify.onsethost.com' http://127.0.0.1/ | head -c 200",
|
|
]
|
|
for cmd in cmds:
|
|
print(f"\n=== {cmd} ===")
|
|
_, o, e = c.exec_command(cmd, timeout=30)
|
|
o.channel.recv_exit_status()
|
|
print((o.read() + e.read()).decode(errors="replace")[:6000])
|
|
c.close() |