Quantcast
Channel: Active questions tagged email - Stack Overflow
Viewing all articles
Browse latest Browse all 29748

Encrypt mailto email addresses with inline JavaScript

$
0
0

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.


Viewing all articles
Browse latest Browse all 29748

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>