/* Decoded by unphp.net */ <?php

error_reporting
(0);
ini_set("display_errors"0);

class 
Jail
{

    function 
filter($var) {
        if(
preg_match('/(\'|\"|`|\.|\$|\/|require|include|exec|passthru|shell_exec|system|proc_open|popen|curl_exec|curl_multi_exec|require|require_once|include|include_once|eval|pcntl_exec|file|create_function|asser|extract|fopen|bzopen|gzopen|construct|chgrp|chmod|chown|copy|lchgrp|lchown|link|rmdir|tempnam|touch|dir|stat|read|hash|md5|sha1|hex|bin|highlight|substr|add|chr|convert|join|ord|trim|spaces|die|exit|call_user_func|reflection|break)/i'$var)) {
                return 
false;
        }
        return 
true;
    }

    public function 
run() {
        echo 
"                 _                                           ";
        echo 
" _ __ ___   ___ | |_       _ __ ___   ___    ___  _ __ __ _  ";
        echo 
"| '__/ _ \ / _ \| __| ___ | '_ ` _ \ / _ \  / _ \| '__/ _` | ";
        echo 
"| | | (_) | (_) | |__|___|| | | | | |  __/_| (_) | | | (_| | ";
        echo 
"|_|  \___/ \___/ \__|     |_| |_| |_|\___(_)\___/|_|  \__, | ";
        echo 
"                                                      |___/  ";
        echo 
"You are in jail ! MOUAHAH !                                  ";
        echo 
"Don't try to escape this one, just go deeper in it.         ";
        echo 
"Flag is in a subdirectory... Good Luck ! =)                  ";
        while(
true){
            echo 
">>> ";
            
$handle fopen ("php://stdin","r");
            
$cmd fgets($handle);
            if(
$cmd != " "){
                if(
$this->filter($cmd)){
                    try {
                        
$cmd substr($cmd0, -1);
                        
$cmd str_replace('__FILE__',"preg_replace('@\(.*\(.*$@', '', __FILE__,1)",$cmd);
                        echo eval(
$cmd.';')." ";
                    } catch (
Throwable $e) {
                        echo 
" ";
                    }
                }
                else{
                    echo 
"NOPE! ";
                }
            }
            else{
                break;
            }
        }
    }
}

(new 
Jail)->run();

?>
?>