MOON
Server: Apache
System: Linux server1.studioinfinity.com.br 2.6.32-954.3.5.lve1.4.90.el6.x86_64 #1 SMP Tue Feb 21 12:26:30 UTC 2023 x86_64
User: artinside (517)
PHP: 7.4.33
Disabled: exec,passthru,shell_exec,system
Upload Files
File: //usr/local/lib/php/test/PHP_Archive/tests/planet_php/default_phar.php
<?php
if ($_SERVER['PATH_INFO'] == '/images.php' || $_SERVER['PATH_INFO'] == '/image.php') {
    $file_info = pathinfo($_GET['file']);
    switch (strtolower($file_info['extension'])) {
        case 'jpg':
        case 'jpeg':
            $mimetype = 'image/jpeg';
            break;
        case 'gif':
            $mimetype = 'image/gif';
            break;
        case 'png':
            $mimetype = 'image/png';
            break;
        default:
            exit;
    }
    
    header('Content-Type: ' .$mimetype);
    include 'phar://images/' . $_GET['file'];
    exit;
}


if (isset($_SERVER['PATH_INFO'])) {
    require_once 'phar:/' .$_SERVER['PATH_INFO'];
} else {
    require_once 'phar://index.htm';
}

?>