Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > Perl > Perl Misc > Web Forms / Perl / SPAM detection

Reply
Thread Tools

Web Forms / Perl / SPAM detection

 
 
- Bob -
Guest
Posts: n/a
 
      05-03-2007
I have some web forms that are getting hit by spammers sending spam
into the system. They are simple forms, add your name, address, etc.
Perl code handles the form, of course!

I'd like to cut down on the spammers. I was thinking that perhaps I
could check the person's IP against blacklists... but most of the
blacklists I know of are mail servers, so I am not sure that is
practical. I am hoping to avoid the "enter this displayed secret code"
mechanism as an annoyance for legit users. But, I am open to
suggestions on existing Perl based solutions (trails blazed before
me!) or just pointers to good resources on programmable solutions to
this issue.

Thanks,

 
Reply With Quote
 
 
 
 
jayjuliano@gmail.com
Guest
Posts: n/a
 
      05-03-2007
On May 3, 8:40 am, - Bob - <uctra...@ultranet.com> wrote:
> I have some web forms that are getting hit by spammers sending spam
> into the system. They are simple forms, add your name, address, etc.
> Perl code handles the form, of course!
>
> I'd like to cut down on the spammers. I was thinking that perhaps I
> could check the person's IP against blacklists... but most of the
> blacklists I know of are mail servers, so I am not sure that is
> practical. I am hoping to avoid the "enter this displayed secret code"
> mechanism as an annoyance for legit users. But, I am open to
> suggestions on existing Perl based solutions (trails blazed before
> me!) or just pointers to good resources on programmable solutions to
> this issue.
>
> Thanks,


Utilize a 'Captcha' system. Have your Perl script generate an image
with a 5 character text code. Then force the user to type the text in
the image before submitting. This will stop bots.

 
Reply With Quote
 
 
 
 
Brian Wakem
Guest
Posts: n/a
 
      05-03-2007
- Bob - wrote:

> I have some web forms that are getting hit by spammers sending spam
> into the system. They are simple forms, add your name, address, etc.
> Perl code handles the form, of course!
>
> I'd like to cut down on the spammers. I was thinking that perhaps I
> could check the person's IP against blacklists... but most of the
> blacklists I know of are mail servers, so I am not sure that is
> practical. I am hoping to avoid the "enter this displayed secret code"
> mechanism as an annoyance for legit users. But, I am open to
> suggestions on existing Perl based solutions (trails blazed before
> me!) or just pointers to good resources on programmable solutions to
> this issue.
>
> Thanks,



When a load of link spamming bots were hitting our contact forms I found
that ignoring any message with '</a>' or '[/url]' in got rid of 99% of the
crap.


--
Brian Wakem
Email: http://homepage.ntlworld.com/b.wakem/myemail.png
 
Reply With Quote
 
Brian McCauley
Guest
Posts: n/a
 
      05-03-2007
On May 3, 2:40 pm, - Bob - <uctra...@ultranet.com> wrote:
> I have some web forms that are getting hit by spammers sending spam
> into the system. They are simple forms, add your name, address, etc.
> Perl code handles the form, of course!
>
> I'd like to cut down on the spammers. I was thinking that perhaps I
> could check the person's IP against blacklists... but most of the
> blacklists I know of are mail servers, so I am not sure that is
> practical.


No, not really. These lists will often block all dynamic IP pools
which would block far too many ligit users.

> I am hoping to avoid the "enter this displayed secret code"
> mechanism as an annoyance for legit users.


Not to mention, in some jurisdictions, quite possibly grounds for a
law suit from visually impaired users.

 
Reply With Quote
 
Gunnar Hjalmarsson
Guest
Posts: n/a
 
      05-03-2007
Brian Wakem wrote:
> - Bob - wrote:
>>I am hoping to avoid the "enter this displayed secret code"
>>mechanism as an annoyance for legit users. But, I am open to
>>suggestions on existing Perl based solutions (trails blazed before
>>me!) or just pointers to good resources on programmable solutions to
>>this issue.


I don't like CAPTCHA either.

The CPAN module CGI::ContactForm includes a cookie based spam prevention
feature. It's not waterproof, but it does stop some of the bots.

> When a load of link spamming bots were hitting our contact forms I found
> that ignoring any message with '</a>' or '[/url]' in got rid of 99% of the
> crap.


I suppose that would stop the rest of the bots for me too.

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
 
Reply With Quote
 
Michael Vilain
Guest
Posts: n/a
 
      05-03-2007
In article <>,
- Bob - <> wrote:

> I have some web forms that are getting hit by spammers sending spam
> into the system. They are simple forms, add your name, address, etc.
> Perl code handles the form, of course!
>
> I'd like to cut down on the spammers. I was thinking that perhaps I
> could check the person's IP against blacklists... but most of the
> blacklists I know of are mail servers, so I am not sure that is
> practical. I am hoping to avoid the "enter this displayed secret code"
> mechanism as an annoyance for legit users. But, I am open to
> suggestions on existing Perl based solutions (trails blazed before
> me!) or just pointers to good resources on programmable solutions to
> this issue.
>
> Thanks,
>


My contact page was getting hit by spammers and I tried for a while to
us a block list. It became to burdensome to constantly update it. I
was ready to implement a CAPTCHA but found a really quick solution.

I renamed all the fields to generic names (e.g. FIELD1, FIELD2, etc.)
and added a HIDDEN field which I gave a default value of "" in the form.
In the form processing script (this was PHP, but it will work in PERL
also), if the hidden field has a non-blank value, I know a BOT has
filled out the form and I don't process it further. Only a human
filling out the form and pressing SUBMIT will process it.

Simple and it seems to work. No BOTs have sent me email for a while now.

--
DeeDee, don't press that button! DeeDee! NO! Dee...



 
Reply With Quote
 
Gunnar Hjalmarsson
Guest
Posts: n/a
 
      05-04-2007
Michael Vilain wrote:
> I renamed all the fields to generic names (e.g. FIELD1, FIELD2, etc.)
> and added a HIDDEN field which I gave a default value of "" in the form.
> In the form processing script (this was PHP, but it will work in PERL
> also), if the hidden field has a non-blank value, I know a BOT has
> filled out the form and I don't process it further. Only a human
> filling out the form and pressing SUBMIT will process it.
>
> Simple and it seems to work. No BOTs have sent me email for a while now.


Interesting. Do you know if it's the generic names or the hidden fields
that is the key of success? Or is it the combination?

--
Gunnar Hjalmarsson
Email: http://www.gunnar.cc/cgi-bin/contact.pl
 
Reply With Quote
 
- Bob -
Guest
Posts: n/a
 
      05-04-2007
On Fri, 04 May 2007 03:02:10 +0200, Gunnar Hjalmarsson
<> wrote:

>Michael Vilain wrote:
>> I renamed all the fields to generic names (e.g. FIELD1, FIELD2, etc.)
>> and added a HIDDEN field which I gave a default value of "" in the form.
>> In the form processing script (this was PHP, but it will work in PERL
>> also), if the hidden field has a non-blank value, I know a BOT has
>> filled out the form and I don't process it further. Only a human
>> filling out the form and pressing SUBMIT will process it.
>>
>> Simple and it seems to work. No BOTs have sent me email for a while now.

>
>Interesting. Do you know if it's the generic names or the hidden fields
>that is the key of success? Or is it the combination?


Interesting solution. I am thinking that the hidden field is the only
one that really counts. Some bots might go away if they don't see any
fields like "name", "address", "comment", etc, but if you have a
hidden field named "comment", any that stick around will likely fill
it in and reveal their bot-ness.




 
Reply With Quote
 
- Bob -
Guest
Posts: n/a
 
      05-04-2007
On Fri, 04 May 2007 00:31:28 +0200, Gunnar Hjalmarsson
<> wrote:

<>
>The CPAN module CGI::ContactForm includes a cookie based spam prevention
>feature. It's not waterproof, but it does stop some of the bots.




>> When a load of link spamming bots were hitting our contact forms I found
>> that ignoring any message with '</a>' or '[/url]' in got rid of 99% of the
>> crap.

>
>I suppose that would stop the rest of the bots for me too.


Good point... every bot that has hit me has pasted HTML in... That's
probably a good detector.

 
Reply With Quote
 
John W. Kennedy
Guest
Posts: n/a
 
      05-05-2007
- Bob - wrote:
> I have some web forms that are getting hit by spammers sending spam
> into the system. They are simple forms, add your name, address, etc.
> Perl code handles the form, of course!


So far this works: use external JS file; call from BODY ONLOAD to build
non-trivial submit button; test for it. Robots don't do JS, so can't
submit. Downside: users need JS.

--
John W. Kennedy
"The grand art mastered the thudding hammer of Thor
And the heart of our lord Taliessin determined the war."
-- Charles Williams. "Mount Badon"
* TagZilla 0.066 * http://tagzilla.mozdev.org
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Spam, spam, spam, spam... rickman VHDL 5 02-13-2010 04:52 PM
Spam! Spam! Spam! Spam! Anon anon_007_35@lostbbs.dyndns.org Computer Information 1 01-30-2005 04:16 AM
Spam! Spam! Spam! Spam! Anon anon_007_35@lostbbs.dyndns.org Computer Support 1 01-30-2005 04:16 AM
SPAM SPAM SPAM Brian Smith MCSE 1 11-21-2004 10:51 PM
Spam-Spam and more Spam C A Preston Computer Support 2 04-12-2004 07:15 PM



Advertisments
 



1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57