Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <SCRIPT LANGUAGE="JavaScript">
- <!-- Begin
- var symbols = " !\"#$%&'()*+'-./0123456789:;<=>?@ABCDEFGHIJKLMNOPQRSTUVWXYZ[\\]^_`abcdefghijklmnopqrstuvwxyz{|}~";
- function Encode2(pass) {
- Semilla = "PescaoDeth:Killme";
- j = 0;
- b = "";
- for (i = 0; i < pass.length; i++) {
- a = tonum(pass.charAt(i)) ^ tonum(Semilla.charAt(j));
- //alert('__a__: ' + String.fromCharCode(a) + ':' + a);
- b += tochar(a);
- if (j < Semilla.length - 1) {
- j++;
- } else {
- j = 0;
- }
- }
- return(b);
- }
- function Encode(pass) {
- Semilla = "PescaoDeth:Killme";
- j = 0;
- b = "";
- for (i = 0; i < pass.length; i++) {
- a = tonum(pass.charAt(i)) ^ tonum(Semilla.charAt(j));
- //alert('__a__: ' + String.fromCharCode(a) + ':' + a);
- b += tochar(a);
- if (j < Semilla.length - 1) {
- j++;
- } else {
- j = 0;
- }
- }
- //alert(b);
- document.getElementsByName("Input2")[0].value = b;
- if (b == "eRKZV_wSM#r") {
- alert("Perfecto");
- } else {
- //alert("Incorrecto");
- }
- }
- function tonum(charx) {
- var loc;
- loc = symbols.indexOf(charx);
- //alert(String.fromCharCode(32+loc) + ':' + (32+loc) + ':' + symbols[loc]);
- if (loc > -1) {
- return (32 + loc);
- }
- return (0);
- }
- function tochar(num) {
- var loc;
- loc = symbols.charAt(num - 32);
- return loc;
- }
- // End -->
- </script>
- <center><form name="yashira" onsubmit="return false;"><table border=1><tr><td><center>Ingrese el password <input size=200 name=Input onKeyup="Encode(this.form.Input.value)"><p>eRKZV_wSM#r<input size=200 name=Input2><p><input type="button" value="Login" onClick="Encode(this.form.Input.value)"></center><p></td></tr></table></form></center>
Advertisement
Add Comment
Please, Sign In to add comment