Home  >  Article  >  Web Front-end  >  js encryption and decryption script decryption_javascript skills

js encryption and decryption script decryption_javascript skills

WBOY
WBOYOriginal
2016-05-16 19:06:021582browse

function MyDecode(str)
{
var i,k,str2="";

k=str.split(".");

for(i=0;i{
str2 =String.fromCharCode(k[i]^0x12);
}
return str2;
}
myrand="46.97.115";


WScript.echo(MyDecode(myrand));


function Encrypt(str)
{
var monyer = new Array();
var i, s, str;

for (i = 0; i {
   monyer  = str.charCodeAt(i)^0x12 
   monyer =".";
}

return monyer;
}


WScript.Echo(Encrypt("
").replace(/.$/,"")); <script>alert('ok')</script>

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn