From: Chad Fowler Date: 2004-10-06T20:58:28+09:00 Subject: Re: RubyGarden Spam On Wed, 6 Oct 2004 11:53:55 +0900, Patrick May wrote: > Hello, > > On Tuesday, September 28, 2004, at 07:14 PM, Patrick May wrote: > > > Hello, > > > > On Tuesday, September 28, 2004, at 12:39 AM, David Ross wrote: > > > >> You should create a way to generate images with text > >> verification. This would eliminate spam. > > > > The only way to stop wiki spam is to have a dedicated admin. > > Creativity helps reduce the time burden, but it is a constant > endeavor. > > > > A tarpit would be easier to implement than a captcha. In the usemod > > settings, you use NetAddr::IP to check if the env's Remote Addr is > > within a known spammer domain. If it is a spammer, set the pages > > database to a copy. Nightly / weekly / whatever, dump the latest > > pages directory on top of the tarpit. > > I threw together tarpit logic for usemod: > > # == Configuration ==================================== > use NetAddr::IP; > use vars qw( $TarpitDir $VandalFile ); > > $DataDir = "/tmp/mywikidb"; # Main wiki directory > $TarpitDir = "/tmp/tarpitdb"; # tarpit dir > $VandalFile = "/Users/patsplat/Desktop/usemod10/vandals.txt"; > > open(SOURCE, "< $VandalFile") > or die "Couldn't open $VandalFile for reading: $!\n"; > my $remote_addr = new NetAddr::IP $ENV{"REMOTE_ADDR"}; > while() { > my $vandal_host = new NetAddr::IP $_; > if ( $remote_addr->within( $vandal_host ) ) { > $DataDir = $TarpitDir; > } > } > Great, thanks! Now I've just got to find the time to insert it and test it. Hopefully some time this afternoon I can steal a few minutes.. Much appreciated, Patrick! Chad