The ASP.NET Server control that stops your email addresses from being harvested by spam bots.
This is an ASP.NET Server control. It is used to obfuscate email addresses, on web pages, which prevent spam bots from harvesting your email address.
As a webmaster, my Html code is littered with mailto anchor tags, so people can contact me, that look like
<a href="mailto:me@mycompany.com">me@mycompany.com</a>.
I wanted a way to protect my email address to prevent spam bots from harvesting it. Thus I built the Email Address Spoofer control.
Email obfuscation is a technique to jumble your email address, found on your web pages, in a way that spam bots will have a difficult time finding it, reading it, or rendering it.
As a webmaster, I get 1000’s of pieces of spam a day, and most of them come from spam bots. I wanted to alleviate
this spam pressure on my email server and spam filter. So I wrote this server control that I can drop on my ASP.NET pages.
So if I you are a webmaster, feel free to download it from download.aspx
You need to be running the ASP.NET runtime. This is a web framework from Microsoft. More information on the ASP.NET runtime can be found from
www.asp.net
The Spoofer control provides 3 basic levels of obfuscation or encoding types.
They are found below. They also show what the tag
<a href="mailto: test@test.com">test@test.com</a>
looks like under various obfuscation levels.
1. None.
Basically, no obfuscation is provided. I simply included this option,
so you can turn any and all internal obfuscation off. The anchor tag will be rendered like:
<a href="mailto: test@test.com">test@test.com</a>
2. HtmlEncoding
This encoding uses the hexadecimal email address and formats it accordinly.
Most spam bots are designed to recognize the "mailto:" part of the link, and since this is
encoded, it is missed. Here is an example:
<a href="mailto:t
est@test.
com?subje
ct=Commen
ts:" title="my ema
il address"
>test@test.
com</a>
3. JavascriptEncoding
This obfuscation scheme uses javascript to write out the anchor tag. This is the most powerful.
However, it does require that a browser renders javascript. Since most spam bots do not have a
javascript, it is skipped over even more. Here is the anchor tag encoded using javascript.
<script>s='%3C%73%63%72%69%70%74%3E%76%61%72%20%74%2C%73%3D%27%27%3B
%74%3D%22%36%34%36%46%36%33%37%35%36%44%36%35%36%45%37%34%32%45
%37%37%37%32%36%39%37%34%36%35%32%38%32%32%33%43%36%31%32%30%32
%30%36%38%37%32%36%35%36%36%33%44%35%43%32%32%36%44%36%31%36%39%36
%43%37%34%36%46%33%41%37%34%36%35%37%33%37%34%34%30%37%34%36%35%37
%33%37%34%32%45%36%33%36%46%36%44%33%46%37%33%37%35%36%32%36%41%36
%35%36%33%37%34%33%44%34%33%36%46%36%44%36%44%36%35%36%45%37%34%37
%33%33%41%35%43%32%32%32%30%37%34%36%39%37%34%36%43%36%35%33%44%35
%43%32%32%36%44%37%39%32%30%36%35%36%44%36%31%36%39%36%43%32%30%36
%31%36%34%36%34%37%32%36%35%37%33%37%33%35%43%32%32%32%30%32%30%33
%45%37%34%36%35%37%33%37%34%34%30%37%34%36%35%37%33%37%34%32%45%36
%33%36%46%36%44%33%43%32%46%36%31%33%45%32%32%32%39%33%42%22%3B%66
%6F%72%28%69%3D%30%3B%69%3C%74%2E%6C%65%6E%67%74%68%3B%69%2B%3D%32
%29%7B%73%20%2B%3D%20%75%6E%65%73%63%61%70%65%28%27%25%27%2B%74%2E
%73%75%62%73%74%72%28%69%2C%32%29%29%7D%3B%65%76%61%6C%28%73%29%3B
%3C%2F%73%63%72%69%70%74%3E';document.write(unescape(s));</script>
4. Image Option
This 4th option, really isn’t an encoding option, per se, but rather, an image can be outputted to the browser,
instead of text. Along with javascript, it is also clickable. Here is the same anchor tag, except with the ImageOption set to true.
<script>s='%3C%73%63%72%69%70%74%3E%76%61%72%20%74%2C%73%3D%27%27%3B
%74%3D%22%36%34%36%46%36%33%37%35%36%44%36%35%36%45%37%34%32%45%37
%37%37%32%36%39%37%34%36%35%32%38%32%32%33%43%36%31%32%30%32%30%36
%38%37%32%36%35%36%36%33%44%35%43%32%32%36%44%36%31%36%39%36%43%37
%34%36%46%33%41%37%34%36%35%37%33%37%34%34%30%37%34%36%35%37%33%37
%34%32%45%36%33%36%46%36%44%33%46%37%33%37%35%36%32%36%41%36%35%36
%33%37%34%33%44%34%33%36%46%36%44%36%44%36%35%36%45%37%34%37%33%33
%41%35%43%32%32%32%30%37%34%36%39%37%34%36%43%36%35%33%44%35%43%32
%32%36%44%37%39%32%30%36%35%36%44%36%31%36%39%36%43%32%30%36%31%36
%34%36%34%37%32%36%35%37%33%37%33%35%43%32%32%32%30%32%30%33%45%32
%32%32%39%33%42%22%3B%66%6F%72%28%69%3D%30%3B%69%3C%74%2E%6C%65%6E
%67%74%68%3B%69%2B%3D%32%29%7B%73%20%2B%3D%20%75%6E%65%73%63%61%70
%65%28%27%25%27%2B%74%2E%73%75%62%73%74%72%28%69%2C%32%29%29%7D%3B
%65%76%61%6C%28%73%29%3B%3C%2F%73%63%72%69%70%74%3E';document.write
(unescape(s));</script>img src="/SpooferTest/EmailSpooferImage.aspx?dGV4dD10ZXN0JTQ
wdGVzdC5jb20mZm9yZUNvbG9yPWJsYWNrJmJhY2tncm91bmRDb2xvcj13aGl0ZSZmb250U2l6ZT0x
Mg..e(1252)" border=0 /><script>s='%3C%73%63%72%69%70%74%3E%76%61%72%20
%74%2C%73%3D%27%27%3B%74%3D%22%36%34%36%46%36%33%37%35%36%44%36%35
%36%45%37%34%32%45%37%37%37%32%36%39%37%34%36%35%32%38%32%32%33%43
%32%46%36%31%33%45%32%32%32%39%33%42%22%3B%66%6F%72%28%69%3D%30%3B
%69%3C%74%2E%6C%65%6E%67%74%68%3B%69%2B%3D%32%29%7B%73%20%2B%3D%20
%75%6E%65%73%63%61%70%65%28%27%25%27%2B%74%2E%73%75%62%73%74%72%28
%69%2C%32%29%29%7D%3B%65%76%61%6C%28%73%29%3B%3C%2F%73%63%72%69%70
%74%3E';document.write(unescape(s));</script>
All javascript can be decoded. Its a matter of how much time/resources you want to devote to it.
However, in this case, the javascript isn't meant to be difficult to be decoded by humans. It's meant to
be difficult to be decoded by spambots.
That being said, if you see some improvements I could make to the javascript routine, feel free to send them to me.
I’d love to incorporate them into the control. However, please don't send me scripts that is someone else's work.
Please send your original. Thanks!
Nothing. Feel free to use the Spoofer control. All I ask for, is a link back to this site, to spread the word.
I don't have the source available for download. However, if you need it for some special project, you can contact me via my email address found at the bottom of the page, or on the comments.aspx page.