什么是网页设计与网站建设,快速网站建设公司,魔云手机建站,重庆网络公司招聘php://filter
php://fiter 中文叫 元器封装#xff0c;咱也不知道为什么这么翻译#xff0c;目前我的理解是可以通过这个玩意对上面提到的php IO流进行处理#xff0c;及现在可以对php的 IO流进行一定操作。
过滤器#xff1a;及通过php://filter 对php 的IO流进行的具体…php://filter
php://fiter 中文叫 元器封装咱也不知道为什么这么翻译目前我的理解是可以通过这个玩意对上面提到的php IO流进行处理及现在可以对php的 IO流进行一定操作。
过滤器及通过php://filter 对php 的IO流进行的具体操作 格式为php://filter / [read|write ] 过滤器 / resource 目标文件 解释对目标文件的IO流的输出流(read)或输入流(write)进行 过滤器的操作处理
过滤器的分类 string filter(字符过滤器)string.rot13 (对字符串执行 ROT13 转换)例php://filter/string.rot13/resourceflag.phpstring.toupper (转大写)例php://filter/string.toupper/resourceflag.phpstring.tolower (转小写)string.strip_tags (去除 HTML 和 PHP 标记尝试返回给定的字符串 str 去除空字符、HTML 和 PHP 标记后的结果)例php://filter/string.strip_tags/resourceflag.php
conversion filter (转换过滤器)convert.base64-encode convert.base64-decode (base64加密 base64解密)例php://filter/convert.base64-encode/resourceflag.phpconvert.quoted-printable-encode convert.quoted-printable-decode(在字符串后加0A,及恢复)compression filter(压缩过滤)zlib.deflate zlib.inflate(压缩 解压)例php://filter/zlib.deflate/resourceflag.php php://filter/zlib.inflate/resourceflag.phpbzip2.compress bzip2.decompress(zip 压缩 解压)encryption filter(加密过滤器)
题目[SWPUCTF 2021 新生赛]include
打开题目发现传一个file发现flag在flag.php中 因为allow_url_include 状态为on可知php伪协议用filter读取flag.php里面的信息
/?filephp://filter/readconvert.base64-encode/resourceflag.php 发现是一段编码base64解密 得到答案