50一个CTF的入门级别的题,都没人能做吗?

-该目录下还有一个flag.php文件,但是是不可见的PHP
,希望有接触CTF的人解答,解决即采纳


代码如下
<?php
 
class Setting
{
    public $find;
    function __construct($b) {
        $this->find = $b;
    }
    function __call($name,$arguments)
    {
        echo "WWW".PHP_EOL;
        ($this->find)();
    }
}
 
class Middle
{
    public $follow;
    function __destruct()
    {
        echo $this->follow."Hello World\n";
        if(preg_match("/cat|nl|tac|system|passthru|flag|\\|\`|bin|sh|\.\./i", $this->follow)) {
            echo "hacker".PHP_EOL;
            $this->follow = "index.php";
        }
    }
    function __invoke()
    {
        $this->follow->hackme();
    }
}
 
class Code {
    public $ClassObj;
    function __construct($m) {
        $this->ClassObj = $m;
    }
 
    function __toString()
    {
        $this->ClassObj->action1();
    }
}
 
class Common {
 
    public function createPut($file = null,$tpl=null){
        $file = $this->cacheFile;
        $tpl = $this->temp;
        file_put_contents($file,$tpl);
    }
    function action() {
        echo "just pop";
    }
}
 
class Flag
{
    public function output()
    {
        $this->tilte = 'ComeOn';
        $this->content = 'Cat the Flag!!!'.PHP_EOL;
        echo $this->tilte." ".$this->content;
    }
    public $a;
    public $b;
 
    public function hackme()
    {
        $this->output();
        $a=$this->b;
        $a('',$this->a);
    }
}
 
if(isset($_GET['pop'])) {
    unserialize($_GET['pop']);
} else {
    highlight_file(__FILE__);
}
?>
看不懂这个
```php
 
 public function hackme()
    {
        $this->output();
        $a=$this->b;
        $a('',$this->a);
    }

你标记的那段应该是要构造创造函数,进行命令执行