Web Wiz - Green Windows Web Hosting

  New Posts New Posts RSS Feed - Cloaking email addresses - very cool
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Topic ClosedCloaking email addresses - very cool

 Post Reply Post Reply Page  12>
Author
Bluefrog View Drop Down
Senior Member
Senior Member


Joined: 23 October 2002
Location: Korea, South
Status: Offline
Points: 1701
Direct Link To This Post Topic: Cloaking email addresses - very cool
    Posted: 02 July 2003 at 8:38pm

I stumbled across a site that has a very cool way to cloak email addresses against spiders and bots. Check it out at:

http://omt.net/contact.html

This is the script:


<!-- Email-->
<SCRIPT LANGUAGE='JAVASCRIPT'>


function sendto(c,n,d) {
c += ' ';
var length = c.length;
var number = 0;
var bar = 0;
var answer = '';
for(var i = 0; i < length; i++) {
number = 0;
bar = 0;
while(c.charCodeAt(i) != 32) {
number = number * 10;
number = number + c.charCodeAt(i)-48;
i++;
}
answer += String.fromCharCode(decrypt(number,n,d));
}
// Updated security feature
parent.location = 'm'+'a'+'i'+'l'+'t'+'o'+':'+answer;
}

function showText(c,n,d) {
c += ' ';
var length = c.length;
var number = 0;
var bar = 0;
var answer = '';
for(var i = 0; i < length; i++) {
number = 0;
bar = 0;
while(c.charCodeAt(i) != 32) {
number = number * 10;
number = number + c.charCodeAt(i)-48;
i++;
}
document.write('&');
document.write('#');
document.write(decrypt(number,n,d));
}
}

function decrypt(c,n,d) {
// Split exponents up
if (d % 2== 0) {
bar = 1;
for(var i = 1; i <= d/2; i++) {
foo = (c*c) % n;
bar = (foo*bar) % n;
}
} else {
bar = c;
for(var i = 1; i <= d/2; i++) {
foo = (c*c) % n;
bar = (foo*bar) % n;
}
}
return bar;
}
// Stop hiding the script -->
</SCRIPT>

Back to Top
Ghostnet View Drop Down
Groupie
Groupie


Joined: 03 May 2003
Location: United States
Status: Offline
Points: 39
Direct Link To This Post Posted: 03 July 2003 at 10:35pm

Pretty good.  I've been getting a lot of spam lately.  Looks like a good system.  Thanks for the post.

evolution is a vehicle. drive responsibly
Back to Top
copenhagen View Drop Down
Newbie
Newbie


Joined: 18 June 2003
Status: Offline
Points: 8
Direct Link To This Post Posted: 07 July 2003 at 10:17am
where in that script do you put an email address????
Back to Top
Gullanian View Drop Down
Senior Member
Senior Member
Avatar

Joined: 04 January 2002
Location: England
Status: Offline
Points: 4373
Direct Link To This Post Posted: 07 July 2003 at 10:41am
does webwiz do any email cloaking?
Back to Top
xeerex View Drop Down
Senior Member
Senior Member


Joined: 19 November 2002
Location: United States
Status: Offline
Points: 601
Direct Link To This Post Posted: 07 July 2003 at 6:29pm

The only problem with that one is that it won't display the actual address for those using a web-based email client. They can't see the actual address. Here's a much simpler one:

<SCRIPT type="text/javascript" language="javascript">
<!-- Begin
a="me";
b="mydomain.com";
document.write('<a href=\"mailto:'+a+'@'+b+'\">');
document.write(a+'@'+b+'<\/a>');
// End -->
</SCRIPT>

I put that in an asp page and just use an include wherever I want it, which I find much simpler that putting the code in everytime. The only problem with either of these would be a site browser that has javascript disabled on their browser. Those are few and far between though.

Too bad there is not a way to do it in ASP though...

Back to Top
Bliss View Drop Down
Groupie
Groupie
Avatar

Joined: 25 April 2003
Location: United States
Status: Offline
Points: 181
Direct Link To This Post Posted: 07 July 2003 at 7:22pm
Yeah, server sided protection would be awesome!
Back to Top
Bluefrog View Drop Down
Senior Member
Senior Member


Joined: 23 October 2002
Location: Korea, South
Status: Offline
Points: 1701
Direct Link To This Post Posted: 08 July 2003 at 12:05am

For server side protection you just need to use a form and do the email from the server. Another way is just to put the email address in a graphic. .NET let's you do that on the fly. Some ASP components do as well.

As for entering an email address in the script, you don't. You just call the function and pass a string. It decrypts it and pops up a MAILTO:. So you need to reverseengineer the encryption (cipher, whatever) for it. Shouldn't be to hard. I haven't tried yet because it just looked cool. I'm far to lazy at the moment... (Still busy with Flash and .NET).

Back to Top
xeerex View Drop Down
Senior Member
Senior Member


Joined: 19 November 2002
Location: United States
Status: Offline
Points: 601
Direct Link To This Post Posted: 08 July 2003 at 9:59am

Yeah--but forms are not always aesthetically pleasing or functional and neither is a graphic when someone wants to copy/paste the address.

Any other ideas? Of course, I may be looking for the impossible...

Back to Top
 Post Reply Post Reply Page  12>

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.08
Copyright ©2001-2026 Web Wiz Ltd.


Become a Fan on Facebook Follow us on X Connect with us on LinkedIn Web Wiz Blogs
About Web Wiz | Contact Web Wiz | Terms & Conditions | Cookies | Privacy Notice

Web Wiz is the trading name of Web Wiz Ltd. Company registration No. 05977755. Registered in England and Wales.
Registered office: Web Wiz Ltd, Unit 18, The Glenmore Centre, Fancy Road, Poole, Dorset, BH12 4FB, UK.

Prices exclude VAT at 20% unless otherwise stated. VAT No. GB988999105 - $, € prices shown as a guideline only.

Copyright ©2001-2026 Web Wiz Ltd. All rights reserved.