When we enter this challenge, it will prompt a window and asked us to input our name. After doing so, it will show us a welcome banner in the bottom of the web page.
We can start on it now!
Solution:
- Like always we start on viewing the source code of the web page first.
- It will prompt a alert window like below. Just throw it away.
- Find the forms about the username and password in the source code.
<form name="form1" action="javascript:memCheck()"> <br><br><br><br><br><br><br><br><br> <img src="back1.gif"> <table bgcolor=#505060 cellpadding="4" cellspacing="1" style="font-family=verdana; color=#FFAA00; font-size=12pt; border=solid 3px black; position=absolute; top=240; left=20"> <tr> <td bgcolor=#A0A09B> Username: </td> <td> <input type="text" name="username" style="border-top=solid 2px BLACK; border-bottom=solid 2px BLACK; border-right=solid 1px BLACK; border-left=solid 2px BLACK; background=#A0A09B"></td> </tr> </form>
<form name="form2" action="javascript:memCheck()">
<tr> <td bgcolor=#A0A0B0> Password: </td> <td><input type="password" name="passwrd" style="border-top=solid 2px BLACK; border-bottom=solid 2px BLACK; border-right=solid 1px BLACK; border-left=solid 2px BLACK; background=#A0A0B0"></td> <td> <input type="button" name="logBtn" value="Log On" onClick="memCheck()" class="stlBtn" onMouseOver="document.form2.logBtn.style.background='#A0A0B0'" onMouseOut="document.form2.logBtn.style.background='black'"> </td> </tr> </table> </form>
- Now, we know that there is a Javascript function named "memCheck" and it will check the validation of our input username and password.
- Where is it? Check the Javascript files which linked in the HTML header part.
<script language="JavaScript" src="new_user.js"></script> <script language="JavaScript" src="functions.js"></script>
- In function.js file, you will find the details of memCheck function.
function memCheck()
{ var usr=document.form1.username.value; var pas=document.form2.passwrd.value; var user=usr.toLowerCase(); var pass=pas.toLowerCase(); for (i=0; i<mem.length; i++) { var memU= mem[i].toLowerCase(); var splt= memU.split("^"); if (user==splt[0] && pass==splt[1]) { window.open(splt[2]); } } } function openMenu(menuName, state) { if (navigator.appName=="Microsoft Internet Explorer") { document.all[menuName].style.visibility= state; } else { document[menuName].visibility = state; } } window.defaultStatus="Nighthawks Password ";
- In new_user.js file, you will find the username, password and the successful link.
mem = new Array() mem[0] = "youfoundit^yourinnow^youfoundityourinnow.html";
- Input the username and password. Well done!
No comments:
Post a Comment