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)
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)
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)
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 September 9th 2012, 12:39 am; edited 1 time in total