25 lines
857 B
Python
25 lines
857 B
Python
import paramiko
|
|
|
|
client = paramiko.SSHClient()
|
|
client.set_missing_host_key_policy(paramiko.AutoAddPolicy())
|
|
client.connect('152.136.232.83', port=22, username='root', password='Jianhua105', timeout=10)
|
|
|
|
def run(cmd):
|
|
print(f"\n>>> {cmd[:120]}")
|
|
stdin, stdout, stderr = client.exec_command(cmd, timeout=15)
|
|
out = stdout.read().decode('utf-8', errors='replace').strip()
|
|
if out: print(out[-600:])
|
|
return out
|
|
|
|
# Check admin page
|
|
run("ls /www/wwwroot/ipzhinengti/public/ 2>/dev/null | head -20")
|
|
run("grep -n 'cloud_beauty\\|CONFIG\\|system_config' /www/wwwroot/ipzhinengti/public/admin.html 2>/dev/null | head -20")
|
|
|
|
# Check the admin page location
|
|
run("grep -rn 'admin' /www/wwwroot/ipzhinengti/server.js | head -10")
|
|
|
|
# Check db path
|
|
run("grep -n 'sqlite\\|database\\|db.*=' /www/wwwroot/ipzhinengti/server.js | head -10")
|
|
|
|
client.close()
|