The forum of the forums
Would you like to react to this message? Create an account in a few clicks or log in to continue.

security password pop up coding

Go down

Solved security password pop up coding

Post by voorm 8/9/2012, 23:08

Hello.
For begining i must say I'm low in coding.
I noticed that its posible to add security pass.I tryed by myself(using http://www.zubrag.com/tools/html-password-protector-encoder.php)but after cancel or ok on empty,i can see what i should not see.
(after entering into forum geting pop up pass,see picture)

security password pop up coding Untitl10

Here's code what i used:
<script language="JavaScript1.2">
<!--


function get_password() {
orig_pass = prompt("Please enter security password","");
if (orig_pass!=null && orig_pass!="")
password = new Array(orig_pass.length);
for(i=0; i<orig_pass.length; i++) {
password[i] = orig_pass.charCodeAt(i);
}
return password;
}

password = get_password();
orig = unescape("http%3A//theblackleague.forumotion.bz/");
orig = orig.split("");

passnum = orig.length % password.length;
for(i=orig.length-1; i>=0; i--) {

passnum--;
if (passnum == -1) passnum = password.length - 1;

pos1 = i;
pos2 = i + password[passnum];

if (pos2 >= orig.length) continue;

char1 = orig[pos1];
char2 = orig[pos2];

orig[pos2] = char1;
orig[pos1] = char2;

}

orig1 = "";
for(i=0;i<orig.length;i++) {
orig1 = orig1 + orig[i];
}
orig1 = orig1.replace(/mmm/g,"\r\n");

document.write(orig1);

//-->

</script>
<noscript>JavaScript must be enabled in your browse in order to see protected page.</noscript>

I hope for some help,where i do wrong,what i need do(how to make to after typing wrong code user can see nothing)



Last edited by voorm on 9/9/2012, 00:39; edited 1 time in total
avatar
voorm
New Member

Posts : 2
Reputation : 1
Language : english

Back to top Go down

Solved Re: security password pop up coding

Post by voorm 9/9/2012, 00:34

Yes,It is it.
Tnx for good reply.
avatar
voorm
New Member

Posts : 2
Reputation : 1
Language : english

Back to top Go down

Back to top


 
Permissions in this forum:
You cannot reply to topics in this forum