LFI绕过数组方法?

时间:2017-10-01 07:15:36

标签: php file-inclusion

    <?php


    $v1 = array('delete.txt', 'undelete.txt');

    $filename = @$_GET['getfile'];

    if(isset($filename)) 
    {

    if (in_array($filename, $v1))
    {   
     include($filename);
    }

    else
    {
        include("index.php");
    }

    }


    ?>
    <html>
    <body>
    <title>
    Hack me</title>
    <link href="style.css" rel="stylesheet" type="text/css"/>

    <style>body {
        background-color: #C0C0C0;
    }
    </style>

    <table align="right"><td><a href="/dashboard/demoapp.php"><font size="5">Home</font></a></td></table>

    <img src="/dashboard/demo.jpg" width="500" height="100"><br><br><br>




</body>

    </html>

是否可以在LFI中绕过此过滤器?

我在这里做了什么,我创建了一个数组,在那个数组中,我只允许两个文件。如果in_array()没有找到它,它将包含另一个。

那么它仍然脆弱吗?

0 个答案:

没有答案
相关问题