file_get_contents

题目代码:

<?php
    $url = $_GET['url'];
    $html = file_get_contents($url);
    if($html=='aaa'){
        echo 'flag{*******}';
    }else{
        echo 'fail!';
    }
?>

方法一:

访问http://localhost/3.php?url=data:text/html,aaa

成功获取flag!

 

方法二:

利用php://input

 

posted @ 2015-11-05 14:17  sky钦  阅读(158)  评论(0)    收藏  举报