B
B
badrbot2019-02-18 20:17:31
JavaScript
badrbot, 2019-02-18 20:17:31

How to decrypt email from html?

I wanted to parse on the site https://www.tootukassa.ee/toopakkumised/taksojuht-... email:
5c6ae852495bf199367918.png
5c6ae86eaf912085903368.png
then I went into the source code and found this, maybe it's somehow connected
5c6ae8a2067ea388146112.png

Answer the question

In order to leave comments, you need to log in

1 answer(s)
S
serginhold, 2019-02-18
@serginhold

https://www.tootukassa.ee/sites/all/themes/tk_theme/js/tkUi.js?pn4jj2

// TODO: decryptEmail should not encrypt!
function decryptEmail(publKey){
    $.each($(".mailSend"), function(index, value) {
        var oldMail = $(this).html();
        var newMail = convertEmail(oldMail, publKey);
        $(this).html(newMail);
        $(this).attr("href", "mailto:" + newMail);
        $(this).removeClass('mailSend');
        $(this).addClass('decryptedMail');
        $(this).show();
    });
}

var convertEmail = function (encyptEmail, publKey) {
    var a = publKey;
    var b = a.split("").sort().join("");
    var c = encyptEmail;
    var d = "";
    for (var e = 0; e < c.length; e++)
        d += b.charAt(a.indexOf(c.charAt(e)));
    return d;
};

decryptEmail("lIdsõ-AP9+öBFJ50ÖCviÜo.wuR1cHÄK7X8Ltp2_b6z3UDmZkfäOÕhgTeyYNqü@jVQSx4aGErWnM");

everything is there, functions, key, decode)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question