题目
<?php
error_reporting(0);
class SYCLOVER {
public $syc;
public $lover;
public function __wakeup(){
if( ($this->syc != $this->lover) && (md5($this->syc) === md5($this->lover)) && (sha1($this->syc)=== sha1($this->lover)) ){
if(!preg_match("/\<\?php|\(|\)|\"|\'/", $this->syc, $match)){
eval($this->syc);
} else {
die("Try Hard !!");
}
}
}
}
if (isset($_GET['great'])){
unserialize($_GET['great']);
} else {
highlight_file(__FILE__);
}
?>
思路
-
使用
Exceptionclass 或Errorclass绕过第一步的hash比较 -
include后面接变量名时, 不需要括号或引号
注意两个Exception对象写在同一行, 否则_toString后包含行号, hash的结果不同。
EXP
<?php
class SYCLOVER {
极客大挑战2020 greatphp解题思路

最低0.47元/天 解锁文章
1601

被折叠的 条评论
为什么被折叠?



