squidtaild-2.1a6.orig/0040750011460701146070000000000007067251064014221 5ustar behanwbehanwsquidtaild-2.1a6.orig/config/0040750011460701146070000000000007023726374015471 5ustar behanwbehanwsquidtaild-2.1a6.orig/config/squidtaild/0040750011460701146070000000000007023726374017634 5ustar behanwbehanwsquidtaild-2.1a6.orig/config/squidtaild/filters/0040750011460701146070000000000007023726374021304 5ustar behanwbehanwsquidtaild-2.1a6.orig/config/squidtaild/filters/probable0100640011460701146070000000011107023726374023004 0ustar behanwbehanwput some words in here make sure there are no spaces on a single line squidtaild-2.1a6.orig/config/squidtaild/filters/possible0100640011460701146070000000011107023726374023036 0ustar behanwbehanwput some words in here make sure there are no spaces on a single line squidtaild-2.1a6.orig/config/squidtaild/filters/definite0100640011460701146070000000011107023726374023005 0ustar behanwbehanwput some words in here make sure there are no spaces on a single line squidtaild-2.1a6.orig/config/squidtaild/filters/excludes0100640011460701146070000000011107023726374023032 0ustar behanwbehanwput some words in here make sure there are no spaces on a single line squidtaild-2.1a6.orig/config/squidtaild/squidtaild.conf0100750011460701146070000000376407061660401022646 0ustar behanwbehanw# squidtaild config file # URL where squidtaild will reference it's files url http://some.somecomputer.somewhere/squidtaild # Note the LACK of a trailing slash... # File where violations are logged htmldir /my/directory/for/squidtaild/ # Note the trailing slash... # Squid log file squidlog /var/log/squid/access.log # Enable Incremental mode (yes/no) incremental yes # Truncate URL's (yes/no) truncate_url yes # Size of truncated url (characters) url_length 50 # Status page refresh interval # (in seconds) refresh 60 # Lookup hostnames (yes/no) dnslookups yes ##################################################### # MailReporting # # Works only if sendmail is installed!!!! # ##################################################### # Enable mail reporting (yes/no) mailreport yes # Mailstyle ("text" = plain asci, "html" = HTML style) mailstyle html # Sendmail Program sendmail /usr/sbin/sendmail # Who should receive the reports mailrecipient somebody@somewhere.com ##################################################### # Filter File Locations # ##################################################### # Possible Filter file possible /etc/squidtaild/filters/possible # Probably Filter file probable /etc/squidtaild/filters/probable # Definite Filter file definite /etc/squidtaild/filters/definite # Excludes Filter file excludes /etc/squidtaild/filters/excludes ##################################################### # WinPopUps # # Works only if samba is installed # # and configured correctly!!!! # ##################################################### # Enable winpopups (yes/no) winpopups no # smbclient program smbclient /usr/bin/smbclient # Send winpopups to users (yes/no) winpopup_users no # Users winpopup message user_msg You have violated our policy! # Send winpopups to admin (yes/no) winpopup_admin no # Admin's winpopup message admin_msg A policy violation has just occurred! # Admin user's netbios name admin_computer admin_machine squidtaild-2.1a6.orig/perl_modules/0040750011460701146070000000000007061660212016704 5ustar behanwbehanwsquidtaild-2.1a6.orig/perl_modules/Readme.NOW0100640011460701146070000000023707061660226020473 0ustar behanwbehanwConfigReader works with both 5.004 and 5.005 Just go into the appropriate directories and issue the following: perl Makefile.PL make make test make install squidtaild-2.1a6.orig/perl_modules/ConfigReader-Simple-0.5/0040750011460701146070000000000007061661032022764 5ustar behanwbehanwsquidtaild-2.1a6.orig/perl_modules/ConfigReader-Simple-0.5/example.config0100640011460701146070000000010307023726374025607 0ustar behanwbehanw# A Comment Test1 Test 1 value Test2 Test 2 value #Faketest squidtaild-2.1a6.orig/perl_modules/ConfigReader-Simple-0.5/lib/0040750011460701146070000000000007023726374023543 5ustar behanwbehanwsquidtaild-2.1a6.orig/perl_modules/ConfigReader-Simple-0.5/lib/ConfigReader/0040750011460701146070000000000007023726374026073 5ustar behanwbehanwsquidtaild-2.1a6.orig/perl_modules/ConfigReader-Simple-0.5/lib/ConfigReader/Simple.pm0100640011460701146070000000716407023726374027670 0ustar behanwbehanwpackage ConfigReader::Simple; # # Simple interface to a configuration file # # ObLegalStuff: # Copyright (c) 1998 Bek Oberin. All rights reserved. This program is # free software; you can redistribute it and/or modify it under the # same terms as Perl itself. # # Last updated by gossamer on Thu Sep 3 22:01:47 EST 1998 # use strict; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK); require Exporter; @ISA = qw(Exporter); @EXPORT = qw(); @EXPORT_OK = qw(); $VERSION = "0.5"; my $DEBUG = 0; =head1 NAME ConfigReader::Simple - Simple configuration file parser =head1 SYNOPSIS use ConfigReader::Simple; $config = ConfigReader::Simple->new("configrc", [qw(Foo Bar Baz Quux)]); $config->parse(); =head1 DESCRIPTION C reads and parses simple configuration files. It's designed to be smaller and simpler than the C module and is more suited to simple configuration files. =cut ################################################################### # Functions under here are member functions # ################################################################### =head1 CONSTRUCTOR =item new ( FILENAME, DIRECTIVES ) This is the constructor for a new ConfigReader::Simple object. C tells the instance where to look for the configuration file. C is a reference to an array. Each member of the array should contain one valid directive. =cut sub new { my $prototype = shift; my $filename = shift; my $keyref = shift; my $class = ref($prototype) || $prototype; my $self = {}; $self->{"filename"} = $filename; $self->{"validkeys"} = $keyref; bless($self, $class); return $self; } # # destructor # sub DESTROY { my $self = shift; return 1; } =pod =item parse () This does the actual work. No parameters needed. =cut sub parse { my $self = shift; open(CONFIG, $self->{"filename"}) || die "Config: Can't open config file " . $self->{"filename"} . ": $!"; while () { chomp; next if /^\s*$/; # blank next if /^\s*#/; # comment my ($key, $value) = &parse_line($_); print STDERR "Key: '$key' Value: '$value'\n" if $DEBUG; if (&is_arraymember($key, $self->{"validkeys"})) { $self->{"config_data"}{$key} = $value; } else { die "Config: Invalid key '$key'\n"; } } close(CONFIG); return 1; } =pod =item get ( DIRECTIVE ) Returns the parsed value for that directive. =cut sub get { my $self = shift; my $key = shift; return $self->{"config_data"}{$key}; } sub parse_line { my $text = shift; my ($key, $value); if ($text =~ /^\s*(\w+)\s+(['"]?)(.*?)\2\s*$/) { $key = $1; $value = $3; } else { die "Config: Can't parse line: $text\n"; } return ($key, $value); } sub is_arraymember { my $value = shift; my $arrayref = shift; foreach (@$arrayref) { return 1 if $_ eq $value; } return 0; } =pod =head1 LIMITATIONS/BUGS Directives are case-sensitive. If a directive is repeated, the first instance will silently be ignored. Always die()s on errors instead of reporting them. C doesn't warn if used before C. C doesn't warn if you try to acces the value of an unknown directive not know (ie: one that wasn't passed via C). All these will be addressed in future releases. =head1 AUTHOR Bek Oberin =head1 COPYRIGHT Copyright (c) 1998 Bek Oberin. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut # # End code. # 1; squidtaild-2.1a6.orig/perl_modules/ConfigReader-Simple-0.5/example.pl0100750011460701146070000000047607023726374024774 0ustar behanwbehanw#!/usr/bin/perl -w # # Testing ConfigReader::Simple # # Last updated by gossamer on Tue Sep 1 22:43:42 EST 1998 # use ConfigReader::Simple; my $config = ConfigReader::Simple->new("./example.config", [qw(Test1 Test2)]); $config->parse(); print "The value for directive Test1 is: " . $config->get("Test1") . "\n"; squidtaild-2.1a6.orig/perl_modules/ConfigReader-Simple-0.5/MANIFEST0100640011460701146070000000014107023726374024120 0ustar behanwbehanwlib/ConfigReader/Simple.pm MANIFEST Makefile.PL README example.pl example.config test.pl Changes squidtaild-2.1a6.orig/perl_modules/ConfigReader-Simple-0.5/Makefile.PL0100640011460701146070000000124207023726374024744 0ustar behanwbehanw# # Skeleton Perl Makefile # # Last updated by gossamer on Wed Sep 2 13:52:39 EST 1998 # require 5; use strict; use ExtUtils::MakeMaker; WriteMakefile( 'NAME' => 'ConfigReader::Simple', 'VERSION_FROM' => 'lib/ConfigReader/Simple.pm', 'dist' => { COMPRESS => 'gzip -9f', SUFFIX => '.gz', }, ); sub MY::postamble { package MY; ' WEBDIR = /home/gossamer/websrc/docs/code WEB_FILELIST = $(WEBDIR)/file-list webdist: dist @$(MKPATH) $(WEBDIR)/$(DISTNAME)/ cp $(DISTVNAME).tar$(SUFFIX) $(WEBDIR)/$(DISTNAME)/ cp README $(WEBDIR)/$(DISTNAME)/$(DISTVNAME).README ' } squidtaild-2.1a6.orig/perl_modules/ConfigReader-Simple-0.5/Changes0100640011460701146070000000052107023726374024264 0ustar behanwbehanw New in 0.5 - Changed module name to ConfigReader::Simple to match up with other modules in CPAN better. New in 0.4 - Quote-delimiters now have to be matched, ie not 'foo" etc. New in 0.3 - Doesn't get confused by trailing whitespace - Copes with quote-delimited strings as long as they're all on the same line. squidtaild-2.1a6.orig/perl_modules/ConfigReader-Simple-0.5/test.pl0100750011460701146070000000041607023726374024312 0ustar behanwbehanw BEGIN { $| = 1; print "1..2\n"; } END {print "not ok 1\n" unless $loaded;} use ConfigReader::Simple; $loaded = 1; print "ok 1\n"; if(my $Config = ConfigReader::Simple->new("example.config", ["Test1", "Test2"])) { print "ok 2\n"; } else { print "not ok 2\n"; } squidtaild-2.1a6.orig/perl_modules/ConfigReader-Simple-0.5/README0100640011460701146070000000147207023726374023657 0ustar behanwbehanw ConfigReader::Simple Designed to be simpler than the ConfigReader module, firstly it seemed like overkill for what I wanted, and secondly I couldn't figure it out :) INSTALLING ========== After unzipping and untarring the distribution directory, you install the library by running these commands: perl Makefile.PL make make test make install OTHER STUFF =========== At this early stage (ie: I coded it last night) it's still got some major limitations/bugs - see the pod docs for details. And the 'make test' stuff is completely rudimentary. More will follow. Contacting me: gossamer@tertius.net.au is best. ObLegalStuff: Copyright (c) 1998 Bek Oberin. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. squidtaild-2.1a6.orig/perl_modules/ConfigReader-Simple-0.5/ConfigReader-Simple-0.5.readme0100640011460701146070000000147207023726374030235 0ustar behanwbehanw ConfigReader::Simple Designed to be simpler than the ConfigReader module, firstly it seemed like overkill for what I wanted, and secondly I couldn't figure it out :) INSTALLING ========== After unzipping and untarring the distribution directory, you install the library by running these commands: perl Makefile.PL make make test make install OTHER STUFF =========== At this early stage (ie: I coded it last night) it's still got some major limitations/bugs - see the pod docs for details. And the 'make test' stuff is completely rudimentary. More will follow. Contacting me: gossamer@tertius.net.au is best. ObLegalStuff: Copyright (c) 1998 Bek Oberin. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. squidtaild-2.1a6.orig/perl_modules/ConfigReader-Simple-0.5/blib/0040750011460701146070000000000007030174365023700 5ustar behanwbehanwsquidtaild-2.1a6.orig/perl_modules/ConfigReader-Simple-0.5/blib/lib/0040750011460701146070000000000007030174365024446 5ustar behanwbehanwsquidtaild-2.1a6.orig/perl_modules/ConfigReader-Simple-0.5/blib/lib/ConfigReader/0040750011460701146070000000000007030174366026777 5ustar behanwbehanwsquidtaild-2.1a6.orig/perl_modules/ConfigReader-Simple-0.5/blib/lib/ConfigReader/.exists0100640011460701146070000000000007026461140030275 0ustar behanwbehanwsquidtaild-2.1a6.orig/perl_modules/ConfigReader-Simple-0.5/blib/lib/ConfigReader/Simple.pm0100440011460701146070000000716407023726374030576 0ustar behanwbehanwpackage ConfigReader::Simple; # # Simple interface to a configuration file # # ObLegalStuff: # Copyright (c) 1998 Bek Oberin. All rights reserved. This program is # free software; you can redistribute it and/or modify it under the # same terms as Perl itself. # # Last updated by gossamer on Thu Sep 3 22:01:47 EST 1998 # use strict; use vars qw($VERSION @ISA @EXPORT @EXPORT_OK); require Exporter; @ISA = qw(Exporter); @EXPORT = qw(); @EXPORT_OK = qw(); $VERSION = "0.5"; my $DEBUG = 0; =head1 NAME ConfigReader::Simple - Simple configuration file parser =head1 SYNOPSIS use ConfigReader::Simple; $config = ConfigReader::Simple->new("configrc", [qw(Foo Bar Baz Quux)]); $config->parse(); =head1 DESCRIPTION C reads and parses simple configuration files. It's designed to be smaller and simpler than the C module and is more suited to simple configuration files. =cut ################################################################### # Functions under here are member functions # ################################################################### =head1 CONSTRUCTOR =item new ( FILENAME, DIRECTIVES ) This is the constructor for a new ConfigReader::Simple object. C tells the instance where to look for the configuration file. C is a reference to an array. Each member of the array should contain one valid directive. =cut sub new { my $prototype = shift; my $filename = shift; my $keyref = shift; my $class = ref($prototype) || $prototype; my $self = {}; $self->{"filename"} = $filename; $self->{"validkeys"} = $keyref; bless($self, $class); return $self; } # # destructor # sub DESTROY { my $self = shift; return 1; } =pod =item parse () This does the actual work. No parameters needed. =cut sub parse { my $self = shift; open(CONFIG, $self->{"filename"}) || die "Config: Can't open config file " . $self->{"filename"} . ": $!"; while () { chomp; next if /^\s*$/; # blank next if /^\s*#/; # comment my ($key, $value) = &parse_line($_); print STDERR "Key: '$key' Value: '$value'\n" if $DEBUG; if (&is_arraymember($key, $self->{"validkeys"})) { $self->{"config_data"}{$key} = $value; } else { die "Config: Invalid key '$key'\n"; } } close(CONFIG); return 1; } =pod =item get ( DIRECTIVE ) Returns the parsed value for that directive. =cut sub get { my $self = shift; my $key = shift; return $self->{"config_data"}{$key}; } sub parse_line { my $text = shift; my ($key, $value); if ($text =~ /^\s*(\w+)\s+(['"]?)(.*?)\2\s*$/) { $key = $1; $value = $3; } else { die "Config: Can't parse line: $text\n"; } return ($key, $value); } sub is_arraymember { my $value = shift; my $arrayref = shift; foreach (@$arrayref) { return 1 if $_ eq $value; } return 0; } =pod =head1 LIMITATIONS/BUGS Directives are case-sensitive. If a directive is repeated, the first instance will silently be ignored. Always die()s on errors instead of reporting them. C doesn't warn if used before C. C doesn't warn if you try to acces the value of an unknown directive not know (ie: one that wasn't passed via C). All these will be addressed in future releases. =head1 AUTHOR Bek Oberin =head1 COPYRIGHT Copyright (c) 1998 Bek Oberin. All rights reserved. This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. =cut # # End code. # 1; squidtaild-2.1a6.orig/perl_modules/ConfigReader-Simple-0.5/blib/lib/ConfigReader/example.pl0100550011460701146070000000047607023726374031000 0ustar behanwbehanw#!/usr/bin/perl -w # # Testing ConfigReader::Simple # # Last updated by gossamer on Tue Sep 1 22:43:42 EST 1998 # use ConfigReader::Simple; my $config = ConfigReader::Simple->new("./example.config", [qw(Test1 Test2)]); $config->parse(); print "The value for directive Test1 is: " . $config->get("Test1") . "\n"; squidtaild-2.1a6.orig/perl_modules/ConfigReader-Simple-0.5/blib/lib/auto/0040750011460701146070000000000007030174365025416 5ustar behanwbehanwsquidtaild-2.1a6.orig/perl_modules/ConfigReader-Simple-0.5/blib/lib/auto/ConfigReader/0040750011460701146070000000000007030174365027746 5ustar behanwbehanwsquidtaild-2.1a6.orig/perl_modules/ConfigReader-Simple-0.5/blib/lib/auto/ConfigReader/Simple/0040750011460701146070000000000007030174365031177 5ustar behanwbehanw././@LongLink0000000000000000000000000000014500000000000011565 Lustar rootrootsquidtaild-2.1a6.orig/perl_modules/ConfigReader-Simple-0.5/blib/lib/auto/ConfigReader/Simple/.existssquidtaild-2.1a6.orig/perl_modules/ConfigReader-Simple-0.5/blib/lib/auto/ConfigReader/Simple/.exist0100640011460701146070000000000007026461140032313 0ustar behanwbehanwsquidtaild-2.1a6.orig/perl_modules/ConfigReader-Simple-0.5/blib/arch/0040750011460701146070000000000007030174365024615 5ustar behanwbehanwsquidtaild-2.1a6.orig/perl_modules/ConfigReader-Simple-0.5/blib/arch/auto/0040750011460701146070000000000007030174365025565 5ustar behanwbehanwsquidtaild-2.1a6.orig/perl_modules/ConfigReader-Simple-0.5/blib/arch/auto/ConfigReader/0040750011460701146070000000000007030174365030115 5ustar behanwbehanwsquidtaild-2.1a6.orig/perl_modules/ConfigReader-Simple-0.5/blib/arch/auto/ConfigReader/Simple/0040750011460701146070000000000007030174365031346 5ustar behanwbehanw././@LongLink0000000000000000000000000000014600000000000011566 Lustar rootrootsquidtaild-2.1a6.orig/perl_modules/ConfigReader-Simple-0.5/blib/arch/auto/ConfigReader/Simple/.existssquidtaild-2.1a6.orig/perl_modules/ConfigReader-Simple-0.5/blib/arch/auto/ConfigReader/Simple/.exis0100640011460701146070000000000007026461140032276 0ustar behanwbehanwsquidtaild-2.1a6.orig/perl_modules/ConfigReader-Simple-0.5/Makefile0100640011460701146070000004131307061661032024424 0ustar behanwbehanw# This Makefile is for the ConfigReader::Simple extension to perl. # # It was generated automatically by MakeMaker version # 5.4302 (Revision: 1.222) from the contents of # Makefile.PL. Don't edit this file, edit Makefile.PL instead. # # ANY CHANGES MADE HERE WILL BE LOST! # # MakeMaker ARGV: () # # MakeMaker Parameters: # NAME => q[ConfigReader::Simple] # VERSION_FROM => q[lib/ConfigReader/Simple.pm] # dist => { COMPRESS=>q[gzip -9f], SUFFIX=>q[.gz] } # --- MakeMaker post_initialize section: # --- MakeMaker const_config section: # These definitions are from config.sh (via /usr/lib/perl5/5.00503/i386-linux/Config.pm) # They may have been overridden via Makefile.PL or on the command line AR = ar CC = cc CCCDLFLAGS = -fpic CCDLFLAGS = -rdynamic DLEXT = so DLSRC = dl_dlopen.xs LD = cc LDDLFLAGS = -shared -L/usr/local/lib LDFLAGS = -L/usr/local/lib LIBC = LIB_EXT = .a OBJ_EXT = .o OSNAME = linux OSVERS = 2.2.14-1mdksmp RANLIB = : SO = so EXE_EXT = # --- MakeMaker constants section: AR_STATIC_ARGS = cr NAME = ConfigReader::Simple DISTNAME = ConfigReader-Simple NAME_SYM = ConfigReader_Simple VERSION = 0.5 VERSION_SYM = 0_5 XS_VERSION = 0.5 INST_BIN = blib/bin INST_EXE = blib/script INST_LIB = blib/lib INST_ARCHLIB = blib/arch INST_SCRIPT = blib/script PREFIX = /usr INSTALLDIRS = site INSTALLPRIVLIB = $(PREFIX)/lib/perl5/5.00503 INSTALLARCHLIB = $(PREFIX)/lib/perl5/5.00503/i386-linux INSTALLSITELIB = $(PREFIX)/lib/perl5/site_perl/5.005 INSTALLSITEARCH = $(PREFIX)/lib/perl5/site_perl/5.005/i386-linux INSTALLBIN = $(PREFIX)/bin INSTALLSCRIPT = $(PREFIX)/bin PERL_LIB = /usr/lib/perl5/5.00503 PERL_ARCHLIB = /usr/lib/perl5/5.00503/i386-linux SITELIBEXP = /usr/lib/perl5/site_perl/5.005 SITEARCHEXP = /usr/lib/perl5/site_perl/5.005/i386-linux LIBPERL_A = libperl.a FIRST_MAKEFILE = Makefile MAKE_APERL_FILE = Makefile.aperl PERLMAINCC = $(CC) PERL_INC = /usr/lib/perl5/5.00503/i386-linux/CORE PERL = /usr/bin/perl FULLPERL = /usr/bin/perl VERSION_MACRO = VERSION DEFINE_VERSION = -D$(VERSION_MACRO)=\"$(VERSION)\" XS_VERSION_MACRO = XS_VERSION XS_DEFINE_VERSION = -D$(XS_VERSION_MACRO)=\"$(XS_VERSION)\" MAKEMAKER = /usr/lib/perl5/5.00503/ExtUtils/MakeMaker.pm MM_VERSION = 5.4302 # FULLEXT = Pathname for extension directory (eg Foo/Bar/Oracle). # BASEEXT = Basename part of FULLEXT. May be just equal FULLEXT. (eg Oracle) # ROOTEXT = Directory part of FULLEXT with leading slash (eg /DBD) !!! Deprecated from MM 5.32 !!! # PARENT_NAME = NAME without BASEEXT and no trailing :: (eg Foo::Bar) # DLBASE = Basename part of dynamic library. May be just equal BASEEXT. FULLEXT = ConfigReader/Simple BASEEXT = Simple PARENT_NAME = ConfigReader DLBASE = $(BASEEXT) VERSION_FROM = lib/ConfigReader/Simple.pm OBJECT = LDFROM = $(OBJECT) LINKTYPE = dynamic # Handy lists of source code files: XS_FILES= C_FILES = O_FILES = H_FILES = MAN1PODS = MAN3PODS = INST_MAN1DIR = blib/man1 INSTALLMAN1DIR = $(PREFIX)/man/man1 MAN1EXT = 1 INST_MAN3DIR = blib/man3 INSTALLMAN3DIR = $(PREFIX)/lib/perl5/man/man3 MAN3EXT = 3 PERM_RW = 644 PERM_RWX = 755 # work around a famous dec-osf make(1) feature(?): makemakerdflt: all .SUFFIXES: .xs .c .C .cpp .cxx .cc $(OBJ_EXT) # Nick wanted to get rid of .PRECIOUS. I don't remember why. I seem to recall, that # some make implementations will delete the Makefile when we rebuild it. Because # we call false(1) when we rebuild it. So make(1) is not completely wrong when it # does so. Our milage may vary. # .PRECIOUS: Makefile # seems to be not necessary anymore .PHONY: all config static dynamic test linkext manifest # Where is the Config information that we are using/depend on CONFIGDEP = $(PERL_ARCHLIB)/Config.pm $(PERL_INC)/config.h # Where to put things: INST_LIBDIR = $(INST_LIB)/ConfigReader INST_ARCHLIBDIR = $(INST_ARCHLIB)/ConfigReader INST_AUTODIR = $(INST_LIB)/auto/$(FULLEXT) INST_ARCHAUTODIR = $(INST_ARCHLIB)/auto/$(FULLEXT) INST_STATIC = INST_DYNAMIC = INST_BOOT = EXPORT_LIST = PERL_ARCHIVE = TO_INST_PM = example.pl \ lib/ConfigReader/Simple.pm PM_TO_BLIB = lib/ConfigReader/Simple.pm \ $(INST_LIB)/ConfigReader/Simple.pm \ example.pl \ $(INST_LIBDIR)/example.pl # --- MakeMaker tool_autosplit section: # Usage: $(AUTOSPLITFILE) FileToSplit AutoDirToSplitInto AUTOSPLITFILE = $(PERL) "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -e 'use AutoSplit;autosplit($$ARGV[0], $$ARGV[1], 0, 1, 1) ;' # --- MakeMaker tool_xsubpp section: # --- MakeMaker tools_other section: SHELL = /bin/sh CHMOD = chmod CP = cp LD = cc MV = mv NOOP = $(SHELL) -c true RM_F = rm -f RM_RF = rm -rf TEST_F = test -f TOUCH = touch UMASK_NULL = umask 0 DEV_NULL = > /dev/null 2>&1 # The following is a portable way to say mkdir -p # To see which directories are created, change the if 0 to if 1 MKPATH = $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e mkpath # This helps us to minimize the effect of the .exists files A yet # better solution would be to have a stable file in the perl # distribution with a timestamp of zero. But this solution doesn't # need any changes to the core distribution and works with older perls EQUALIZE_TIMESTAMP = $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Command -e eqtime # Here we warn users that an old packlist file was found somewhere, # and that they should call some uninstall routine WARN_IF_OLD_PACKLIST = $(PERL) -we 'exit unless -f $$ARGV[0];' \ -e 'print "WARNING: I have found an old package in\n";' \ -e 'print "\t$$ARGV[0].\n";' \ -e 'print "Please make sure the two installations are not conflicting\n";' UNINST=0 VERBINST=1 MOD_INSTALL = $(PERL) -I$(INST_LIB) -I$(PERL_LIB) -MExtUtils::Install \ -e "install({@ARGV},'$(VERBINST)',0,'$(UNINST)');" DOC_INSTALL = $(PERL) -e '$$\="\n\n";' \ -e 'print "=head2 ", scalar(localtime), ": C<", shift, ">", " L<", shift, ">";' \ -e 'print "=over 4";' \ -e 'while (defined($$key = shift) and defined($$val = shift)){print "=item *";print "C<$$key: $$val>";}' \ -e 'print "=back";' UNINSTALL = $(PERL) -MExtUtils::Install \ -e 'uninstall($$ARGV[0],1,1); print "\nUninstall is deprecated. Please check the";' \ -e 'print " packlist above carefully.\n There may be errors. Remove the";' \ -e 'print " appropriate files manually.\n Sorry for the inconveniences.\n"' # --- MakeMaker dist section: DISTVNAME = $(DISTNAME)-$(VERSION) TAR = tar TARFLAGS = cvf ZIP = zip ZIPFLAGS = -r COMPRESS = gzip -9f SUFFIX = .gz SHAR = shar PREOP = @$(NOOP) POSTOP = @$(NOOP) TO_UNIX = @$(NOOP) CI = ci -u RCS_LABEL = rcs -Nv$(VERSION_SYM): -q DIST_CP = best DIST_DEFAULT = tardist # --- MakeMaker macro section: # --- MakeMaker depend section: # --- MakeMaker cflags section: # --- MakeMaker const_loadlibs section: # --- MakeMaker const_cccmd section: # --- MakeMaker post_constants section: # --- MakeMaker pasthru section: PASTHRU = LIB="$(LIB)"\ LIBPERL_A="$(LIBPERL_A)"\ LINKTYPE="$(LINKTYPE)"\ PREFIX="$(PREFIX)"\ OPTIMIZE="$(OPTIMIZE)" # --- MakeMaker c_o section: # --- MakeMaker xs_c section: # --- MakeMaker xs_o section: # --- MakeMaker top_targets section: #all :: config $(INST_PM) subdirs linkext manifypods all :: pure_all manifypods @$(NOOP) pure_all :: config pm_to_blib subdirs linkext @$(NOOP) subdirs :: $(MYEXTLIB) @$(NOOP) config :: Makefile $(INST_LIBDIR)/.exists @$(NOOP) config :: $(INST_ARCHAUTODIR)/.exists @$(NOOP) config :: $(INST_AUTODIR)/.exists @$(NOOP) config :: Version_check @$(NOOP) $(INST_AUTODIR)/.exists :: /usr/lib/perl5/5.00503/i386-linux/CORE/perl.h @$(MKPATH) $(INST_AUTODIR) @$(EQUALIZE_TIMESTAMP) /usr/lib/perl5/5.00503/i386-linux/CORE/perl.h $(INST_AUTODIR)/.exists -@$(CHMOD) $(PERM_RWX) $(INST_AUTODIR) $(INST_LIBDIR)/.exists :: /usr/lib/perl5/5.00503/i386-linux/CORE/perl.h @$(MKPATH) $(INST_LIBDIR) @$(EQUALIZE_TIMESTAMP) /usr/lib/perl5/5.00503/i386-linux/CORE/perl.h $(INST_LIBDIR)/.exists -@$(CHMOD) $(PERM_RWX) $(INST_LIBDIR) $(INST_ARCHAUTODIR)/.exists :: /usr/lib/perl5/5.00503/i386-linux/CORE/perl.h @$(MKPATH) $(INST_ARCHAUTODIR) @$(EQUALIZE_TIMESTAMP) /usr/lib/perl5/5.00503/i386-linux/CORE/perl.h $(INST_ARCHAUTODIR)/.exists -@$(CHMOD) $(PERM_RWX) $(INST_ARCHAUTODIR) help: perldoc ExtUtils::MakeMaker Version_check: @$(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) \ -MExtUtils::MakeMaker=Version_check \ -e "Version_check('$(MM_VERSION)')" # --- MakeMaker linkext section: linkext :: $(LINKTYPE) @$(NOOP) # --- MakeMaker dlsyms section: # --- MakeMaker dynamic section: ## $(INST_PM) has been moved to the all: target. ## It remains here for awhile to allow for old usage: "make dynamic" #dynamic :: Makefile $(INST_DYNAMIC) $(INST_BOOT) $(INST_PM) dynamic :: Makefile $(INST_DYNAMIC) $(INST_BOOT) @$(NOOP) # --- MakeMaker dynamic_bs section: BOOTSTRAP = # --- MakeMaker dynamic_lib section: # --- MakeMaker static section: ## $(INST_PM) has been moved to the all: target. ## It remains here for awhile to allow for old usage: "make static" #static :: Makefile $(INST_STATIC) $(INST_PM) static :: Makefile $(INST_STATIC) @$(NOOP) # --- MakeMaker static_lib section: # --- MakeMaker manifypods section: manifypods : pure_all @$(NOOP) # --- MakeMaker processPL section: # --- MakeMaker installbin section: # --- MakeMaker subdirs section: # none # --- MakeMaker clean section: # Delete temporary files but do not touch installed files. We don't delete # the Makefile here so a later make realclean still has a makefile to use. clean :: -rm -rf ./blib $(MAKE_APERL_FILE) $(INST_ARCHAUTODIR)/extralibs.all perlmain.c mon.out core so_locations pm_to_blib *~ */*~ */*/*~ *$(OBJ_EXT) *$(LIB_EXT) perl.exe $(BOOTSTRAP) $(BASEEXT).bso $(BASEEXT).def $(BASEEXT).exp -mv Makefile Makefile.old $(DEV_NULL) # --- MakeMaker realclean section: # Delete temporary files (via clean) and also delete installed files realclean purge :: clean rm -rf $(INST_AUTODIR) $(INST_ARCHAUTODIR) rm -f $(INST_LIB)/ConfigReader/Simple.pm $(INST_LIBDIR)/example.pl rm -rf Makefile Makefile.old # --- MakeMaker dist_basics section: distclean :: realclean distcheck distcheck : $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Manifest=fullcheck \ -e fullcheck skipcheck : $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Manifest=skipcheck \ -e skipcheck manifest : $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Manifest=mkmanifest \ -e mkmanifest # --- MakeMaker dist_core section: dist : $(DIST_DEFAULT) @$(PERL) -le 'print "Warning: Makefile possibly out of date with $$vf" if ' \ -e '-e ($$vf="$(VERSION_FROM)") and -M $$vf < -M "Makefile";' tardist : $(DISTVNAME).tar$(SUFFIX) zipdist : $(DISTVNAME).zip $(DISTVNAME).tar$(SUFFIX) : distdir $(PREOP) $(TO_UNIX) $(TAR) $(TARFLAGS) $(DISTVNAME).tar $(DISTVNAME) $(RM_RF) $(DISTVNAME) $(COMPRESS) $(DISTVNAME).tar $(POSTOP) $(DISTVNAME).zip : distdir $(PREOP) $(ZIP) $(ZIPFLAGS) $(DISTVNAME).zip $(DISTVNAME) $(RM_RF) $(DISTVNAME) $(POSTOP) uutardist : $(DISTVNAME).tar$(SUFFIX) uuencode $(DISTVNAME).tar$(SUFFIX) \ $(DISTVNAME).tar$(SUFFIX) > \ $(DISTVNAME).tar$(SUFFIX)_uu shdist : distdir $(PREOP) $(SHAR) $(DISTVNAME) > $(DISTVNAME).shar $(RM_RF) $(DISTVNAME) $(POSTOP) # --- MakeMaker dist_dir section: distdir : $(RM_RF) $(DISTVNAME) $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Manifest=manicopy,maniread \ -e "manicopy(maniread(),'$(DISTVNAME)', '$(DIST_CP)');" # --- MakeMaker dist_test section: disttest : distdir cd $(DISTVNAME) && $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) Makefile.PL cd $(DISTVNAME) && $(MAKE) cd $(DISTVNAME) && $(MAKE) test # --- MakeMaker dist_ci section: ci : $(PERL) -I$(PERL_ARCHLIB) -I$(PERL_LIB) -MExtUtils::Manifest=maniread \ -e "@all = keys %{ maniread() };" \ -e 'print("Executing $(CI) @all\n"); system("$(CI) @all");' \ -e 'print("Executing $(RCS_LABEL) ...\n"); system("$(RCS_LABEL) @all");' # --- MakeMaker install section: install :: all pure_install doc_install install_perl :: all pure_perl_install doc_perl_install install_site :: all pure_site_install doc_site_install install_ :: install_site @echo INSTALLDIRS not defined, defaulting to INSTALLDIRS=site pure_install :: pure_$(INSTALLDIRS)_install doc_install :: doc_$(INSTALLDIRS)_install @echo Appending installation info to $(INSTALLARCHLIB)/perllocal.pod pure__install : pure_site_install @echo INSTALLDIRS not defined, defaulting to INSTALLDIRS=site doc__install : doc_site_install @echo INSTALLDIRS not defined, defaulting to INSTALLDIRS=site pure_perl_install :: @$(MOD_INSTALL) \ read $(PERL_ARCHLIB)/auto/$(FULLEXT)/.packlist \ write $(INSTALLARCHLIB)/auto/$(FULLEXT)/.packlist \ $(INST_LIB) $(INSTALLPRIVLIB) \ $(INST_ARCHLIB) $(INSTALLARCHLIB) \ $(INST_BIN) $(INSTALLBIN) \ $(INST_SCRIPT) $(INSTALLSCRIPT) \ $(INST_MAN1DIR) $(INSTALLMAN1DIR) \ $(INST_MAN3DIR) $(INSTALLMAN3DIR) @$(WARN_IF_OLD_PACKLIST) \ $(SITEARCHEXP)/auto/$(FULLEXT) pure_site_install :: @$(MOD_INSTALL) \ read $(SITEARCHEXP)/auto/$(FULLEXT)/.packlist \ write $(INSTALLSITEARCH)/auto/$(FULLEXT)/.packlist \ $(INST_LIB) $(INSTALLSITELIB) \ $(INST_ARCHLIB) $(INSTALLSITEARCH) \ $(INST_BIN) $(INSTALLBIN) \ $(INST_SCRIPT) $(INSTALLSCRIPT) \ $(INST_MAN1DIR) $(INSTALLMAN1DIR) \ $(INST_MAN3DIR) $(INSTALLMAN3DIR) @$(WARN_IF_OLD_PACKLIST) \ $(PERL_ARCHLIB)/auto/$(FULLEXT) doc_perl_install :: -@$(DOC_INSTALL) \ "Module" "$(NAME)" \ "installed into" "$(INSTALLPRIVLIB)" \ LINKTYPE "$(LINKTYPE)" \ VERSION "$(VERSION)" \ EXE_FILES "$(EXE_FILES)" \ >> $(INSTALLARCHLIB)/perllocal.pod doc_site_install :: -@$(DOC_INSTALL) \ "Module" "$(NAME)" \ "installed into" "$(INSTALLSITELIB)" \ LINKTYPE "$(LINKTYPE)" \ VERSION "$(VERSION)" \ EXE_FILES "$(EXE_FILES)" \ >> $(INSTALLARCHLIB)/perllocal.pod uninstall :: uninstall_from_$(INSTALLDIRS)dirs uninstall_from_perldirs :: @$(UNINSTALL) $(PERL_ARCHLIB)/auto/$(FULLEXT)/.packlist uninstall_from_sitedirs :: @$(UNINSTALL) $(SITEARCHEXP)/auto/$(FULLEXT)/.packlist # --- MakeMaker force section: # Phony target to force checking subdirectories. FORCE: @$(NOOP) # --- MakeMaker perldepend section: # --- MakeMaker makefile section: # We take a very conservative approach here, but it\'s worth it. # We move Makefile to Makefile.old here to avoid gnu make looping. Makefile : Makefile.PL $(CONFIGDEP) @echo "Makefile out-of-date with respect to $?" @echo "Cleaning current config before rebuilding Makefile..." -@$(RM_F) Makefile.old -@$(MV) Makefile Makefile.old -$(MAKE) -f Makefile.old clean $(DEV_NULL) || $(NOOP) $(PERL) "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" Makefile.PL @echo "==> Your Makefile has been rebuilt. <==" @echo "==> Please rerun the make command. <==" false # To change behavior to :: would be nice, but would break Tk b9.02 # so you find such a warning below the dist target. #Makefile :: $(VERSION_FROM) # @echo "Warning: Makefile possibly out of date with $(VERSION_FROM)" # --- MakeMaker staticmake section: # --- MakeMaker makeaperl section --- MAP_TARGET = perl FULLPERL = /usr/bin/perl $(MAP_TARGET) :: static $(MAKE_APERL_FILE) $(MAKE) -f $(MAKE_APERL_FILE) $@ $(MAKE_APERL_FILE) : $(FIRST_MAKEFILE) @echo Writing \"$(MAKE_APERL_FILE)\" for this $(MAP_TARGET) @$(PERL) -I$(INST_ARCHLIB) -I$(INST_LIB) -I$(PERL_ARCHLIB) -I$(PERL_LIB) \ Makefile.PL DIR= \ MAKEFILE=$(MAKE_APERL_FILE) LINKTYPE=static \ MAKEAPERL=1 NORECURS=1 CCCDLFLAGS= # --- MakeMaker test section: TEST_VERBOSE=0 TEST_TYPE=test_$(LINKTYPE) TEST_FILE = test.pl TEST_FILES = TESTDB_SW = -d testdb :: testdb_$(LINKTYPE) test :: $(TEST_TYPE) test_dynamic :: pure_all PERL_DL_NONLAZY=1 $(FULLPERL) -I$(INST_ARCHLIB) -I$(INST_LIB) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(TEST_FILE) testdb_dynamic :: pure_all PERL_DL_NONLAZY=1 $(FULLPERL) $(TESTDB_SW) -I$(INST_ARCHLIB) -I$(INST_LIB) -I$(PERL_ARCHLIB) -I$(PERL_LIB) $(TEST_FILE) test_ : test_dynamic test_static :: test_dynamic testdb_static :: testdb_dynamic # --- MakeMaker ppd section: # Creates a PPD (Perl Package Description) for a binary distribution. ppd: @$(PERL) -e "print qq{\n}. qq{\tConfigReader-Simple\n}. qq{\t\n}. qq{\t\n}. qq{\t\n}. qq{\t\t\n}. qq{\t\t\n}. qq{\t\t\n}. qq{\t\n}. qq{\n}" > ConfigReader-Simple.ppd # --- MakeMaker pm_to_blib section: pm_to_blib: $(TO_INST_PM) @$(PERL) "-I$(INST_ARCHLIB)" "-I$(INST_LIB)" \ "-I$(PERL_ARCHLIB)" "-I$(PERL_LIB)" -MExtUtils::Install \ -e "pm_to_blib({qw{$(PM_TO_BLIB)}},'$(INST_LIB)/auto')" @$(TOUCH) $@ # --- MakeMaker selfdocument section: # --- MakeMaker postamble section: WEBDIR = /home/gossamer/websrc/docs/code WEB_FILELIST = $(WEBDIR)/file-list webdist: dist @$(MKPATH) $(WEBDIR)/$(DISTNAME)/ cp $(DISTVNAME).tar$(SUFFIX) $(WEBDIR)/$(DISTNAME)/ cp README $(WEBDIR)/$(DISTNAME)/$(DISTVNAME).README # End. squidtaild-2.1a6.orig/perl_modules/ConfigReader-Simple-0.5/pm_to_blib0100640011460701146070000000000007030174366025006 0ustar behanwbehanwsquidtaild-2.1a6.orig/sbin/0040750011460701146070000000000007036611203015143 5ustar behanwbehanwsquidtaild-2.1a6.orig/sbin/squidtaild0100750011460701146070000012217607061660611017247 0ustar behanwbehanw#!/usr/bin/perl # squidtaild V2.1a6 # Written by Maurice Smiley # msmiley@gie.com # Gulf Interstate Engineering # 1700 West Loop South, Suite 600 # Houston, TX 77027 # --- Version info --- # squidtaild Version 2.1a3 # Trailer conversion to Perl by Maurice Smiley # of Gulf Interstate Engineering. # 11/01/99. # Hopefully it does justice to the work of the # original author, Stefan Folkerts. # 01/04/2000 - 2.1a4 # - Fixed excludes bug where only one item would be # excluded even though more than one item was listed. # - Matches are now case insensitive for all filters. # 01/10/2000 - 2.1a5 # - Added mailstyle configuration directive, allowing # users to choose between html and plaintext email # reporting. # 03/01/2000 - 2.1a6 # - Removed Proc::Daemon and replaced code with # stock Perl code. This should improve reliability, # as Proc::Daemon was just too finicky. Also, # people were having problems getting squidtaild # to work with it. It is GONE! # - Fixed writing the first entry in the log file # twice on startup. # - Fixed "list of violators" not being properly # updated after the initial run. # - Fixed non-functional pieces of the startup # script (/etc/rc.d/init.d/squidtaild). # - Fixed the detection of existing files while # in incremental mode, and reuses them. # - Moved some code to their own separate functions # to avoid duplication of effort. # - Added configuration directives, 'truncate_url' # and 'urllength' to allow the user to specify # how many characters of a url to display on # the status page. # - Added configuration directive 'dnslookups' # for ip address to hostname lookups. # Applied user submitted patch, fixing a typo # where 'mailto://' should have been 'mailto:' # --- End version info --- use Socket; use ConfigReader::Simple; ############################################# # Begin subroutines # ############################################# # # parse the log file subroutine # sub parse_log { $exclude_flag = 0; foreach $exc_filterword (@exc_filteredwords){ if ($location =~ /$exc_filterword/i){ $exclude_flag = 1; } } if ($exclude_flag ne 1) { foreach $def_filterword (@def_filteredwords) { if ($location =~ /$def_filterword/i) { if ($match ne "") { last; } else { $match = $location; } $violator{$ip_address} = "$ip_address\t"."$location\t"."$timedate\t"."red"; $def_ip_address = $ip_address; $def_location = $location; $def_num_violations += 1; $def_violation_date = scalar localtime ($timedate); # update the last_def file... $last_def_file = "/etc/squidtaild/last_definite"; open (LAST_DEF, "> $last_def_file") or die ("$0: Cannot open \"$last_def_file\": $!~\n"); select LAST_DEF; print "$def_ip_address\t$def_location\t$timedate\n"; select STDOUT; close LAST_DEF; # send the user or admin or both a popup message if ($winpopups eq "yes") { if ($winpopup_users eq "yes"){ $ip = inet_aton($def_ip_address); $fullname = (gethostbyaddr($ip, AF_INET))[0]; $_ = $fullname; ($hostname, $domain, $type) = split(/\./,$_,3); system "echo $user_msg | $smbclient -M $hostname"; } if ($winpopup_admin eq "yes"){ system "echo $admin_msg | $smbclient -M $admin_computer"; } } # send the administrator an email if ($mailreport eq "yes"){ if ($mailstyle eq "html"){ open (SM, "| $sendmail -bm -t"); select SM; print "To: $mailto\n"; print "Subject: squidtaild violation from $ip_address\n"; print "Content-Type: text/html;\n"; print "\n"; print "squidtaild violation alert\n"; print "

The following violation has just occurred:

\n"; print "

\n"; print "\n"; print ""; print ""; print ""; print ""; print ""; print "
Date/Time Occurred "; print "IP AddressURL
$def_violation_date $ip_address $location
\n"; print "

\n"; print "
\n"; print "

\n"; print "For a complete breakdown of all violations, see $url\n"; print "\n"; select STDOUT; close SM; } if ($mailstyle ne "html"){ open (SM, "| $sendmail -bm -t"); select SM; print "To: $mailto\n"; print "Subject: squidtaild violation from $ip_address\n"; print "\n"; print "The following violation has just occured:\n"; print "\n\n"; print "$def_violation_date --> $ip_address --> $location\n"; print "\n\n"; print "For a complete breakdown of all violations, see $url\n"; select STDOUT; close SM; } } # write an entry in the violations page... # but first, whack the entry... open (VIOLOG, "+<$violations_file") or die ("$0: Cannot open \"$violations_file\": $!~\n"); seek VIOLOG, -9, 2; select VIOLOG; print ""; print "$def_violation_date "; print " $ip_address"; print " $location"; print "\n"; print "\n"; select STDOUT; close VIOLOG; # write an entry in the definite violations page... # but first, whack the entry... open (DEFLOG, "+<$def_violations_file") or die ("$0: Cannot open \"$def_violations_file\": $!~\n"); seek DEFLOG, -9, 2; select DEFLOG; print "$def_violation_date $ip_address $location\n"; print "\n"; select STDOUT; close DEFLOG; # write an entry in the offender's file... $offender_file = "$htmldir"."$ip_address".".html"; # if the offender doesn't already have a file, set one up... if (! -f $offender_file){ open (OFFEND, ">$offender_file") or die ("$0: Cannot open \"$offender_file\": $!~\n"); chmod 0644, $offender_file; select OFFEND; print ""; print ""; print "Violations from $ip_address\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "

Violations from $ip_address

\n"; print "

Violations as of $start_date

\n"; print ""; print ""; print "
Date/Time Occurred URL
$def_violation_date> $location\n"; print "
\n"; select STDOUT; close OFFEND; } # if the offender already has a file, write some more... # but first, whack the entry... else { open (OFFEND, "+<$offender_file") or die ("$0: Cannot open \"$offender_file\": $!~\n"); seek OFFEND, -9, 2; select OFFEND; print " $def_violation_date $location\n"; print ""; select STDOUT; close OFFEND; } } } foreach $prob_filterword (@prob_filteredwords) { if ($location =~ /$prob_filterword/i) { if ($match ne "") { last; } else { $match = $location; } $violator{$ip_address} = "$ip_address\t"."$location\t"."$timedate\t"."yellow"; $prob_ip_address = $ip_address; $prob_location = $location; $prob_num_violations += 1; $prob_violation_date = scalar localtime ($timedate); # update the last_prob file... open (LAST_PROB, "> $last_prob_file") or die ("$0: Cannot open \"$last_prob_file\": $!~\n"); select LAST_PROB; print "$prob_ip_address\t$prob_location\t$timedate\n"; select STDOUT; close LAST_PROB; # write an entry in the violations page... # but first, whack the entry... open (VIOLOG, "+<$violations_file") or die ("$0: Cannot open \"$violations_file\": $!~\n"); seek VIOLOG, -9, 2; select VIOLOG; print ""; print " $prob_violation_date"; print " $ip_address"; print " $location"; print "\n"; print "\n"; select STDOUT; close VIOLOG; # write an entry in the probable violations page... # but first, whack the entry... open (PROBLOG, "+<$prob_violations_file") or die ("$0: Cannot open \"$prob_violations_file\": $!~\n"); seek PROBLOG, -9, 2; select PROBLOG; print "$prob_violation_date $ip_address $location\n"; print "\n"; select STDOUT; close PROBLOG; # write an entry in the offender's file... $offender_file = "$htmldir"."$ip_address".".html"; # if the offender doesn't already have a file, set one up... if (! -f $offender_file){ open (OFFEND, ">$offender_file") or die ("$0: Cannot open \"$offender_file\": $!~\n"); chmod 0644, $offender_file; select OFFEND; print ""; print ""; print "Violations from $ip_address\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "

Violations from $ip_address

\n"; print "

Violations as of $start_date

\n"; print ""; print ""; print "
Date/Time Occurred URL
$prob_violation_date $location\n"; print "
\n"; select STDOUT; close OFFEND; } # if the offender already has a file, write some more... # but first, whack the entry... else { open (OFFEND, "+<$offender_file") or die ("$0: Cannot open \"$offender_file\": $!~\n"); seek OFFEND, -9, 2; select OFFEND; print " $prob_violation_date $location\n"; print ""; select STDOUT; close OFFEND; } } } foreach $poss_filterword (@poss_filteredwords) { if ($location =~ /$poss_filterword/i) { if ($match ne "") { last; } else { $match = $location; } $violator{$ip_address} = "$ip_address\t"."$location\t"."$timedate\t"."green"; $poss_ip_address = $ip_address; $poss_location = $location; $poss_num_violations += 1; $poss_violation_date = scalar localtime ($timedate); # update the last_poss file... open (LAST_POSS, "> $last_poss_file") or die ("$0: Cannot open \"$last_poss_file\": $!~\n"); select LAST_POSS; print "$poss_ip_address\t$poss_location\t$timedate\n"; select STDOUT; close LAST_POSS; # write an entry in the violations page... # but first, whack the entry... open (VIOLOG, "+<$violations_file") or die ("$0: Cannot open \"$violations_file\": $!~\n"); seek VIOLOG, -9, 2; select VIOLOG; print ""; print "$poss_violation_date"; print " $ip_address"; print " $location"; print "\n"; print "\n"; select STDOUT; close VIOLOG; # write an entry in the possible violations page... # but first, whack the entry... open (POSSLOG, "+<$poss_violations_file") or die ("$0: Cannot open \"$poss_violations_file\": $!~\n"); seek POSSLOG, -9, 2; select POSSLOG; print "$poss_violation_date $ip_address $location\n"; print "\n"; select STDOUT; close POSSLOG; # write an entry in the offender's file... $offender_file = "$htmldir"."$ip_address".".html"; # if the offender doesn't already have a file, set one up... if (! -f $offender_file){ open (OFFEND, ">$offender_file") or die ("$0: Cannot open \"$offender_file\": $!~\n"); chmod 0644, $offender_file; select OFFEND; print ""; print ""; print "Violations from $ip_address\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "

Violations from $ip_address

\n"; print "

Violations as of $start_date

\n"; print ""; print ""; print "
Date/Time Occurred URL
$poss_violation_date $location\n"; print "
\n"; select STDOUT; close OFFEND; } # if the offender already has a file, write some more... # but first, whack the entry... else { open (OFFEND, "+<$offender_file") or die ("$0: Cannot open \"$offender_file\": $!~\n"); seek OFFEND, -9, 2; select OFFEND; print " $poss_violation_date $location\n"; print ""; select STDOUT; close OFFEND; } } } undef $match; } } # # update the status page subroutine # sub status_write { seek SQUIDLOG,0,1; # update the status page... $status_file = "$htmldir"."index.html"; $date = scalar localtime; # read from the history and last violations files, if incremental... if ($incremental eq "yes") { # get history... open (HISTORY, "< $history_file") or die ("$0: Cannot open \"$history_file\": $!~\n"); while (){ chop; ($last_timedate, $poss_num_violations, $prob_num_violations, $def_num_violations)= split(/\s+/); } close HISTORY; # read in last violations files... open (LAST_DEF, "$last_def_file") or die ("$0: Cannot open \"$last_def_file\": $!~\n"); while (){ chop; ($def_ip_address, $def_location, $def_vio_date) = split(/\s+/); $def_violation_date = scalar localtime($def_vio_date); } close LAST_DEF; open (LAST_PROB, "$last_prob_file") or die ("$0: Cannot open \"$last_prob_file\": $!~\n"); while (){ chop; ($prob_ip_address, $prob_location, $prob_vio_date) = split(/\s+/); $prob_violation_date = scalar localtime($prob_vio_date); } close LAST_PROB; open (LAST_POSS, "$last_poss_file") or die ("$0: Cannot open \"$last_poss_file\": $!~\n"); while (){ chop; ($poss_ip_address, $poss_location, $poss_vio_date) = split(/\s+/); $poss_violation_date = scalar localtime($poss_vio_date); } close LAST_POSS; } # update the violators file... @violators = values(%violator); open (VIOLATORS, "> $violators_file") or die ("$0: Cannot open \"$violators_file\": $!~\n"); foreach $offender (@violators){ select VIOLATORS; print "$offender\n"; } close VIOLATORS; $total_num_violations = ($poss_num_violations + $prob_num_violations + $def_num_violations); open (STATUS, ">$status_file") or die ("$0: Cannot open \"$status_file\": $!~\n"); chmod 0644, $status_file; select STATUS; print ""; print "squidtaild Status Page\n"; print "\n"; if ($refresh ne 0){ print "\n"; } print "\n"; print "\n"; print "

Squidtaild status as of $date

\n"; print "

\n"; print "Log file being watched is: $squidlog

\n"; print "Violations are being sent to: $mailto

\n"; print "

\n"; # # List of violation numbers and links to appropriate pages # print "\n"; print "\n"; print ""; print ""; print ""; print "\n"; print ""; if ($poss_num_violations > 0){ print ""; } else { print ""; } if ($prob_num_violations > 0){ print ""; } else { print ""; } if ($def_num_violations > 0){ print "\n"; } else { print ""; } print "
Breakdown of violations:
Total HitsPossible HitsProbable HitsDefinite Hits
$total_num_violations$poss_num_violationsNone$prob_num_violationsNone $def_num_violations
None
\n"; print "



\n"; print "


\n"; # # Last Green, Yellow, and Red violation with links to the appropriate pages # # lookup ip addresses if requested if ($dnslookups eq "yes"){ $ip = inet_aton($poss_ip_address); $fullname = (gethostbyaddr($ip, AF_INET))[0]; $_ = $fullname; ($hostname, $domain, $type) = split(/\./,$_,3); if ($hostname ne ""){ $dns_poss_ip_address=$hostname; } else { $dns_poss_ip_address=$poss_ip_address; } $ip = inet_aton($prob_ip_address); $fullname = (gethostbyaddr($ip, AF_INET))[0]; $_ = $fullname; ($hostname, $domain, $type) = split(/\./,$_,3); if ($hostname ne ""){ $dns_prob_ip_address=$hostname; } else { $dns_prob_ip_address=$prob_ip_address; } $ip = inet_aton($def_ip_address); $fullname = (gethostbyaddr($ip, AF_INET))[0]; $_ = $fullname; ($hostname, $domain, $type) = split(/\./,$_,3); if ($hostname ne ""){ $dns_def_ip_address=$hostname; } else { $dns_def_ip_address=$def_ip_address; } } else { $dns_poss_ip_address=$poss_ip_address; $dns_prob_ip_address=$prob_ip_address; $dns_def_ip_address=$prob_ip_address; } #truncate the GREEN, YELLOW, and RED urls if requested if ($truncate_url eq "yes") { $trunc_poss_location=substr($poss_location, 0, $url_length); $trunc_prob_location=substr($prob_location, 0, $url_length); $trunc_def_location=substr($def_location, 0, $url_length); if (length($trunc_poss_location) lt length($poss_location)){ $possdots="..."; } else { $possdots=""; } if (length($trunc_prob_location) lt length($prob_location)){ $probdots="..."; } else { $probdots=""; } if (length($trunc_def_location) lt length($def_location)){ $defdots="..."; } else { $defdots=""; } } else { $trunc_poss_location=$poss_location; $trunc_prob_location=$prob_location; $trunc_def_location=$def_location; } print "\n"; print "\n"; print "\n"; if ($poss_ip_address ne ""){ print "\n"; } else { print "\n"; } if ($prob_ip_address ne ""){ print "\n"; } else { print "\n"; } if ($def_ip_address ne ""){ print "\n"; } else { print "\n"; } print "
Last violation:
IP Address URLTime/Date
Possible $dns_poss_ip_address $trunc_poss_location$possdots $poss_violation_date
Possible None None None
Probable $dns_prob_ip_address $trunc_prob_location$probdots $prob_violation_date
Probable None None None
Definite $dns_def_ip_address $trunc_def_location$defdots $def_violation_date
Definite None None None
\n"; print "



\n"; print "


\n"; # # IP addresses of violators with their last violation listed # undef @violator; undef @violators; undef @offender; open (VIOLATORS, "< $violators_file") or die ("$0: Cannot open \"$violators_file\": $!~\n"); while (){ chop; ($violator_ip, $violator_location, $violator_date, $violator_color) = split(/\s+/); if ($violator_ip ne "Violator_IP"){ $violator{$violator_ip} = "$violator_ip\t"."$violator_location\t"."$violator_date\t"."$violator_color"; } } print "\n"; print "\n"; print ""; print "\n"; @violators = values(%violator); foreach $offender (@violators){ $_ = $offender; ($violator_ip, $violator_location, $violator_date, $violator_color) = split (/\t/); $violator_timedate = scalar localtime($violator_date); # lookup ip addresses if requested if ($dnslookups eq "yes"){ $ip = inet_aton($violator_ip); $fullname = (gethostbyaddr($ip, AF_INET))[0]; $_ = $fullname; ($hostname, $domain, $type) = split(/\./,$_,3); if ($hostname ne ""){ $dns_violator_ip=$hostname; } else { $dns_violator_ip=$violator_ip; } } else { $dns_violator_ip=$violator_ip; } #truncate the url if requested if ($truncate_url eq "yes") { $trunc_location=substr($violator_location, 0, $url_length); if (length($trunc_location) lt length($violator_location)){ $adddots="..."; } else { $adddots=""; } } else { $trunc_location=$violator_location; } print "\n"; } elsif ($violator_color eq "yellow"){ print "$dns_violator_ip\n"; } elsif ($violator_color eq "green"){ print "$dns_violator_ip\n"; } } select STATUS; print "
List of violators:
IP Address Last URL violationTime visited
"; if ($violator_color eq "red"){ print "$dns_violator_ip $trunc_location$adddots $violator_timedate
$trunc_location$adddots $violator_timedate
$trunc_location$adddots $violator_timedate
\n"; print "



\n"; print "


\n"; print "
For information please contact $mailto
\n"; select STDOUT; close STATUS; sleep 10; } sub violations_setup { open (VIOLOG, ">$violations_file") or die("$0: Cannot open \"$violations_file\" :$!~\n"); chmod 0644, $violations_file; select VIOLOG; print ""; print ""; print "Violations Page\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "

Violations Page

\n"; print "

Violations as of $start_date

\n"; print "\n"; print ""; select STDOUT; close VIOLOG; } sub poss_violations_setup { open (POSSLOG, ">$poss_violations_file") or die("$0: Cannot open \"$poss_violations_file\" :$!~\n"); chmod 0644, $poss_violations_file; select POSSLOG; print ""; print ""; print "Possible Violations Page\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "

Possible Violations Page

\n"; print "

Possible Violations as of $start_date

\n"; print "

Date/Time Occurred IP AddressURL
\n"; print ""; select STDOUT; close POSSLOG; } sub prob_violations_setup { open (PROBLOG, ">$prob_violations_file") or die("$0: Cannot open \"$prob_violations_file\" :$!~\n"); chmod 0644, $prob_violations_file; select PROBLOG; print ""; print ""; print "Probable Violations Page\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "

Probable Violations Page

\n"; print "

Probable Violations as of $start_date

\n"; print "

Date/Time Occurred IP AddressURL
\n"; print ""; select STDOUT; close PROBLOG; } sub def_violations_setup { open (DEFLOG, ">$def_violations_file") or die("$0: Cannot open \"$def_violations_file\" :$!~\n"); chmod 0644, $def_violations_file; select DEFLOG; print ""; print ""; print "Definite Violations Page\n"; print "\n"; print "\n"; print "\n"; print "\n"; print "

Definite Violations Page

\n"; print "

Definite Violations as of $start_date

\n"; print "

Date/Time Occurred IP AddressURL
\n"; print ""; select STDOUT; close DEFLOG; } sub last_poss_setup { open (LAST_POSS, "> $last_poss_file") or die ("$0: Cannot open \"$last_poss_file\": $!~\n"); select LAST_POSS; print "\n"; select STDOUT; close LAST_POSS; } sub last_prob_setup { open (LAST_PROB, "> $last_prob_file") or die ("$0: Cannot open \"$last_prob_file\": $!~\n"); select LAST_PROB; print "\n"; select STDOUT; close LAST_PROB; } sub last_def_setup { open (LAST_DEF, "> $last_def_file") or die ("$0: Cannot open \"$last_def_file\": $!~\n"); select LAST_DEF; print "\n"; select STDOUT; close LAST_DEF; } sub setup_violators_file { open (VIOLATORS, "> $violators_file") or die ("$0: Cannot open \"$violators_file\" :$!~\n"); select VIOLATORS; print "Violator_IP\tViolator_Location\tViolator_Date\tViolator_Color\n"; select STDOUT; close VIOLATORS; } sub setup_history_file { $poss_num_violations = 0; $prob_num_violations = 0; $def_num_violations = 0; open (HISTORY, "> $history_file") or die ("$0: Cannot open \"$history_file\" :$!~\n"); select HISTORY; print "0\t$poss_num_violations\t$prob_num_violations\t$def_num_violations\t0\n"; select STDOUT; close HISTORY; } ######################################### # End subroutines # ######################################### # Parse the config file... my $config = ConfigReader::Simple->new("/etc/squidtaild/squidtaild.conf", [qw(url htmldir squidlog mailreport mailstyle mailrecipient excludes possible probable definite sendmail incremental winpopups winpopup_users winpopup_admin smbclient admin_computer admin_msg user_msg truncate_url url_length refresh dnslookups)]); $config->parse(); $url = $config->get("url"); $htmldir = $config->get("htmldir"); $squidlog = $config->get("squidlog"); $excludes = $config->get("excludes"); $possible = $config->get("possible"); $probable = $config->get("probable"); $definite = $config->get("definite"); $sendmail = $config->get("sendmail"); $smbclient = $config->get("smbclient"); $incremental = $config->get("incremental"); $mailstyle = $config->get("mailstyle"); $truncate_url = $config->get("truncate_url"); $url_length = $config->get("url_length"); $refresh = $config->get("refresh"); $dnslookups = $config->get("dnslookups"); if ($incremental ne "yes"){ $mailreport = $config->get("mailreport"); $mailto = $config->get("mailrecipient"); $winpopups = $config->get("winpopups"); $winpopup_users = $config->get("winpopup_users"); $winpopup_admin = $config->get("winpopup_admin"); $admin_computer = $config->get("admin_computer"); $admin_msg = $config->get("admin_msg"); $user_msg = $config->get("user_msg"); } # setup a pid file... $pid_file = "/var/run/squidtaild.pid"; # Make sure we're not already running... if (-f $pid_file) { open (PID, "<$pid_file") or die("$0: Cannot open \"$pid_file\" :$!~\n"); while (){ chop; ($session_id) = split (/\n/); print "squidtaild appears to be already running --> PID $session_id\n"; print "If you're sure squidtaild is not running, whack (rm) $pid_file and try again\n"; } close PID; exit; } # Write a pid file if we're not already running... else { open (PID, ">$pid_file") or die("$0: Cannot open \"$pid_file\" :$!~\n"); $session_id = $$; select PID; print "$session_id\n"; select STDOUT; close PID; } # check for a history file... $history_file = "/etc/squidtaild/history"; if ($incremental eq "yes") { if (! -f $history_file){ &setup_history_file; } else { open (HISTORY, "< $history_file") or die ("$0: Cannot open \"$history_file\" :$!~\n"); while (){ ($last_timedate, $poss_num_violations, $prob_num_violations, $def_num_violations) = split(/\s+/); } } } else { &setup_history_file; } # check for a violators file... $violators_file = "/etc/squidtaild/violators"; if ($incremental eq "yes") { if (-f $violators_file) { open (VIOLATORS, "< $violators_file") or die ("$0: Cannot open \"$violators_file\": $!~\n"); while (){ chop; ($violator_ip, $violator_location, $violator_date, $violator_color) = split(/\s+/); if ($violator_ip ne "Violator_IP"){ $violator{$violator_ip} = "$violator_ip\t"."$violator_location\t"."$violator_date\t"."$violator_color"; } } } else { &setup_violators_file; } } else { &setup_violators_file; } # setup the violations page... $start_date = scalar localtime; $violations_file = "$htmldir"."violations.html"; if ($incremental eq "yes"){ if (-f $violations_file){ } else { &violations_setup; } } else { &violations_setup; } # setup the possible violations page... $poss_violations_file = "$htmldir"."possible_violations.html"; if ($incremental eq "yes"){ if (-f $poss_violations_file){ } else { &poss_violations_setup; } } else { &poss_violations_setup; } # setup the probable violations page... $prob_violations_file = "$htmldir"."probable_violations.html"; if ($incremental eq "yes"){ if (-f $prob_violations_file){ } else { &prob_violations_setup; } } else { &prob_violations_setup; } # setup the definite violations page... $def_violations_file = "$htmldir"."definite_violations.html"; if ($incremental eq "yes") { if (-f $def_violations_file){ } else { &def_violations_setup; } } else { &def_violations_setup; } # read the excludes filter file... open (FILTER, "<$excludes") or die("$0: Cannot open \"$excludes\" :$!~\n"); while(){ chop; ($keyword) = split (/\n/); if ($keyword ne ""){ $exc_filterword{$keyword} = $keyword; } else { break; } } if ($exc_filterword eq ""){ $keyword = "NO_EXCLUDES"; $exc_filterword{$keyword} = $keyword; } @exc_filteredwords = keys(%exc_filterword); close FILTER; # read the possible filter file... open (FILTER, "<$possible") or die("$0: Cannot open \"$possible\" :$!~\n"); while(){ chop; ($keyword) = split (/\n/); if ($keyword ne ""){ $poss_filterword{$keyword} = $keyword; } else { break; } } if ($poss_filterword eq ""){ $keyword = "NO_POSSIBLES"; $poss_filterword{$keyword} = $keyword; } @poss_filteredwords = keys(%poss_filterword); close FILTER; # read the probable filter file... open (FILTER, "<$probable") or die("$0: Cannot open \"$probable\" :$!~\n"); while(){ chop; ($keyword) = split (/\n/); if ($keyword ne ""){ $prob_filterword{$keyword} = $keyword; } else { break; } } if ($prob_filterword eq ""){ $keyword = "NO_PROBABLES"; $prob_filterword{$keyword} = $keyword; } @prob_filteredwords = keys(%prob_filterword); close FILTER; # read the definite filter file... open (FILTER, "<$definite") or die("$0: Cannot open \"$definite\" :$!~\n"); while(){ chop; ($keyword) = split (/\n/); if ($keyword ne ""){ $def_filterword{$keyword} = $keyword; } else { break; } } if ($def_filterword eq ""){ $keyword = "NO_DEFINITES"; $def_filterword{$keyword} = $keyword; } @def_filteredwords = keys(%def_filterword); close FILTER; # setup last hit files... $last_prob_file = "/etc/squidtaild/last_probable"; if ($incremental eq "yes") { if (-f $last_prob_file) { } else { &last_prob_setup; } } else { &last_prob_setup; } $last_def_file = "/etc/squidtaild/last_definite"; if ($incremental eq "yes") { if (-f $last_def_file) { } else { &last_def_setup; } } else { &last_def_setup; } $last_poss_file = "/etc/squidtaild/last_possible"; if ($incremental eq "yes") { if (-f $last_poss_file) { } else { &last_poss_setup; } } else { &last_poss_setup; } # main event loop open (SQUIDLOG, "<$squidlog") or die ("$0: Cannot open \"$squidlog\": $!~\n"); for (;;) { while () { chop; ($timedate, $unknown, $ip_address, $message, $code, $action, $location, $direct, $dash, $mime_type) = split (/\s+/); if ($incremental eq "yes"){ open (HISTORY, "< /etc/squidtaild/history") or die ("$0: Cannot open \"/etc/squidtaild/history\": $!~\n"); while(){ chop; ($last_timedate, $poss_violations, $prob_violations, $def_violations)= split(/\s+/); } close HISTORY; if ($timedate > $last_timedate){ open (HISTORY, "> /etc/squidtaild/history") or die ("$0: Cannot open \"/etc/squidtaild/history\": $!~\n"); $scalar_timedate = scalar localtime($timedate); select HISTORY; print "$timedate\t$poss_num_violations\t$prob_num_violations\t$def_num_violations\t$scalar_timedate\n"; select STDOUT; close HISTORY; &parse_log; } } else { open (HISTORY, "> /etc/squidtaild/history") or die ("$0: Cannot open \"/etc/squidtaild/history\": $!~\n"); $scalar_timedate = scalar localtime($timedate); select HISTORY; print "$timedate\t$poss_num_violations\t$prob_num_violations\t$def_num_violations\t$scalar_timedate\n"; select STDOUT; close HISTORY; &parse_log; } } if ($incremental eq "yes"){ $mailreport = $config->get("mailreport"); $mailto = $config->get("mailrecipient"); $winpopups = $config->get("winpopups"); $winpopup_users = $config->get("winpopup_users"); $winpopup_admin = $config->get("winpopup_admin"); $admin_computer = $config->get("admin_computer"); $admin_msg = $config->get("admin_msg"); $user_msg = $config->get("user_msg"); } &status_write; } squidtaild-2.1a6.orig/startup-script/0040750011460701146070000000000007023726374017230 5ustar behanwbehanwsquidtaild-2.1a6.orig/startup-script/squidtaild0100750011460701146070000000120107061660535021306 0ustar behanwbehanw#!/bin/sh # # Startup script for squidtaild # # chkconfig: 345 85 15 # description: squidtaild. It is used to monitor squidlogs \ # for violations. # processname: squidtaild # pidfile: /var/run/squidtaild.pid # config: /etc/squidtaild/squidtaild.conf # Source function library. . /etc/rc.d/init.d/functions # See how we were called. case "$1" in start) echo -n "Starting squidtaild: " /usr/sbin/squidtaild& echo ;; stop) echo -n "Shutting down squidtaild: " killproc squidtaild echo rm -f /var/run/squidtaild.pid ;; restart) $0 stop $0 start ;; *) echo "Usage: $0 {start|stop|restart}" exit 1 esac exit 0 squidtaild-2.1a6.orig/LICENSE.AGREEMENT0100640011460701146070000004305007033615553016534 0ustar behanwbehanw GNU GENERAL PUBLIC LICENSE Version 2, June 1991 Copyright (C) 1989, 1991 Free Software Foundation, Inc. 675 Mass Ave, Cambridge, MA 02139, USA Everyone is permitted to copy and distribute verbatim copies of this license document, but changing it is not allowed. Preamble The licenses for most software are designed to take away your freedom to share and change it. By contrast, the GNU General Public License is intended to guarantee your freedom to share and change free software--to make sure the software is free for all its users. This General Public License applies to most of the Free Software Foundation's software and to any other program whose authors commit to using it. (Some other Free Software Foundation software is covered by the GNU Library General Public License instead.) You can apply it to your programs, too. When we speak of free software, we are referring to freedom, not price. Our General Public Licenses are designed to make sure that you have the freedom to distribute copies of free software (and charge for this service if you wish), that you receive source code or can get it if you want it, that you can change the software or use pieces of it in new free programs; and that you know you can do these things. To protect your rights, we need to make restrictions that forbid anyone to deny you these rights or to ask you to surrender the rights. These restrictions translate to certain responsibilities for you if you distribute copies of the software, or if you modify it. For example, if you distribute copies of such a program, whether gratis or for a fee, you must give the recipients all the rights that you have. You must make sure that they, too, receive or can get the source code. And you must show them these terms so they know their rights. We protect your rights with two steps: (1) copyright the software, and (2) offer you this license which gives you legal permission to copy, distribute and/or modify the software. Also, for each author's protection and ours, we want to make certain that everyone understands that there is no warranty for this free software. If the software is modified by someone else and passed on, we want its recipients to know that what they have is not the original, so that any problems introduced by others will not reflect on the original authors' reputations. Finally, any free program is threatened constantly by software patents. We wish to avoid the danger that redistributors of a free program will individually obtain patent licenses, in effect making the program proprietary. To prevent this, we have made it clear that any patent must be licensed for everyone's free use or not licensed at all. The precise terms and conditions for copying, distribution and modification follow. GNU GENERAL PUBLIC LICENSE TERMS AND CONDITIONS FOR COPYING, DISTRIBUTION AND MODIFICATION 0. This License applies to any program or other work which contains a notice placed by the copyright holder saying it may be distributed under the terms of this General Public License. The "Program", below, refers to any such program or work, and a "work based on the Program" means either the Program or any derivative work under copyright law: that is to say, a work containing the Program or a portion of it, either verbatim or with modifications and/or translated into another language. (Hereinafter, translation is included without limitation in the term "modification".) Each licensee is addressed as "you". Activities other than copying, distribution and modification are not covered by this License; they are outside its scope. The act of running the Program is not restricted, and the output from the Program is covered only if its contents constitute a work based on the Program (independent of having been made by running the Program). Whether that is true depends on what the Program does. 1. You may copy and distribute verbatim copies of the Program's source code as you receive it, in any medium, provided that you conspicuously and appropriately publish on each copy an appropriate copyright notice and disclaimer of warranty; keep intact all the notices that refer to this License and to the absence of any warranty; and give any other recipients of the Program a copy of this License along with the Program. You may charge a fee for the physical act of transferring a copy, and you may at your option offer warranty protection in exchange for a fee. 2. You may modify your copy or copies of the Program or any portion of it, thus forming a work based on the Program, and copy and distribute such modifications or work under the terms of Section 1 above, provided that you also meet all of these conditions: a) You must cause the modified files to carry prominent notices stating that you changed the files and the date of any change. b) You must cause any work that you distribute or publish, that in whole or in part contains or is derived from the Program or any part thereof, to be licensed as a whole at no charge to all third parties under the terms of this License. c) If the modified program normally reads commands interactively when run, you must cause it, when started running for such interactive use in the most ordinary way, to print or display an announcement including an appropriate copyright notice and a notice that there is no warranty (or else, saying that you provide a warranty) and that users may redistribute the program under these conditions, and telling the user how to view a copy of this License. (Exception: if the Program itself is interactive but does not normally print such an announcement, your work based on the Program is not required to print an announcement.) These requirements apply to the modified work as a whole. If identifiable sections of that work are not derived from the Program, and can be reasonably considered independent and separate works in themselves, then this License, and its terms, do not apply to those sections when you distribute them as separate works. But when you distribute the same sections as part of a whole which is a work based on the Program, the distribution of the whole must be on the terms of this License, whose permissions for other licensees extend to the entire whole, and thus to each and every part regardless of who wrote it. Thus, it is not the intent of this section to claim rights or contest your rights to work written entirely by you; rather, the intent is to exercise the right to control the distribution of derivative or collective works based on the Program. In addition, mere aggregation of another work not based on the Program with the Program (or with a work based on the Program) on a volume of a storage or distribution medium does not bring the other work under the scope of this License. 3. You may copy and distribute the Program (or a work based on it, under Section 2) in object code or executable form under the terms of Sections 1 and 2 above provided that you also do one of the following: a) Accompany it with the complete corresponding machine-readable source code, which must be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, b) Accompany it with a written offer, valid for at least three years, to give any third party, for a charge no more than your cost of physically performing source distribution, a complete machine-readable copy of the corresponding source code, to be distributed under the terms of Sections 1 and 2 above on a medium customarily used for software interchange; or, c) Accompany it with the information you received as to the offer to distribute corresponding source code. (This alternative is allowed only for noncommercial distribution and only if you received the program in object code or executable form with such an offer, in accord with Subsection b above.) The source code for a work means the preferred form of the work for making modifications to it. For an executable work, complete source code means all the source code for all modules it contains, plus any associated interface definition files, plus the scripts used to control compilation and installation of the executable. However, as a special exception, the source code distributed need not include anything that is normally distributed (in either source or binary form) with the major components (compiler, kernel, and so on) of the operating system on which the executable runs, unless that component itself accompanies the executable. If distribution of executable or object code is made by offering access to copy from a designated place, then offering equivalent access to copy the source code from the same place counts as distribution of the source code, even though third parties are not compelled to copy the source along with the object code. 4. You may not copy, modify, sublicense, or distribute the Program except as expressly provided under this License. Any attempt otherwise to copy, modify, sublicense or distribute the Program is void, and will automatically terminate your rights under this License. However, parties who have received copies, or rights, from you under this License will not have their licenses terminated so long as such parties remain in full compliance. 5. You are not required to accept this License, since you have not signed it. However, nothing else grants you permission to modify or distribute the Program or its derivative works. These actions are prohibited by law if you do not accept this License. Therefore, by modifying or distributing the Program (or any work based on the Program), you indicate your acceptance of this License to do so, and all its terms and conditions for copying, distributing or modifying the Program or works based on it. 6. Each time you redistribute the Program (or any work based on the Program), the recipient automatically receives a license from the original licensor to copy, distribute or modify the Program subject to these terms and conditions. You may not impose any further restrictions on the recipients' exercise of the rights granted herein. You are not responsible for enforcing compliance by third parties to this License. 7. If, as a consequence of a court judgment or allegation of patent infringement or for any other reason (not limited to patent issues), conditions are imposed on you (whether by court order, agreement or otherwise) that contradict the conditions of this License, they do not excuse you from the conditions of this License. If you cannot distribute so as to satisfy simultaneously your obligations under this License and any other pertinent obligations, then as a consequence you may not distribute the Program at all. For example, if a patent license would not permit royalty-free redistribution of the Program by all those who receive copies directly or indirectly through you, then the only way you could satisfy both it and this License would be to refrain entirely from distribution of the Program. If any portion of this section is held invalid or unenforceable under any particular circumstance, the balance of the section is intended to apply and the section as a whole is intended to apply in other circumstances. It is not the purpose of this section to induce you to infringe any patents or other property right claims or to contest validity of any such claims; this section has the sole purpose of protecting the integrity of the free software distribution system, which is implemented by public license practices. Many people have made generous contributions to the wide range of software distributed through that system in reliance on consistent application of that system; it is up to the author/donor to decide if he or she is willing to distribute software through any other system and a licensee cannot impose that choice. This section is intended to make thoroughly clear what is believed to be a consequence of the rest of this License. 8. If the distribution and/or use of the Program is restricted in certain countries either by patents or by copyrighted interfaces, the original copyright holder who places the Program under this License may add an explicit geographical distribution limitation excluding those countries, so that distribution is permitted only in or among countries not thus excluded. In such case, this License incorporates the limitation as if written in the body of this License. 9. The Free Software Foundation may publish revised and/or new versions of the General Public License from time to time. Such new versions will be similar in spirit to the present version, but may differ in detail to address new problems or concerns. Each version is given a distinguishing version number. If the Program specifies a version number of this License which applies to it and "any later version", you have the option of following the terms and conditions either of that version or of any later version published by the Free Software Foundation. If the Program does not specify a version number of this License, you may choose any version ever published by the Free Software Foundation. 10. If you wish to incorporate parts of the Program into other free programs whose distribution conditions are different, write to the author to ask for permission. For software which is copyrighted by the Free Software Foundation, write to the Free Software Foundation; we sometimes make exceptions for this. Our decision will be guided by the two goals of preserving the free status of all derivatives of our free software and of promoting the sharing and reuse of software generally. NO WARRANTY 11. BECAUSE THE PROGRAM IS LICENSED FREE OF CHARGE, THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF ALL NECESSARY SERVICING, REPAIR OR CORRECTION. 12. IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MAY MODIFY AND/OR REDISTRIBUTE THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS), EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. END OF TERMS AND CONDITIONS Appendix: How to Apply These Terms to Your New Programs If you develop a new program, and you want it to be of the greatest possible use to the public, the best way to achieve this is to make it free software which everyone can redistribute and change under these terms. To do so, attach the following notices to the program. It is safest to attach them to the start of each source file to most effectively convey the exclusion of warranty; and each file should have at least the "copyright" line and a pointer to where the full notice is found. Copyright (C) 19yy This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 2 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. Also add information on how to contact you by electronic and paper mail. If the program is interactive, make it output a short notice like this when it starts in an interactive mode: Gnomovision version 69, Copyright (C) 19yy name of author Gnomovision comes with ABSOLUTELY NO WARRANTY; for details type `show w'. This is free software, and you are welcome to redistribute it under certain conditions; type `show c' for details. The hypothetical commands `show w' and `show c' should show the appropriate parts of the General Public License. Of course, the commands you use may be called something other than `show w' and `show c'; they could even be mouse-clicks or menu items--whatever suits your program. You should also get your employer (if you work as a programmer) or your school, if any, to sign a "copyright disclaimer" for the program, if necessary. Here is a sample; alter the names: Yoyodyne, Inc., hereby disclaims all copyright interest in the program `Gnomovision' (which makes passes at compilers) written by James Hacker. , 1 April 1989 Ty Coon, President of Vice This General Public License does not permit incorporating your program into proprietary programs. If your program is a subroutine library, you may consider it more useful to permit linking proprietary applications with the library. If this is what you want to do, use the GNU Library General Public License instead of this License. squidtaild-2.1a6.orig/README0100640011460701146070000001163207061660173015101 0ustar behanwbehanw Squidtaild readme 2.1 Alpha 6 (Perlized) 1) What is squidtaild 2) How does it work 3) How to install 4) Additional information 5) License agreement 1 - What is Squidtaild Squidtaild is a Squid proxy traffic monitoring program that gives the people managing the proxy server the ability to closely monitor the kind of pages his/her users should not be visiting. Squidtaild is a very fast, highly configurable Perl program that will dynamicly create html pages that display the violations that people made one or more of the filters you have applied to the squid proxy logging system. What is this good for? More and more companies and schools are implementing internet access in the networks. What does this do for productivity? To keep an eye on the amount of i.e porn, mp3, warez, etc. sites visited squidtaild is an ideal program. It can also track down possible company/school internet policily violators, it can warn them when they have violated a policy as well. 2 - How does it work First you design a set a filters the way you see fit. There are three filters, one being the green filter one being the yellow filter and the last being the red filter. A filter is nothing more than a file containing wildcards you want to be monitored in the URL's visited by the people using the proxyserver. An example for the filters: filter 'possilbe' (green) -------------------------- gambeling girls sexy etc -------------------------- filter 'probable' (yellow) -------------------------- porn mp3 etc -------------------------- filter 'definite' (red) -------------------------- hackingtools etc -------------------------- With these filters (being really strange in the example) squidtaild will filter out all new entry's in the access.log file (generated by Squid) and generate a nice html file as soon as a match is found. Squidtaild will generate a main page displaying the total amount of hits with each filter. You can click on this number and view all hits. It will display the last violation on each filter And it will also generate a list of all violators, these are all seperate pags that carry the name of the ip address by the violator and it's violation. Each violation is a hyperlink so you can easaly verify if a violation is indeed a violation. Requirements are: Squid proxy server with logging enabled http server of somekind to display pages Optional is: Samba client for sending messages email address to send violations to Sending us gratitude for the software 3 - How to install Installing Squidtaild can be done in two way's 1 - Using the 'install' script 2 - By hand The install script is very simple but should do the trick. We haven't heard any problems with it lately so it's probably safe. When installing by hand do the following The first thing to do is install the Perl modules needed for Squidtaild to work correctly. It's highly unlikely you allready have these installed on your system. so enter the 'perl-modules' directory and from there entry each directory seperatly and install the modules. After you have installed the perl modules it's time to install squidtaild, since it's a perl program there is no compiling to be done. Just enter the 'sbin' directory and copy the 'squidtaild' file to '/usr/sbin' or wherever you like having your executables. The last thing to do is make a directory called 'squidtaild' in your '/etc/' directory and copy the ENTIRE contense of the 'config' directory into '/etc/squidtaild/' (including the subdirectory 'config/squdtaild/filters') After this is done the configuration file needs to be set. open '/etc/squidtaild/squidtaild.conf' in your favorite editor and adjust the settings to your liking. (happens automaticly when using the install script) 4 - Additional Information Squidtaild has more options such as: - Mailing matches that occur - Sending sambaclient messages to the violator (Samba req. and configured correctly) - Sending sambaclient message to the administrator (Samba req. and configured correctly) - A exclude filter for suppressing hits on certain sites - Incremental check is optional Configuration file options: * HTML of plain ACSI mail reporting mailstyle text (this will send mail in asci mode) mailstyle html (this will send mail in HTML mode) * truncate_url & urllenght These options are used to specify the lenght of the url shown * status_refresh allows the user to specify the time (in secondes) between page refresh * dns_lookups makes squidtaild display hostname (if found by dns lookup) instead of ip adress The init.d scripts are writen for Redhat/Mandrake type systems, it may result in minor problems shutting down the program on other systems. For questions, comments or bug reports send an email to squidtaild@usa.net squidtaild-2.1a6.orig/install0100750011460701146070000000514507061661017015614 0ustar behanwbehanw# Squidtaild install script version 0.0.4 # 9 March - Stefan Folkerts - echo "" echo "Squidtaild installer version 0.0.4 -March 9 2000-" echo "Pressing enter will give you default [ ] values" echo "This will install Squidtaild Version 2.1a6" echo "" echo -n "Please enter directory to install the squidtail in [/usr/sbin] :" read install if [ "$install" = "" ] then cp sbin/squidtaild /usr/sbin/ echo "" if [ -e "/usr/sbin/squidtaild" ] then echo " * Squidtaild copied *" else echo "-ERROR- Squidtaild program NOT in place!!!!" fi echo "" else cp sbin/squidtaild "$install"/squidtaild echo "" if [ -e ""$install"/squidtaild" ] then echo "Squidtaild copied..." else echo "-ERROR- Squidtaild program NOT in place!!!!" echo "" fi fi echo -n "Enter directory to install startup-script in [/etc/rc.d/init.d] :" read startup if [ "$startup" = "" ] then cp startup-script/* /etc/rc.d/init.d/ if [ -e "/etc/rc.d/init.d/squidtaild" ] then echo "" echo " * Squidtaild init.d file copied *" else echo "" echo "-ERROR- squidtaild init.d file not in place!!!" fi echo "" else cp startup-script/* "$startup" if [ -e ""$startup"/squidtaild" ] then echo "" echo " * Squidtaild init.d file copied *" else echo "" echo "-ERROR- squidtaild init.d file not in place!!!" fi echo "" fi echo "Installing Squidtaild configuration files into /etc/squidtaild" if [ -d /etc/squidtaild ] then echo "Directory /etc/squidtaild exists, transfering files to directory." echo "" cp -rf config/squidtaild/* /etc/squidtaild/ else mkdir /etc/squidtaild cp -rf config/squidtaild/* /etc/squidtaild/ fi echo "Testing if squitaild configuration files are in place.." echo "" if [ -e "/etc/squidtaild/squidtaild.conf" ] then echo " * Squidtaild.conf file in place *" if [ -d "/etc/squidtaild/filters" ] then echo "" echo " * Squidtaild filters directory is in place *" else echo "-ERROR- Squidtaild filters directory is NOT in place!!!" fi else echo "-ERROR- squidtaild.conf file NOT in /etc/squidtaild dir!" fi echo "" echo "Installing Config Reader" cd perl_modules/ConfigReader-Simple-0.5 perl Makefile.PL make make test make install echo "Done.." echo "" echo "This should be all, it's time to configurate" echo "(Or press CTRL-BREAK to abort now)" sleep 4 vi /etc/squidtaild/squidtaild.conf squidtaild-2.1a6.orig/CHANGES0100640011460701146070000000053607061660311015207 0ustar behanwbehanw 2.1a6 03/09/2000 2.1a5 01/10/2000 - Added mailstyle option, user can now pick between HTML style mail and plain acsi mail 2.1a4 01/04/2000 - Fixed excludes bug where only one item would be excluded even though more than one item was listed - Matches are now case insensitive for all filters
Date/Time Occurred IP AddressURL