Advanced Mission 1

PHP Sucks

Bypass PHP checks:

<?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();
?>

By using == compare, PHP will not check type of variables. So pass this challenge by submit 0e0 because 0e0 = 0000 (haha)

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s