referrercop.rb

Path: referrercop.rb
Last Update: Sun Feb 26 00:46:44 PST 2006

ReferrerCop

Parses an Apache log file or AWStats data file and filters out entries for referrers that are known spammers.

Visit wonko.com/software/referrercop for news, usage examples, and updates. Blacklists can be downloaded from referrercop.org/.

Version:1.1.0 (02/26/2006)
Author:Ryan Grove (ryan@wonko.com)
Copyright:Copyright © 2006 Ryan Grove
License:ReferrerCop is open source software distributed under the terms of the GNU General Public License.

Dependencies

Usage

      referrercop [-f | -i | -n | -s] [options] [<file> ...]
      referrercop -u <url> [options]
      referrercop -U [options]
      referrercop {-h | -V}

Modes:

 -f, --filter             Filter the specified files (or standard input if no
                          files are specified), sending the results to
                          standard output. This is the default mode.
 -i, --in-place           Filter the specified files in place, replacing each
                          file with the filtered version. A backup of the
                          original file will be created with a .bak extension.
 -n, --extract-ham        Extract ham (nonspam) URLs from the input data and
                          send them to standard output. Duplicates will be
                          suppressed.
 -s, --extract-spam       Extract spam URLs from the input data and send
                          them to standard output. Duplicates will be
                          suppressed.
 -u, --url <url>          Test the specified URL.
 -U, --update             Check for an updated version of the default
                          blacklist and download it if available.

Options:

 -b, --blacklist <file>   Blacklist to use instead of the default list.
 -c, --config <file>      Use the specified config file.
 -v, --verbose            Print verbose status and statistical info to stderr.
 -w, --whitelist <file>   Whitelist to use instead of the default list.

Information:

 -h, --help               Display usage information (this message).
 -V, --version            Display version information.

$Id: referrercop.rb,v 1.14 2006/02/26 08:44:54 ryan Exp $

Required files

digest/sha1   fileutils   net/http   optparse   ostruct   time   uri   zlib  

[Validate]