Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <!-- Hackit Begins -->
- Aufgabe:
- <br><div class=quote style="width:75%;">
- <center><form name=login>
- <table border=1 cellpadding=3>
- <tr><td colspan=2 align=center>
- <font size="+2"><b>Members-Only Area!</b></font><br>
- Versuchen Sie sich als Benutzer Zero-Cool einzuloggen
- </td></tr>
- <tr><td>Username:</td><td><select name=memlist class=inputbox>
- <option value='x'>
- <option value='Sally|51896|FOVWLOOX'>Sally
- <option value='zerocool|21811|HWJJLKQL'>zerocool
- </select></td></tr>
- <tr><td>Password:</td><td><input type=password size=10 maxlength=8 name=pass class=inputbox></td></tr>
- <tr><td colspan=2 align=center><input type=button value="Login" onclick="check(this.form)" class=button></td>
- </tr>
- </table>
- </form>
- <SCRIPT LANGUAGE="JavaScript">
- <!-- Begin
- var params=new Array(4);
- var alpha="ABCDEFGHIJKLMNOPQRSTUVWXYZABCDEFGHI";
- function check(form) {
- which=form.memlist.selectedIndex;
- choice = form.memlist.options[which].value+"|";
- if (choice=="x|") {
- alert("Please Select Your Name From The List");
- return;
- }
- p=0;
- for (i=0;i<3;i++) {
- a=choice.indexOf("|",p);
- params[i]=choice.substring(a,p);
- p=a+1;
- }
- h1=makehash(form.pass.value,3);
- h2=makehash(form.pass.value,10)+" ";
- if (h1!=params[1]) {
- alert("Incorrect Password!"); return; };
- var page="";
- for (var i=0;i<8;i++) {
- letter=params[2].substring(i,i+1)
- ul=letter.toUpperCase();
- a=alpha.indexOf(ul,0);
- a-=(h2.substring(i,i+1)*1);
- if (a<0) a+=26;
- page+=alpha.substring(a,a+1); };
- top.location=page.toLowerCase()+".html";
- }
- function makehash(pw,mult) {
- pass=pw.toUpperCase();
- hash=0;
- for (i=0;i<8;i++) {
- letter=pass.substring(i,i+1);
- c=alpha.indexOf(letter,0)+1;
- hash=hash*mult+c;
- }
- return(hash);
- }
- // End -->
- </script>
- </center>
- </div>
- <!-- //Hackit Ends -->
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement