Jeremy Scharlack's Blog
(not | yet) another blog
Tech
Archives

« New Chevy Ads | Main | We have a winner »

January 13, 2004

E-mail Obsfucation

See that e-mail link on the top right, it should look the same, but it has in fact changed. Spam bots shouldn’t able to harvest that address now. Hopefully that should cut back on spam.

My e-mail isn’t written anywhere in the source code. It is written using javascript. One could just simply have javascript write out the code like this:

<script LANGUAGE="JavaScript">
  user = "jeremy";
  site = "scharlack.com";
  document.write('<a href=\"mailto:' + user + '@' + site + '\">');
  document.write('jeremy &lt;at&gt; scharlack &lt;dot&gt; com<a>');
</script>

But that wouldn’t be paranoid enough. So I found this site which will generate my e-mail address from an encrypted cypher:
<script type="text/javascript" language="javascript">
<!--
// eMail Obfuscator Script 2.1 by Tim Williams - freeware
{
 	coded = "to3owd@5mrk3vkmu.myw"
		cipher = "aZbYcXdWeVfUgThSiRjQkPlOmNnMoLpKqJrIsHtGuFvEwDxCyBzA1234567890"
		shift=coded.length
		link=""
		for (i=0; i<coded.length; i++){
			if (cipher.indexOf(coded.charAt(i))==-1){
				ltr=coded.charAt(i)
				link+=(ltr)
			}
			else {     
				ltr = (cipher.indexOf(coded.charAt(i))-shift+cipher.length) % cipher.length
				link+=(cipher.charAt(ltr))
			}				
    }
			document.write("<a href='mailto:"+link+"'>jeremy &lt;at&gt; scharlack &lt;dot&gt; com</a>")
    }
//-->
</script>
Posted by Jeremy at 11:06 AM | Link | TrackBack (0)


Comments
Post a comment









Remember personal info?






 

Archives

Recent Entries

Links




Powered by
Movable Type 2.63