A little further down in the source for the page you will find <script src="/static/js/main.js"></script>, and following that link to http://silkeborgkommune.dk/static/js/main.js you will find the definition of the SetEmailLink function:

function SetEmailLink(id, linkCiphers, textChipers, key) { var link = ""; var text = ""; for (var i = 0; i < linkCiphers.length; i++) { var linkChar = linkCiphers[i] - key[i % key.length]; link += String.fromCharCode(linkChar); } for (var j = 0; j < textChipers.length; j++) { var textChar = textChipers[j] - key[j % key.length]; text += String.fromCharCode(textChar); } var element = jQuery("#" + id); if (element.is("a")) { if (text != "") { element.html(text); } if (link != "") { element.attr("href", link); } } }

It looks like a pretty straightforward cypher to re-implement in Perl. Figure out what that is doing, and you will be a step closer to automating the deobfuscation of the email address, as well as closer to violating the presumed intent of hiding the email address in cypher form.

Here's the relevant part, rewritten in Perl:

sub SetEmailLink { my ( undef, $linkCiphers, undef, $key ) = @_; my $link = q(); for( my $i = 0; $i != @$linkCiphers; ++$i ) { my $linkChar = $linkCiphers->[$i] - $key->[$i % @$key]; $link .= chr($linkChar); } return $link; }; print SetEmailLink('phmain_1_phrightcontent_0_lnkEmail', [113,104,125, +164,118,187,87,149,128,146,184,114,53,138,161,112,176,146,143,76,160, +188,112,114,121,154,113,190,132,80,112,152], [], [4,7,20,56,2,76,29,3 +4,12,45,83])

Note, there's also an illegal character embedded between "146" and ",184" which you will need to deal with. After removing that, here is the (partially obscured) output:

mailto:st###.vind##@silk#####.d#

Which goes to show, attempting to obscure the target of mailto: links is an inferior approach compared to server-side alternatives.


Dave


In reply to Re^3: Email - jquery by davido
in thread Email - jquery by bib

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.