Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Page 1 of 2 12 LastLast
Results 1 to 15 of 20
  1. #1
    Regular Coder
    Join Date
    Jun 2002
    Location
    England =)
    Posts
    523
    Thanks
    26
    Thanked 0 Times in 0 Posts

    :: will this script stop spambots? ::

    <script>

    function emaillink(person,domain,subject,text) {
    document.write('<a href=\"mailto:' + person + '@' + domain + '?subject=' + subject + '\">' + text + '</a>');
    }

    </script>

    <script>emaillink('mickeymouse','disney.com','minny','click here to email a fictional character')</script>

    i wrote this as im sick of getting spam from my websites - will it work tho? (im talking spambots rather than ppl)

    thanks peeps!
    "They hired me for my motivational skills. Everyone at work says they have to work much harder when I`m around" Homer J Simpson

  • #2
    Senior Coder joh6nn's Avatar
    Join Date
    Jun 2002
    Location
    72° W. 48' 57" , 41° N. 32' 04"
    Posts
    1,887
    Thanks
    0
    Thanked 1 Time in 1 Post
    you can fool some of the bots all of the time, and you can fool all of the bots some of the time, but you can't foll all of the bots all of the time.

    when i get a better handle on server side languages, i'm going to set up a FormMail script, and replace all my mailto links with the form. that's the only way that i know of, to keep the bots off you, because the address is completely invisible on the client side.
    bluemood | devedge | devmo | MS Dev Library | WebMonkey | the Guide

    i am a loser geek, crazy with an evil streak,
    yes i do believe there is a violent thing inside of me.

  • #3
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    Try doing your email address in Decimal Code

    Might work ?

  • #4
    Senior Coder
    Join Date
    Aug 2002
    Location
    UK
    Posts
    2,789
    Thanks
    2
    Thanked 14 Times in 14 Posts
    can spiders read decimal ??

  • #5
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by joh6nn
    because the address is completely invisible on the client side.
    Yeah but is it? Even with a formail program, the recipient address still needs to be visible in the form. Or are you hard-coding it into the script?

    I use a similair technique to babelfish' but I add php discrimination as well. So - define a $browsers group use user agent info, which gets rid of non-spoofing bots, and then inside that put the javascript info to write the form element.

    As a no-script alternative, i;ve used a gif image of my email address with no alt tag

    But still ... probably not 100% reliable

  • #6
    Senior Coder joh6nn's Avatar
    Join Date
    Jun 2002
    Location
    72° W. 48' 57" , 41° N. 32' 04"
    Posts
    1,887
    Thanks
    0
    Thanked 1 Time in 1 Post
    yeah, i had actually intended on hard coding the address into the server side script. another benefit of that is that i only have one thing to change if i change email addresses.
    bluemood | devedge | devmo | MS Dev Library | WebMonkey | the Guide

    i am a loser geek, crazy with an evil streak,
    yes i do believe there is a violent thing inside of me.

  • #7
    Senior Coder
    Join Date
    Jun 2002
    Location
    ColoRockyz
    Posts
    1,646
    Thanks
    1
    Thanked 0 Times in 0 Posts
    No.

    Spambots are now starting to read js.

    Unfortunately, if you're using mailto:, there's not much you can do about this.

    One solution would be to use a mailer with PHP's built in mail() function or another server side language.

    Another, if a action isn't really needed, would be to just use plain text = joe at yahoo dot com

    I wouldn't be suprised if spambots soon 'learn' to read text...
    Zoobie or not Zoobie...That is the problem.
    <body onUnload="flush( ! )">

  • #8
    Senior Coder
    Join Date
    Jun 2002
    Location
    41° 8' 52" N -95° 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yeah but is it? Even with a formail program, the recipient address still needs to be visible in the form. Or are you hard-coding it into the script?
    Nah... if you're using server-side scripting, the client's browser never needs to see that stuff.

    Either that or you're doing something wrong! If you have the ability to use server-side scripting to send emails, you should never have a "mailto" link unless you're lazy or don't care.

    Tip to john: make your email address an application variable - (in ASP, that would be in the global.asa file) then you only have to change it in one place, no matter how many pages you've put it on!

    That goes for pretty much anything you may use throughout a site.

    Last edited by whammy; 08-22-2002 at 12:39 AM.
    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)

  • #9
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Originally posted by whammy
    Either that or you're doing something wrong! If you have the ability to use server-side scripting to send emails, you should never have a "mailto" link unless you're lazy or don't care.
    I was mainly thinking of generic programs like FormMail.pl - where you pass it the information in a GET request. But sure, for a custom script then there's no need.

    Having said that .. I still use mailto: for a thing where visitors can mail themselves a link to the page they're on; but that's for liability reasons, so that it can't be used to spam someone who wasn't expecting it.

    I guess I could get past liability by making it seem like the email came from noone, but that just seems devious. Dunno. Maybe i'm being hypersensitive.

  • #10
    Senior Coder
    Join Date
    Jun 2002
    Location
    41° 8' 52" N -95° 53' 31" W
    Posts
    3,660
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I worry about the same thing actually - which is why for any kind of formmail thing that someone COULD abuse, I make sure to include their IP address (and warn them of such).
    Former ASP Forum Moderator - I'm back!

    If you can teach yourself how to learn, you can learn anything. ;)

  • #11
    Regular Coder
    Join Date
    Jun 2002
    Posts
    623
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I'm just thinking outloud here, feel free to shoot it down or add to it.

    If I understand this correctly, for a spambot to harvest your email it would have to be able to follow links and read javascript.

    If spambots can do that could mouse movement be detected prior to allowing the link to be followed?

  • #12
    Senior Coder joh6nn's Avatar
    Join Date
    Jun 2002
    Location
    72° W. 48' 57" , 41° N. 32' 04"
    Posts
    1,887
    Thanks
    0
    Thanked 1 Time in 1 Post
    no, because spam bots work by reading the source of a page, and pulling the email address out of the source. so if the address is anywhere on the page, then the spambot can read it.
    bluemood | devedge | devmo | MS Dev Library | WebMonkey | the Guide

    i am a loser geek, crazy with an evil streak,
    yes i do believe there is a violent thing inside of me.

  • #13
    Regular Coder
    Join Date
    Jun 2002
    Posts
    623
    Thanks
    0
    Thanked 0 Times in 0 Posts
    OIC, thanks John

  • #14
    Regular Coder
    Join Date
    Jun 2002
    Location
    England =)
    Posts
    523
    Thanks
    26
    Thanked 0 Times in 0 Posts
    Originally posted by joh6nn
    no, because spam bots work by reading the source of a page, and pulling the email address out of the source. so if the address is anywhere on the page, then the spambot can read it.
    so u mean when reading the source it would actually see the output of the document.write? or just the code to produce the output?
    "They hired me for my motivational skills. Everyone at work says they have to work much harder when I`m around" Homer J Simpson

  • #15
    Senior Coder
    Join Date
    Jun 2002
    Location
    near Oswestry
    Posts
    4,508
    Thanks
    0
    Thanked 0 Times in 0 Posts
    I doubt if a spambot would process and compile the output of a document.write ... but maybe there are some that do


  •  
    Page 1 of 2 12 LastLast

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •