通过Unicode转义序列来加密,按你说的可以算是混淆吧
(编辑:jimmy 日期: 2025/5/13 浏览:3 次 )
<script>
test = "我来加个密玩玩,虽然是垃圾别见怪啊!"
str = ""
for( i=0; i<test.length; i++ )
{
temp = test.charCodeAt(i).toString(16);
str += "\\u"+ new Array(5-String(temp).length).join("0") +temp;
}
document.write (str)
</script>
test = "我来加个密玩玩,虽然是垃圾别见怪啊!"
str = ""
for( i=0; i<test.length; i++ )
{
temp = test.charCodeAt(i).toString(16);
str += "\\u"+ new Array(5-String(temp).length).join("0") +temp;
}
document.write (str)
</script>
下一篇:JS脚本混淆、加密讨论第1/2页