Warning: Parameter 1 to wp_default_scripts() expected to be a reference, value given in /home/vhosts/lagon.eu5.org/wp-includes/plugin.php on line 571

Warning: Parameter 1 to wp_default_styles() expected to be a reference, value given in /home/vhosts/lagon.eu5.org/wp-includes/plugin.php on line 571
A Funny Challenge About Pass a PHP Script 返回顶部

A Funny Challenge About Pass a PHP Script

112015
A Funny Challenge About Pass a PHP Script

I got a funny challenge from securityoverride.org’s Advanced Level 1.

The challenge is a section of PHP Script.

Following is the script:


 

 <?php
                $input = trim(getUserInput());
                if(
                    str_split($input) == array(0,0,0,0) ||
                    strcmp($input, “0000”) == 0 ||
                    strcmp($input, “000”) == 0 ||
                    strcmp($input, “00”) == 0 ||
                    strcmp($input, “0”) == 0 ||
                    $input === 0 ||
                    preg_match(“/^[\d]{1,}$/D”, $input)
                )fail_advanced_1();
               
                if($input == “0000”) complete_advanced_1();
   ?>


After a long time thinking,I found that a different equation”$input === 0“,which means Strict comparisons!!!!

So we just need to input “-0″(negative 0)to pass the script!

 

PHP type comparisons

 

发表评论

电子邮件地址不会被公开。 必填项已用*标注

您可以使用这些HTML标签和属性: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

 
Free Web Hosting