28 lines
1.1 KiB
Python
28 lines
1.1 KiB
Python
#!/usr/bin/env python3
|
|
import paramiko
|
|
|
|
PASS = "Bbt9115xty9176!"
|
|
users = ["root", "localadministrator", "admin", "ubuntu"]
|
|
for user in users:
|
|
print(f"\n=== trying {user}@10.10.0.11 ===")
|
|
c = paramiko.SSHClient()
|
|
c.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
|
try:
|
|
c.connect("10.10.0.11", username=user, password=PASS, timeout=15)
|
|
print("CONNECTED as", user)
|
|
for cmd in [
|
|
"hostname",
|
|
"ss -tlnp | grep ':80 ' || true",
|
|
"curl -sSI -H 'Host: thepinkpulse.com' http://127.0.0.1/ | head -8",
|
|
"curl -sSI -H 'Host: exposedgays.com' http://127.0.0.1/ | head -8",
|
|
"docker ps --format '{{.Names}}' | head -20",
|
|
"ls /etc/nginx/sites-enabled 2>/dev/null || ls /etc/caddy 2>/dev/null || ls /etc/traefik 2>/dev/null || echo no_proxy_dir",
|
|
]:
|
|
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")[:2000])
|
|
c.close()
|
|
break
|
|
except Exception as ex:
|
|
print("failed:", ex) |