Hi David/all,
   The bugtraq archives were moved to www.securityfocus.com and the format was
changed so I've redone the handler. Unfortunately I have not graduated to
using
the new newsclipper tool or the array of hashes stuff. So here it is in the
same
old Dailyupdate 7.02 format.

Thanks
Manpreet
-- 
vuja de:
        The feeling that you've *never*, *ever* been in this situation before.
# -*- mode: Perl; -*-

# AUTHOR: Manpreet Singh
# EMAIL: [EMAIL PROTECTED]
# ONE LINE DESCRIPTION: Bugtraq mailing list archives
# URL: http://www.securityfocus.com
# TAG SYNTAX:
# <input name=bugtraq>
#
#
# Sample tag spec that works best for me :-)
#
# <!--dailyupdate
#   <input name=bugtraq>
#   <filter name=limit number=10>
#   <output name=array numcols=1>
# -->
#  
# LICENSE: Whatever-the-hell-you-wanna-do-with-it
# NOTES:

package DailyUpdate::Handler::Acquisition::bugtraq;

use strict;
use DailyUpdate::Handler;
use vars qw( @ISA $VERSION );
@ISA = qw(DailyUpdate::Handler);

# DEBUG for this package is the same as the main.
use constant DEBUG => main::DEBUG;

use DailyUpdate::AcquisitionFunctions qw( GetLinks );

$VERSION = 0.2;

# ------------------------------------------------------------------------------

# This function is used to get the raw data from the URL.
sub Get
{
  my $self = shift;
  my $attributes = shift;

  my $url = 'http://www.securityfocus.com/templates/archive.pike?list=1';

  my $startPattern = 'Author';
  my $endPattern = 'Disclaimer';

  my $data = GetLinks($url,$startPattern,$endPattern);
  return undef unless defined $data;

  @$data = grep { ! /"mailto:.*$/i } @$data;
  foreach (@$data) {
    s/CLASS\s*=\s*\"slink\"\s*//i;
  }
  return $data;
}

# ------------------------------------------------------------------------------

sub GetDefaultHandlers
{
  my $self = shift;
  my $inputAttributes = shift;

  my @returnVal = (
    {'name' => 'limit', 'number' => 10},
    {'name' => 'array'}
  );

  return @returnVal;
}

1;

Reply via email to