当前位置:网站首页>[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}
边栏推荐
- Collaborative filtering
- Generics of typescript
- 【艾思软件】微信小程序开发报价方案模版
- B-Tree
- Inheritance of typescript
- C2—Qt实现串口调试助手2021.10.21
- How to use DBA_ hist_ active_ sess_ History analysis database history performance problems
- Node输出方式
- 基于mitmproxy的录制回放接口测试工具
- In the new season, China Super League and Guoan are moving forward amid thorns
猜你喜欢

Byte traffic business experience: realize as soon as possible, sew money bags, and sell all in goods

markdown写作软件:Ulysses v27

AWS device shadow usage

TypeScript类对象的初始化

Must the database primary key be self incremented? What scenarios do not suggest self augmentation?

Node的json解析

Day16QtQLabel2021-10-22

左右两侧垂直带序号的时间轴

Show you how to distinguish several kinds of parallelism

SVG+Canvas粒子动态效果
随机推荐
Module import method of node
文件上传漏洞靶场分析 UPLOAD_LABS
Node的全局安装
In the new season, China Super League and Guoan are moving forward amid thorns
Typescript的继承
微生物 个人笔记 taxonkit
MarkDown高级语法,兼容MarkText
8. get directory function / get file function -dir / -notdir
剑指 Offer 28. 对称的二叉树
论文解读(USIB)《Towards Explanation for Unsupervised Graph-Level Representation Learning》
ACL 2022 | 基于自监督图对齐的多语言知识图谱推理
MarkDown初级语法一文精通,兼容MarkText
两种圆点垂直进度样式
Basic data type and structure data type of TS
2022 high altitude installation, maintenance and removal work license question bank and simulated examination
Canvas球体粒子变幻颜色js特效
工地建设动画网页建设中js特效
Inheritance of typescript
Day12QFile2021-09-27
Leetcode 1108 IP address invalidation [violence] the leetcode path of heroding