Main 5 – Solution

This level is special, because unlike the previous ‘username’ and ‘password’ forms, we have a JavaScript alert that prompts us for the password.

If we click cancel, we are shown a picture of a cat.

If we inspect this image, it doesn’t appear to be anything special. However, nearby there is a <script> tag running the prompt. Looking at the following code, we can see that it is checking “if” the prompt receives a value of “9286jas”.

var pass;
pass=prompt("Password","");
if (pass=="9286jas") {
    window.location.href="/levels/main/5?pass=9286jas";
}

Refreshing the page to get the prompt to run again, and then entering the password yields a correct result.

Previous: Main 4Next: Main 6