看它一直在相同的时间刷新,那就抓包看看
一个date,还有参数,应该是在func上选择函数,p选择函数参数,试一试file_get_contents函数,p上输入index.php。
<?php
$disable_fun = array("exec","shell_exec","system","passthru","proc_open","show_source","phpinfo","popen","dl","eval","proc_terminate","touch","escapeshellcmd","escapeshellarg"
,"assert","substr_replace","call_user_func_array","call_user_func","array_filter", "array_walk", "array_map","registregister_shutdown_function","register_tick_function","filter_var",
"filter_var_array", "uasort", "uksort", "array_reduce","array_walk", "array_walk_recursive","pcntl_exec","fopen","fwrite","file_put_contents");
function gettime($func, $p) {
$result = call_user_func($func, $p);
$a= gettype($result);
if ($a == "string") {
return $result;
} else {return "";}
}
class Test {
var $p = "Y-m-d h:i:s a";
var $func = "date";
function __destruct() {
if ($this->func != "") {
echo gettime($this->func, $this->p);
}
}
}
$func = $_REQUEST["func"];
$p = $_REQUEST["p"];
if ($func != null) {
$func = strtolower($func);
if (!in_array($func,$disable_fun)) {
echo gettime($func, $p);
}else {
die("Hacker...");
}
}
?>
call_user_func函数是一种调用函数的方式
gettype() 函数用于获取变量的类型。
func中不能含有disable_fun变量里的字符
今天学到一个,有类,没有过滤unserialize函数,所以可以用这个
看根目录没有flag文件,这里不知道了,一个一个看太累,就看wp,说用find / -name flag*
find +目录 +条件 +条件值
可以用读取文件的函数来读取flag,比如file_get_contents,readfile,highlight_file等函数