This forum is in archive mode. You will not be able to post new content.

Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Messages - CyberWarrior

Pages: [1]
1
General discussion / Trouble getting past a password form on a website
« on: December 09, 2012, 09:49:29 AM »
So i got this question in a hacking tourney I participated in my school. And this was the only question I couldn't answer ( and therefore I came 2nd) . So I would appreciate your help if you could answer it :P

A website has a password form which you need to get past. The source file of the script of the password form looks something like this:

Code: [Select]
{
        $("#username").css("border", "2px solid red");
        $("#username").css( "background", "#FFFFCC" );
        flag = 1;
    }
    else
    {
        $("#username").css("border", "2px ridge #FFFFFF");
        $("#username").css( "background", "#FFFFFF" );
    }
   
    if(document.getElementById('password').value.length < 1)
    {
        $("#password").css("border", "2px solid red");
        $("#password").css( "background", "#FFFFCC" );
        flag = 1
    }
    else
    {
        $("#password").css("border", "2px ridge #FFFFFF");
        $("#password").css( "background", "#FFFFFF" );
    }
   
    if(flag == 1)
    {
        return false;
    }
    return true;
}

And the password form looks something like this:

<form action="" method="post" onSubmit="return validateLogin();" >
                <table border="0">
                    <tr>
                        <td align="right">
                            <strong>Username<span class="mandatory">*</span> :</strong>
                        </td>
                        <td>
                            <input type="username" name="username" id="username" style="border:2px ridge #FFFFFF" >
                        </td>
                    </tr>
                    <tr>
                        <td align="right">
                            <strong>Password<span class="mandatory">*</span> :</strong>
                        </td>
                        <td>
                            <input type="password" name="password" id="password" style="border:2px ridge #FFFFFF" >
                        </td>
                    </tr>
                    <tr>
                        <td>&nbsp;</td>
                        <td>
                            <input type="submit" value="" name="submit" id="submit" style=" border:0; width:57px; height:19px; background-image:url(images/submit_bg.jpg); background-repeat:no-repeat;" >
                        </td>
                    </tr>
                </table>
            </form>
Help Joe get past the password form.

Reply with the answer as soon as possible. And don't just post it, explain it too so that I can understand. Thanks in advance! :D

Staff Edit
Please use the code tags next time

Pages: [1]


Want to be here? Contact Ande, Factionwars or Kulverstukas on the forum or at IRC.