Good non-intrusive anti-spam email obfuscator?

▼魔方 西西 提交于 2019-11-30 08:55:23

I've used HiveLogic Enkoder in the past with pretty good success. If anything you might want to take a look at how Dan's encoding works as it might give you some ideas to make an even more robust obfuscator.

If you really want to protect email adresses there will be no other way then generating images for non-JavaScript users.
I used to use something like this:

<script type="text/javascript">
//<![CDATA[
     scrambler('c.arb@oof||mo');
//]]>
</script>
<noscript>
    <img src="scrambler.php?t=c.arb@oof||mo" alt="Emailadresse" />
</noscript>

scramble is a very simple JavaScript function, I think you easily could figure out what it does. (It will result in: <a href="mailto:foo@bar.com">foo@bar.com</a>) scrambler.php is the same, except in php and a gd backend to generate images.

Figure something out that is not about some encodingtricks or replacing something by something else.

EDIT: Here is my algo:

function scrambler (text) {
  parts = text.split("||");
  var reverse = function (s) {
    var ret ='';
    for (var i=s.length-1;i>=0;i--)
      ret+=s.charAt(i);
    return ret;
  }
  text = reverse(parts[0])+reverse(parts[1]);
  document.write(text);
}

I have used this generator http://www.wbwip.com/wbw/emailencoder.html service for awhile and it works great. I usually use parts of the encoded address and part that are not.

For example ...

user@po.com == &#117;&#115;&#101;&#114;&#064;&#112;&#111;&#046;&#099;&#111;&#109;

I might change to...

user@po.com == u&#115;&#101;&#114;&#064;&#112;&#111;&#046;&#099;&#111;m

Burkhard

One way to obfuscate the email for a computer would be to write the email as an image and not as text. This way it is still easy for a human to read the email adress and quite hard for a computer.

As stated by Steve Gilham it is not that hard to get the email with OCR. And text only browsers don't support them. Thus, Scott's solution is probably the best solution.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!