class DansguardianDeniedAction::Log

Represents a single log line in the access logs

@note Documentation about attribute accessors of this class was taken

from http://contentfilter.futuragts.com/wiki/doku.php?id=the_access.log_files

@see contentfilter.futuragts.com/wiki/doku.php?id=the_access.log_files

Attributes

actions[R]

@return [String] Items like URLMOD, CONTENTMOD, SCANNED, INFECTED, ending with

either *DENIED* or *EXCEPTED* (*URLMOD* means urlregexplist tweaked the outgoing request,
often used to force "safesearch" on) (*CONTENTMOD* means contentregexplist tweaked
the incoming content, sometimes used to replace ofensive words with less offensive
ones [but its use probably interferes with downloads, thus precluding them])
category[R]

@return [String] Contents of the listcategory tag (if any) in the list that's most

relevant to the action
client_name[R]

@return [String] If configured, the result of performing a reverse DNS IP lookup on

the requestor's IP address. Highly network dependent, meaningful on only some networks.
date_time[R]

@return [String]

filter_group_name[R]

@return [String] A more convenient presentation of the same information in filter group

number. Only present if "groupname = ..." is specified in each dansguardianfN.conf file.
filter_group_number[R]

@return [Integer] The filter group (1 => f1, 2 => f2, etc). the request was assigned to

http_code[R]

@return [Integer] Always a three digit number, usually 200 if everything went okay

method[R]

@return [String] The HTTP request verb, usually either GET or POST (or HEAD)

mime_type[R]

@return [String] The MIME type of the document according to the website, usually

"text/html" for webpages
raw[R]

@return [String] Raw log line string that will be parsed

reason[R]

@return [String] An elaboration on the action

requested_url[R]

@return [String] Complete requested URL. Often much of this is hidden from the

user.  Typically includes search terms.
requesting_ip[R]

@return [String] Requesting IP address. Watch out for DHCP networks where

computers sometimes change IP addresses.
requesting_user[R]

@return [String] Requesting user or computer. If an “authplugin” has not

identified a user or computer, this will return just a dash.
size[R]

@return [Integer] The size in bytes of document (if it was fetched)

subreason[R]

@return [String] More details about the action, for example the actual regular expressions

user_agent[R]

@return [String] Sometimes interesting and useful information. Note though that because

this is so easily spoofed, it should not be used for any sort of security.
weight[R]

@return [Integer] The sum of all the weighted phrase scores, which is the calculated

naughtyness value

Public Class Methods

new( raw ) click to toggle source

@param raw [String] Raw log line string that will be parsed

# File lib/dansguardian_denied_action/log.rb, line 78
def initialize( raw )
  @raw = raw
end