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.
Here are two external tools mentioned. For both you need to generate your Javascript code first with your email.
JavaScript eMail Encrypter
ANTI-SPAM EMAIL LINK OBFUSCATOR
This tool was originally conceived and written by Tim Williams of The University of Arizona. The code to randomly
generate a different encryption key each time the tool is used was written by Andrew Moulden.
Ross Killen of Celtic Productions Ltd has also created a PHP version to enable use of this technique in web applications.
This code is distributed as freeware, provided the authors’ credits etc remain exactly as shown.