Sindbad~EG File Manager

Current Path : /opt/nginxhttpd_/etc/openresty_config/error_page/
Upload File :
Current File : //opt/nginxhttpd_/etc/openresty_config/error_page/challenge.html

<!DOCTYPE HTML>
<html lang="en-US">
<head>
    <meta charset="UTF-8" />
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=Edge,chrome=1" />
    <meta name="robots" content="noindex, nofollow" />
    <meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1" />
    <link id="favicon" rel="shortcut icon" type="image/svg+xml" href="https://o2swit.ch/assets/favicon.svg"/>
    <link href="https://o2swit.ch/assets/style.css" rel="stylesheet">
    <title>Test de sécurité / Security check...</title>
    <meta http-equiv="refresh" content="300">
</head>
<body>
<table width="100%" height="100%">
    <tr>
        <td></td>
    </tr>
    <tr>
        <td align="center" valign="middle">
            <div class="o2s-browser-check">
                <noscript>
                    <h1 style="color:#fd7e14;">
                        Veuillez activer JavaScript puis recharger cette page.<br/>
                        Please turn JavaScript on and reload the page.<br/>
                    </h1>
                </noscript>

                <div id="o2s-content">
                    <h1 style="margin-top:0.1em;" data-i18n-key="title">Security check</h1>
                    <p data-i18n-key="lead">
                        Sorry, we need to verify that this request is legitimate and is not sent by an automated
                        system (robot).<br/>
                        <span class="additionnal-part">This verification process is automatic. Your browser will <strong>redirect you in a few seconds</strong>.</span>
                    </p>
                </div>

                <div id="loader-animation" class="lds-ellipsis"><div></div><div></div><div></div><div></div></div>

                <form id="js-chl-form" method="POST" enctype="application/x-www-form-urlencoded" action="/o2s-cgi/security-challenge?a=verify-response">
                    <input type="hidden" id="js-chl-type" name="chl-type" value="" />
                    <input type="hidden" id="js-chl-hash" name="chl-hash" value="" />
                    <input type="hidden" id="js-current-url" name="chl-current-url" value="" />
                    <input type="hidden" id="js-chl-response" name="js-chl-response" value="" />
                    <input type="hidden" id="js-chl-id" name="js-chl-id" value="" />
                    #captchaDiv
                </form>
            </div>

            <div>
                <img id="img" width="250" src="https://o2swit.ch/assets/tiger.svg" />
                <br/><br/>
                <div>
                    <small>
                        <a href="https://www.o2switch.fr" target="_blank">o2switch.fr</a>
                        -
                        <a href="https://faq.o2switch.fr/hebergement-mutualise/tutoriels-cpanel/tiger-protect">Tiger Protect WAF</a>
                    </small>
                    <br />
                    <small style="font-size: 10px;" id="request-id"></small>
                </div>
            </div>
        </td>
    </tr>
</table>

#captchaProviderJsInclusion

<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.1/jquery.min.js" integrity="sha512-aVKKRRi/Q/YV+4mjoKBsE4x3H+BkegoM/em46NNlCqNTmUYADjBbeNefNxYV7giUp0VxICtqdrbqU7iVaeZNXA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/crypto-js/4.1.1/crypto-js.min.js" integrity="sha512-E8QSvWZ0eCLGk4km3hxSsNmGWbLtSCSUcewDQPQWZF6pEU8GlT8a5fF32wOl1i8ftdMhssTrF/OhyGWwonTcXA==" crossorigin="anonymous" referrerpolicy="no-referrer"></script>

<script type="text/javascript">
    $(document).ready(function() {
        const supportedLocales = ["en", "fr"];
        const translations = {
            "en": {
                "title": "Security check",
                "lead": `Sorry, we need to verify that this request is legitimate and is not sent by an automated
                        system (robot).<br/>
                        <span class="additionnal-part">This verification process is automatic. Your browser will 
                            <strong>redirect you in a few seconds</strong>.<span>`,
            },
            "fr": {
                "title": 'Test de sécurité',
                "lead": `Désolé, nous devons vérifier que cette requête est légitime et n'est pas envoyée par un système
                        automatisé (robot). <br/> 
                        <span class="additionnal-part">Ce processus de vérification est automatique. Votre navigateur 
                            va vous <strong>rediriger dans quelques secondes</strong>.</span>`,
            },
        };
        function browserLocales(languageCodeOnly = false) {
            return navigator.languages.map((locale) =>
                languageCodeOnly ? locale.split("-")[0] : locale,
            );
        }
        function isSupported(locale) {
            return supportedLocales.indexOf(locale) > -1;
        }
        function supportedOrDefault(locales) {
            return locales.find(isSupported) || 'en';
        }
        const locale = supportedOrDefault(browserLocales(true));

        document.querySelectorAll("[data-i18n-key]").forEach(function(element) {
                const key = element.getAttribute("data-i18n-key");
                const translation = translations[locale][key];
                element.innerHTML = translation;
            }
        );

        const captchaKey = "#captchaKey";
        const captchaProvider = "#captchaProvider";
        const challengeType = "#chlType";
        const currentUrl = window.location.href;
        const challengeHash = '#hashValue';
        const requestId = '#requestId';

        $('#js-chl-hash').val(challengeHash); 
        $('#js-chl-type').val(challengeType); 
        $('#js-current-url').val(currentUrl);
        $('#request-id').val(requestId);
    
        if(challengeType === 'js'){
            var data = {
                'chl-type': challengeType,
                'chl-hash': challengeHash
            };

            $.ajax({
                type: "POST",
                url: "/o2s-cgi/security-challenge?a=get-chl",
                data: data,
                dataType: 'json',
                success: function(data){
                    if(data.success !== true){
                        errorAndRefresh();
                        return;
                    }

                    var f = new Function(data.payload);
                    f();
                },
                error: function(jqXHR, textStatus, err){
                    errorAndRefresh(err);
                }
            });
            return;
        }

        if(challengeType === 'captcha' && captchaProvider === 'hcaptcha'){
            $('.additionnal-part').remove();
            setTimeout(function(){
                hcaptcha.execute();
            }, 1000);
            return;
        }

        if(challengeType === 'captcha' && captchaProvider === 'recaptcha'){
            $('#loader-animation').fadeOut();
            $('.additionnal-part').remove();
            return;
        }

        if(challengeType === 'captcha' && captchaProvider === 'friendlycaptcha'){
            $('#loader-animation').fadeOut();
            $('.additionnal-part').remove();
            return;
        }

        errorAndRefresh();
    });

    function onHcaptchaSubmit(token){
        $('#js-chl-response').val(token); 
        $('#js-chl-form').attr('action', $('#js-chl-form').attr('action').replace('verify-response', 'verify-captcha-response'));
        $('#js-chl-form').submit();
    }

    function onRecaptchaSubmit(token){
        $('#js-chl-response').val(token); 
        $('#js-chl-form').attr('action', $('#js-chl-form').attr('action').replace('verify-response', 'verify-captcha-response'));
        $('#js-chl-form').submit();
    }

    function onFriendlyCaptchaSubmit(token){
        $('#js-chl-response').val(token); 
        $('#js-chl-form').attr('action', $('#js-chl-form').attr('action').replace('verify-response', 'verify-captcha-response'));
        $('#js-chl-form').submit();
    }

    function errorAndRefresh(err){
        if(err !== null){
            alert("Une erreur est survenue - An error occurred");
        } else {
            alert(err);
        }
        setTimeout(function(){location.reload();}, 1000);        
    }
</script>
</body>
</html>

Sindbad File Manager Version 1.0, Coded By Sindbad EG ~ The Terrorists