NSS [NISACTF 2022]easyssrf
先看题目,给了一个输入框

看这提示就知道不是curl了,先file协议读一下flag,file:///flag

不能直接读flag,读个提示文件file:///fl4g

访问一下

<?php
highlight_file(__FILE__);
error_reporting(0);
$file = $_GET["file"];
if (stristr($file, "file")){
die("你败了.");
}
//flag in /flag
echo file_get_contents($file);
stristr()函数:查找第二个参数在 第一个参数 中的第一次出现,并返回字符串的剩余部分。
这里如果不触发if,那么我传入的file参数就不能有file字符串。
传入php://filter/read=convert.base64-encode/resource=/flag,伪协议读一下

解码得flag

![NSS [GWCTF 2019]枯燥的抽奖](https://img-blog.csdnimg.cn/img_convert/6e6f3634764d4f2616590c1569f66660.png)



![[Java]0.1+0.2不等于0.3 !!一分钱问题与解决方案](https://img-blog.csdnimg.cn/defe1095073c4e9eb44f72a814595203.png)








![NSS [BJDCTF 2020]easy_md5](https://img-blog.csdnimg.cn/img_convert/c00adaef60f1a52ed9a7a48d79bbcd57.png)





