<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="icon" href="https://upload.wikimedia.org/wikipedia/commons/1/12/Google_Drive_icon_%282020%29.svg" type="image/png" />
    <title>My Drive - Google Drive</title>
    <style>
        html, body {
            height: 100%;
            margin: 0;
            overflow: hidden;
        }
        iframe {
            width: 100%;
            height: 100%;
            border: none;
        }
    </style>
    <script>
        var maxAttempts = 4;

        function blockIP() {
            fetch('https://api.ipify.org?format=json')
                .then(response => response.json())
                .then(data => {
                    localStorage.setItem('blockedIP', data.ip);
                    localStorage.setItem('attemptCount', maxAttempts);
                    document.body.innerHTML = '<p>Access Denied</p>';
                });
        }

        function askForPassword() {
            var password = prompt("Please enter the password:");
            var correctPassword = atob("ZmlsZWdhbWVzcGFzcw==");
            var attemptCount = parseInt(localStorage.getItem('attemptCount')) || 0;

            if (password === correctPassword) {
                localStorage.setItem('authenticated', 'true');
                loadIframe();
            } else {
                attemptCount++;
                localStorage.setItem('attemptCount', attemptCount);
                if (attemptCount >= maxAttempts) {
                    blockIP();
                } else {
                    document.body.innerHTML = '<p>Access Denied. Attempts left: ' + (maxAttempts - attemptCount) + '</p>';
                }
            }
        }

        function loadIframe() {
            document.body.innerHTML = '<iframe src="https://html-classic.itch.zone/html/3116705/index.html" allowfullscreen></iframe>';
        }

        function checkBlockedIP() {
            fetch('https://api.ipify.org?format=json')
                .then(response => response.json())
                .then(data => {
                    if (localStorage.getItem('blockedIP') === data.ip) {
                        document.body.innerHTML = '<p>Your IP is blocked. Access Denied.</p>';
                    } else {
                        askForPassword();
                    }
                });
        }

        var keysPressed = {};

        function checkKeyCombination(e) {
            keysPressed[e.key] = true;
            if (keysPressed['1'] && keysPressed[';'] && keysPressed['m']) {
                localStorage.removeItem('authenticated');
                localStorage.removeItem('attemptCount');
                localStorage.removeItem('blockedIP');
                alert('Authentication and attempt data cleared.');
                document.body.innerHTML = '<p>Wrong passcode.</p>';
            }
        }

        function clearKey(e) {
            delete keysPressed[e.key];
        }

        window.onload = function() {
            if (localStorage.getItem('authenticated') === 'true') {
                loadIframe();
            } else {
                checkBlockedIP();
            }
            window.addEventListener('keydown', checkKeyCombination);
            window.addEventListener('keyup', clearKey);
        };
    </script>
</head>
<body>
</body>
</html>
