小标
2019-04-03
来源 :
阅读 3532
评论 0
摘要:本文主要向大家介绍了PHP语言学习之[php代码审计] php://filter,通过具体的内容向大家展示,希望对大家学习php语言有所帮助。
本文主要向大家介绍了PHP语言学习之[php代码审计] php://filter,通过具体的内容向大家展示,希望对大家学习php语言有所帮助。
![PHP语言学习之[php代码审计] php://filter](http://iotekimg.zhizuobiao.com/zzb/190403135435/0288.jpg)
筛选过滤应用:
1、 字符串过滤器:
string.rot13 对字符串执行ROT13转换
string.toupper转换为大写
string.tolower 转换为小写
string.strip_tags去除html和php标记
2、 转换过滤器:
convert.base64-encode & convert.base64-decode :base64编码/解码
convert.quoted-printable-encode & convert.quoted-printable-decode:将 quoted-printable 字符串转换为 8-bit 字符串
3、 压缩过滤器:
zlib.deflate和 zlib.inflate
bzip2.compress和 bzip2.decompress
4、 加密过滤器:
mcrypt.tripledes和mdecrypt.tripledes等
readfile("php://filter/read=string.toupper/resource=//www.example.com");//将www.example.com中的内容转换为大写后输出
file_put_contents("php://filter/write=string.rot13/resource=example.txt","Hello World");//将字符串”hello world”经过rot13编码后写入example.txt
例子:
url:
/index.php?a=php://filter/read=convert.base64-encode/resource=index2.php
index.php:
<?php
include($_GET[‘a‘]);
?>
本文由职坐标整理并发布,希望对同学们有所帮助。了解更多详情请关注职坐标编程语言PHP频道!
喜欢 | 0
不喜欢 | 0
您输入的评论内容中包含违禁敏感词
我知道了

请输入正确的手机号码
请输入正确的验证码
您今天的短信下发次数太多了,明天再试试吧!
我们会在第一时间安排职业规划师联系您!
您也可以联系我们的职业规划师咨询:
版权所有 职坐标-一站式AI+学习就业服务平台 沪ICP备13042190号-4
上海海同信息科技有限公司 Copyright ©2015 www.zhizuobiao.com,All Rights Reserved.
沪公网安备 31011502005948号