import paramiko

HOST = "135.125.102.180"
USER = "ubuntu"
PASS = "BotPascal2026!"

def main():
    try:
        ssh = paramiko.SSHClient()
        ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
        ssh.connect(HOST, username=USER, password=PASS)
        
        print("🔍 Checking PHP processes...")
        stdin, stdout, stderr = ssh.exec_command("pgrep -af php")
        print(stdout.read().decode())
        
        print("🔍 Checking Lock File...")
        stdin, stdout, stderr = ssh.exec_command("ls -la /tmp/scan_loop.lock")
        print(stdout.read().decode())
        print(stderr.read().decode())
        
        print("🔍 Checking scan_loop.php log manually (if any output captured)...")
        # Since nohup redirects to /dev/null, we can't see it.
        # But let's try to run it manually to see if it starts.
        
        ssh.close()
    except Exception as e:
        print(f"❌ Error: {e}")

if __name__ == "__main__":
    main()
