ctf-试试协议吧(PHP伪协议)

1kesou

关注

阅读 105

2022-02-10

在ctf中经常用到伪协议,其使用的先决条件如下:

  1. allow_url_fopen和allow_url_include都设置为on
  2. 源代码里有include:
    在这里插入图片描述
    常用的伪协议有两种:
    一、php://filter 作用是读取源码
    http://xxxx/index.php?file=php://filter/read=convert.base64-encode/resource=xxx.php
    二、php://input
    可以访问请求的原始数据的只读流, 将post请求中的数据作为PHP代码执行
    在这里插入图片描述

在这里插入图片描述

精彩评论(0)

0 0 举报