一题反序列化求助
ctf吧
全部回复
仅看楼主
level 1
Akatsuki_T 楼主
<?php
function filter($string) {
$safe = array('system','fopen','fread','file_get_contents','flag');
$safe = '/' . implode('|', $safe) . '/i';
return preg_replace($safe, 'nonono', $string);
}
class PingUtils{
function __call($name,$args){
system("ping -c4 ${args[0]}");
}
}
class Cindy{
var $someone;
var $phone;
function call(){
$this->phone->call($this->someone);
}
}
class Bob{
public $flag=True;
public function __get($a){
if($this->flag){
$cindy = new Cindy();
$cindy->someone = $_REQUEST['someone'];
$cindy->phone = "p50";
#var_dump(filter(serialize($cindy)));
$cindy = unserialize(filter(serialize($cindy)));
$cindy->call($someone);
}else{
echo 'nonono';
}
}
public function __wakeup(){
$this->flag = False;
}
}
class Alice{
public function __destruct(){
echo $this->c->b;
}
}
highlight_file(__FILE__);
@unserialize($_GET['pop']);
2022年07月09日 03点07分 1
level 1
有没有偿
2022年07月09日 03点07分 2
level 1
楼主这题是哪里来的阿
2022年07月16日 05点07分 3
兄弟打着比赛,别问了[滑稽]
2022年07月16日 05点07分
@MRS🔥 这不是上个星期发的吗,这个肯定是出题人,暴打出题人
2022年07月16日 08点07分
1