#!/usr/bin/perl use WWW::Google::Groups; $agent = new WWW::Google::Groups(server => 'http://groups.google.com') +; $group = $agent->select_group('news.admin.net-abuse.sightings'); $threshold = $ARGV[0] || 20; $cnt = 0; open $blacklist, ">blacklist"; open $blacklist_log, ">blacklist_log"; while( $thread = $group->next_thread() ){ while( $article = $thread->next_article() ){ $body = $article->body(); if($body =~ /^From: .+$/mo){ if( $& =~ /[\b<](.+?@.+)[\b>]/o ){ print {$blacklist} $1,$/; $cnt++; } print {$blacklist_log} join( q/ /, $thread->title(), '=>', + $1),$/; } last; } last if $cnt >= $threshold; }
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
Re: get spam email list from google
by xern (Beadle) on Jan 30, 2004 at 07:18 UTC | |
by grinder (Bishop) on Jan 30, 2004 at 09:13 UTC | |
by b10m (Vicar) on Jan 30, 2004 at 09:55 UTC | |
by xern (Beadle) on Jan 30, 2004 at 09:33 UTC | |
by b10m (Vicar) on Jan 30, 2004 at 10:02 UTC |