WMCTF2020

web

web_checkin

源码

<?php
//PHP 7.0.33 Apache/2.4.25
error_reporting(0);
$sandbox = '/var/www/html/' . md5($_SERVER['REMOTE_ADDR']);
@mkdir($sandbox);
@chdir($sandbox);
highlight_file(__FILE__);
if(isset($_GET['content'])) {
    
    
    $content = $_GET['content'];
    if(preg_match('/iconv|UCS|UTF|rot|quoted|base64/i',$content))
         die('hacker');
    if(file_exists($content))
        require_once($content);
    file_put_contents($content,'<?php exit();'.$content);
}

直接/flag就出来了,估计是最开始出题人师傅也没想到有人直接/flag试试把, 所以才有了web_checkin2 吧(猜测)在这里插入图片描述
payload

?content=/flag

其他的一直没等到复现 以后在来补把

猜你喜欢

转载自blog.csdn.net/qq_42158602/article/details/107752291