使用内联JavaScript加密mailto电子邮件地址 [英] Encrypt mailto email addresses with inline JavaScript

查看:148
本文介绍了使用内联JavaScript加密mailto电子邮件地址的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我有以下JavaScript代码:

 < script type ='text / javascript'> 
var v2 =xxxxx;
var v7 = unescape(%2%3432jklsjdkls%);
var v5 = v2.length;
var v1 =; (var v4 = 0; v4 v1 + = String.fromCharCode(v2.charCodeAt(v4)^ v7.charCodeAt(v4));

}
document.write('< a href =javascript:void(0)onclick =window.location = \'mail\\\to\\\:'+ v1 +'? = '+' \ '> '+' 试验()试验(点)的COM< \ / A>');
< / script>

这段代码在一行,我没有其他的可能性。现在我必须更改电子邮件地址,但是我需要我不能创建的 v2 v7 / p>

你知道这个片段来自哪里?你知道另一种安全的算法(不仅仅取ASCI值)吗?这里使用ASCII码,XOR连线和加密值+键。

解决方案


I have the following JavaScript code:

<script type='text/javascript'>
    var v2="xxxxx";
    var v7=unescape("%2%3432jklsjdkls%");
    var v5=v2.length;
    var v1="";
    for(var v4=0;v4<v5;v4++){
        v1+=String.fromCharCode(v2.charCodeAt(v4)^v7.charCodeAt(v4));
    }
    document.write('<a href="javascript:void(0)" onclick="window.location=\'mail\u0074o\u003a'+v1+'?subject='+'\'">'+'test(at)test(dot)com<\/a>');
 </script>

This code is on one line and I have no other possibility than this. Now I have to change the email address, but I need the v2 and v7 which I can't create.

Do you know where this snippet comes from? Do you know another algorithm which is secure (not only taking the ASCI values)? Here the ASCII codes, a XOR catenation and the encrypted value + key are used.

解决方案

这篇关于使用内联JavaScript加密mailto电子邮件地址的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆