email-obfuscator


I dont know how the spammer's email harvesters work.

But I guess that they spider the website and use regexp to find out 'blabla@blabla.tld'.

If this is the case, the regexp to gather blabla-at-blabla-dot-tld is not a lot harder do.

So I came in with this for my wiliki based wiki.

 (define (email->javascript email) 
   (let ((estr (string-join (map (lambda (c)  
                        (number->string (char->integer c))) 
                                 (string->list email)) ","))) 
     (string-append  
      "<script type=\"text/javascript\">\ndocument.write(String.fromCharCode(60,97,32,104,114,101,102,61,34,109,97,105,108,116,111,58," estr ",34,62," estr ",60,47,97,62))\n</script>"))) 

This will transform a email into a bit of javascript writing out the email.

The wiliki macro version:

 (define-reader-macro (mailto mail) 
   (let ((estr (string-join (map (lambda (c)  
                                   (number->string (char->integer c))) 
                                 (string->list mail)) ","))) 
     `((script (@ (type "text/javascript")) 
               ,(string-append  
                "document.write(String.fromCharCode(60,97,32,104,114,101,102,61,34,109,97,105,108,116,111,58," estr ",34,62," estr ",60,47,97,62))\n"))))) 

Is it a good idea or am I underestimating the spammers bots?

-yesod