起名字真难

<?php
 function noother_says_correct($number)
{
        $one = ord('1');
        $nine = ord('9');
        for ($i = 0; $i < strlen($number); $i++)
        {   
                $digit = ord($number{$i});
                if ( ($digit >= $one) && ($digit <= $nine) )
                {
                        return false;
                }
        }
           return $number == '54975581388';
}
$flag='*******';
if(noother_says_correct($_GET['key']))
    echo $flag;
else 
    echo 'access denied';
?>

ord() 函数返回字符串的首个字符的 ASCII 值。
这里既让54975581388与key相等
又要不想等所以让我们换一下进制54975581388==0xccccccccc

The flag is:nctf{follow_your_dream}




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