新建一个 php 文件:a.php
<?php
$a = "a.txt";
include("php://filter/resource=" . $a);
在同一目录下新建一个文件:a.txt(内容为 <?php phpinfo();?> 的 base64 编码)
PD9waHAgcGhwaW5mbygpOz8+
在对应文件的相关函数下个断点:

【资料】
贴一下关键代码:
php_stream * php_stream_url_wrap_php(php_stream_wrapper *wrapper, const char *path, const char *mode, int options,
zend_string **opened_path, php_stream_context *context STREAMS_DC) /* {
{
{ */
{
...
if (!strncasecmp(path, "php://", 6)) {
}
if (!strncasecmp(path, "temp", 4)) {
}
if (!strcasecmp(path, "memory")) {
}
if (!strcasecmp(path, "output")) {
}
if (!

最低0.47元/天 解锁文章
3519

被折叠的 条评论
为什么被折叠?



