Forum Moderators: mack

Message Too Old, No Replies

Hiding e-mail addresses

escape-sequence addies?

         

Amgine

2:57 am on Sep 2, 2003 (gmt 0)

10+ Year Member



I know this is an over-hashed discussion, but haven't heard this one talked about.

I have a snippet which translates e-mail addresses into escape codes. They show in the browser as text, link like text, look like garbage in the source. Will this deek the spiders?

Amgine

txbakers

3:31 am on Sep 2, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



probably. But they're getting very sophisticated.

If they can look for the "@" charachter, they can certainly look for the same character escaped.

auntie

3:06 pm on Sep 2, 2003 (gmt 0)

10+ Year Member



I found an email cloaking program that translates html into unicode. It's very easy to use after it's installed.
Take a look at codewidgets.com

MonkeeSage

4:56 pm on Sep 2, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Here is a fun little way I made:

hideurl.js

function hide(theText) {
var newText = "", n = null;
for (n=0; n < theText.length; ++n) {
newText += theText.charAt(n) + "_";
}
newText = newText.replace(/@/g, "`");
return newText;
}
function unhide(theText) {
theText = theText.replace(/_/g, "");
theText = theText.replace(/\`/g, "@");
theText = theText.replace(/\%60/g, "@");
return theText;
}

hider.htm

<script type="text/javascript" src="hideurl.js"></script>

...
<div>
<input id="txt" type="text" value="" style="display: inline; width: 30%;"/>
<input type="button" value="Code" onclick="document.getElementById('txt').value = hide(document.getElementById('txt').value);"/>
<input type="button" value="Decode" onclick="document.getElementById('txt').value = unhide(document.getElementById('txt').value);"/>
</div>

testfile.htm

<script type="text/javascript" src="hideurl.js"></script>

...
<div>
<a href="mailto:d_o_w_n_i_n_`_f_r_a_g_g_l_e_._r_o_c_" onclick="this.href=unhide(this.href); return true;" onmouseover="window.status=' '; return true;" onmouseout="window.status='';">Cammo. Link</a>
<a href="http://w_w_w_._w_e_b_m_a_s_t_e_r_w_o_r_l_d_._c_o_m_/_" onclick="this.href=unhide(this.href); return true;" onmouseover="window.status=unhide(this.href); return true;" onmouseout="window.status='';">Cammo. Link</a>
</div>

Jordan

Macro

5:09 pm on Sep 2, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



MonkeeSage, it looks interesting but as a javascript dunce I've no idea what it means. Can you shed any light?

MonkeeSage

5:16 pm on Sep 2, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Sure, hideurl.js has two functions, hide and unhide. The hide function takes input (e.g., "bob@bob.com") and inserts an underscore between every character, and turns the "@" into "`". The unhide function reverses the process and spits out the original input ("bob@bob.com").

So using the hider.htm page, you hide the address, then use that output in your link (see testfile.htm); then with the onclick, onmouseover and onmouseout attributes on the link, you use the unhide function to get the original address back and show it in the status bar or else navigate to it when clicked.

Jordan

Macro

5:24 pm on Sep 2, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Aha, sounds very clever. Mind if I try it on our site sometime?

MonkeeSage

5:42 pm on Sep 2, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Not at all. :)

Jordan

moltar

5:44 pm on Sep 2, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I use the following javascript:

function nospam( domain, garbage, user, text ) {
var ToReturn = '';
if ( domain != '' ) {
var HateSpam = user + '&#64;' + domain;
ToReturn = '<a href="mailto:' + HateSpam + '">';
if ( text == undefined ) {
ToReturn = ToReturn + HateSpam;
} else {
ToReturn = ToReturn + text;
}
ToReturn = ToReturn + '</a>';
}
return ToReturn;
}

I saved it in external file so I can reuse it on different pages. I call it in the header of the page. Then in the body I put the following:

<script type="text/javascript" language="javascript">document.write( nospam('domain.com','batman98','user_id') )</script><noscript>user &#65;&#116; domain.com</noscript>

If you want a different anchor text than your email, then just pass another (4th) argument to the function with your custom text.

I also use random field (just in case), there you can write anything you want, it will not affect anything. Just so that "smart" bots get confused there.

MonkeeSage

5:49 pm on Sep 2, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Nice moltar, very clever. :)

Jordan

Amgine

8:06 pm on Sep 2, 2003 (gmt 0)

10+ Year Member



Only one problem - I can't afford to include things I don't understand, and I don't java script. I know, I know... it works, it's great, etc.

Until I get around to js, would my solution work for a large percentage of spiders, or is it a waste of my time? This is for an inline translator, to grab and hide e-mail addresses.

Amgine

MonkeeSage

8:47 pm on Sep 2, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yes, it will work for search engine spiders, but not likely for 'smart' mail harvesters, since the escape codes are standard. I.e., the mail harvester just has to check for a "%" and if it finds one, it can call decodeURIComponent() and the whole string will be unescaped for it.

To see what I mean enter this in your URL bar:

javascript: alert(decodeURIComponent("%49%20%53%65%65%20%59%6f%75"));

;)

Jordan

Amgine

3:15 am on Sep 3, 2003 (gmt 0)

10+ Year Member



Thanks!

Another solution, but won't work for my situation (hmm... actually, uhm...) suggested on alt.php - [rsscripts.tripod.com...] Basically, put e-mail addies into form. Which, I 'spose, I could do inline... uglification... unless I build a jpeg button onfly...

Do you stream of conscious when tired too? gnite.

Amgine

limbo

12:25 pm on Sep 3, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I wondered if the acsii code for the @ symbol would work?

for instance in the html replace the @ sign with &#64;

or am I clutching at straws here?

I thought that maybe only really sophisticated e-mail harvesters
would pick up on that - but I am layman on this topic.

ta

limbo

Amgine

5:37 pm on Sep 8, 2003 (gmt 0)

10+ Year Member



Some harvesters look for @, some also look for &#64;, and probably a few looking for whatever the escape sequence is.

The larger the variety of options, the harder harvesters have to work. The more esoteric the option, the fewer harvesters will be looking for it. Contrariwise, if everyone switches over to one other way of cloaking e-mail, the harvesters will be looking for that.

Amgine

vaalea

12:07 am on Sep 24, 2003 (gmt 0)

10+ Year Member



is there problems if you make it into a graphic?

(I'm new. Hi.)

limbo

11:45 am on Sep 24, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Yep

You are merely assigning the attribute to an img tag. So the mailto:me@mydomain.com remains in the source code.

Oh, and Welcome to WebmasterWorldrld [webmasterworld.com] :)

Ta

Limbo

Iguana

12:01 pm on Sep 24, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



There's a report [cdt.org] from the Centre for Democracy and Technology that HTML encoding actually works (or it did with their limited experiment).

Maybe it's not worth the trouble for most email harvesters to cope with encoding - after all they don't need every email address in the world. Probably more worthwhile to improve the reach of the pages they harvest from.

ergophobe

4:31 pm on Sep 24, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month





is there problems if you make it into a graphic?

You are merely assigning the attribute to an img tag.

Actually, I think the original poster was thinking of something like the access codes used on the netsol Whois database, which would allow you to put an email address up that would be 100% safe from harvesters, but it could not have a clickable link. So a human reader could read it and type it into an email client, but it couldn't be a link, because then the harvester would snag it from the href.

vaalea

10:32 pm on Sep 24, 2003 (gmt 0)

10+ Year Member



i was thinking along those lines (thanks), but i know people would be less likely to bother if they have to type in an address, although an easy email to spell always helps. =0)
(then again, when using hotmail and such, you have to at least copy and paste it in anyway... rather than just click.)

kwasher

1:45 am on Sep 25, 2003 (gmt 0)

10+ Year Member



Hi. I use this successfully, looks like a normal link on the web page (this example would be viewed as KENN@WEBMASTERWORLD.COM)-

<script language="JavaScript">
<!--
// hide script
var sb_domain = "WEBMASTERWORLD.COM"
var sb_user = "KENN"
var sb_recipient = sb_user + "@" + sb_domain
var sb_url = "mailto:" + sb_recipient
document.write(sb_recipient.link(sb_url));
// --></script>

TheDoctor

7:55 pm on Oct 19, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Apologies for resurrecting this thread, but I thought I'd report back. I used a variant of Moltar's external Javascript routine (msg #9 in the thread) to hide email addresses on my main site and I've virtually eliminated all spam to them. This in only just over a month!

So thanks Moltar - and everyone lese - and I hope I'm not tempting fate by this post!

moltar

12:20 am on Oct 20, 2003 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You are welcome :) I am glad you liked it!