Forum: Rails Engines Request for Spam-protection Feature

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
D449d54c3b0f8c9930c11c7d7d3e6cdd?d=identicon&s=25 unknown (Guest)
on 2006-02-14 15:13
(Received via mailing list)
Hello,
  I have a request that the user engine and the wiki engines should
incorporate some sort of spam protection, ideally using images.

http://rails-engines.org/ is such a new site, and still today I fixed
pages
which were spammed and filled with junk.

Cheers.
--
Surendra Singhi
http://ssinghi.kreeti.com, http://www.kreeti.com
Read the latest news at: http://news.kreeti.com
05d703f649ef1d07e78d7b479fb4c4ac?d=identicon&s=25 James Adam (Guest)
on 2006-02-14 15:13
(Received via mailing list)
The best way to get this kind of functionality would be to submit
patches - I agree that it would certainly be useful, but I don't have
a lot of time to dedicate to this time of feature.

james

On 2/14/06, efuzzyone@netscape.net <efuzzyone@netscape.net> wrote:
> http://ssinghi.kreeti.com, http://www.kreeti.com
> Read the latest news at: http://news.kreeti.com
>
> _______________________________________________
> engine-users mailing list
> engine-users@lists.rails-engines.org
> http://lists.rails-engines.org/listinfo.cgi/engine...
>


--
* J *
  ~
A63764f318f10379c8b51349b757cf4b?d=identicon&s=25 Jay Levitt (Guest)
on 2006-02-14 17:50
(Received via mailing list)
On Tue, 14 Feb 2006 16:45:10 +0530,
efuzzyone@netscape.net wrote:

>   I have a request that the user engine and the wiki engines should
> incorporate some sort of spam protection, ideally using images.

You should know that CAPTCHAs, as they're called, are controversial,
because (a) they're very unfriendly to the disabled, and (b) they're
actually easy to automate - assuming you can't OCR them yourself, which
is
a bad assumption these days, you just put up a porn site, display any
CAPTCHAs your spambots see to the end users, and let THEM figure it out
for
you.

Jay Levitt
98a75ff169f616e0a204c40c71b96e89?d=identicon&s=25 Bob Apthorpe (Guest)
on 2006-02-14 18:44
(Received via mailing list)
Hi,

Jay Levitt wrote:
> CAPTCHAs your spambots see to the end users, and let THEM figure it out for
> you.

It's not terribly difficult to parse domains out of posted URLs and
check them against SURBL (http://www.surbl.org.) I've written
proof-of-concept code to do this in perl, there's Net_DNSBL for PHP - I
can't imagine it's that difficult to port either of these to Ruby.

-- Bob

PS: I used the following to extract the TLD recognition regexes from
Mail::SpamAssassin. With a PCRE engine and a little adjustment (add
'(^.*\.)?' at the front and '$' at the back), the regexes are fairly
portable.

#!/usr/bin/perl
use strict;
use Mail::SpamAssassin::Util::RegistrarBoundaries;

print "##### 4LD regex #####\n"
 .
$Mail::SpamAssassin::Util::RegistrarBoundaries::FOUR_LEVEL_DOMAINS,"\n";

print "##### 3LD regex #####\n"
 .
$Mail::SpamAssassin::Util::RegistrarBoundaries::THREE_LEVEL_DOMAINS,"\n";

print "##### 2LD regex #####\n"
 .
$Mail::SpamAssassin::Util::RegistrarBoundaries::TWO_LEVEL_DOMAINS,"\n";

print "##### TLD regex #####\n"
 . $Mail::SpamAssassin::Util::RegistrarBoundaries::VALID_TLDS,"\n";

----

I found a bit of Ruby code at
http://www.spampalforums.org/phpBB2/viewtopic.php?t=5156 that queries
SURBL. It looks like all that's needed is decent packaging and text ->
URL -> domain extraction (see above and
http://www.surbl.org/implementation.html for more info)

#!/usr/bin/ruby
require 'resolv'

dns = Resolv::DNS.new
begin
  dns.getresources("#{ARGV[0]}.sc.surbl.org",
    Resolv::DNS::Resource::IN::A).collect do |r|
    print r.address
    # etc
end
rescue Resolv::ResolvError => e
  puts "not found - address '#{e.message}' not in list, thus hopefully
not spam"
end
This topic is locked and can not be replied to.