BUU第一题,老实说第一次做的时候手足无措。
0x00
题目类型:php代码审计,文件包含。
0x01
点开链接,开门见山就是一个大大的滑稽。
查看源代码,注释中提醒有source.php文件。访问source.php,看到源码。
<?php
highlight_file(__FILE__);
class emmm
{
public static function checkFile(&$page)
{
$whitelist = ["source"=>"source.php","hint"=>"hint.php"];
if (! isset($page) || !is_string($page)) {
echo "you can't see it";
return false;
}
if (in_array($page, $whitelist)) {
return true;
}
$_page = mb_substr(
$page,
0,
mb_strpos($page . '?', '?')
);
if (