Saturday 17 October 2015

Solution: CanYouHackIt - Script Challenge 1

Leave a Comment

It was fun doing logic challenges.. Now, we have advanced onto our next section, Script Challenges..
It is like clearing a stage in a video game and advancing to the next level.. :D

Site: CanYouHackIt (http://canyouhack.it/)
Challenge: Script > Script Challenge 1 > An Easy Start


Let's see, it is showing a javascript and we need to figure out the password.. This is a real world scenario.. Javascript is a client side scripting language which is normally used to perform a few actions based on user's action, like getting the fields of a submitted form to verify whether they match the requirements or not and much more.. There are many usecases in which javascript can be used, but some people used to use javascript to compare the password entered by the user.. This is like hardcoding the password in the script.

Above script shows the same.. Notice below line in the script:

if($('#password').val() == "javascript")

We can easily see that script is comparing the value entered by user with the hardcoded value "javascript" .. So that's our cue.. That's our password.


If You Enjoyed This, Take 5 Seconds To Share It

0 comments:

Post a Comment