pax_global_header 0000666 0000000 0000000 00000000064 14063664366 0014530 g ustar 00root root 0000000 0000000 52 comment=db5352cfd5597e6c057114aa5f01da12492ddc9c
analog-ce-6.0.17/ 0000775 0000000 0000000 00000000000 14063664366 0013451 5 ustar 00root root 0000000 0000000 analog-ce-6.0.17/Licence.txt 0000664 0000000 0000000 00000045614 14063664366 0015566 0 ustar 00root root 0000000 0000000 Analog is copyright (c) Stephen R. E. Turner and other authors 1995 - 2004.
Analog CE is copyright (c) www.c-amie.co.uk and other authors 2007 - 2019.
This copyright and licence apply to all source code, compiled code,
documentation, graphics and auxiliary files, except where otherwise stated.
Analog is free software. You can redistribute it and/or modify it under the
terms of version 2 of the GNU General Public License, published by the Free
Software Foundation. This licence can be found below. Note that the program
is distributed without any warranty; without even the implied warranty of
merchantability or fitness for a particular purpose.
If you modify analog, you are encouraged to submit your changes to me for
possible inclusion in subsequent versions. If you distribute analog with a
book or a magazine or something like that, I'd be pleased to receive a copy.
Analog includes code from the bzip2, gd, pcre, png, unzip & zlib libraries, and
from FreeBSD. These portions of code are also subject to their own copyrights
and licensing conditions, which can be found in the analog docs directory in
files with names beginning with "Lic".
If you like analog, please consider making a donation towards its development
at http://www.c-amie.co.uk/software/analog/ . Thank you.
====== GNU GENERAL PUBLIC LICENSE STARTS HERE ======
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 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
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.
You can now run the program:
Only certain files Your organisation's home page
Although analog is free software, its distribution and modification are
covered by the terms of the GNU General Public
License. You are not required to accept this licence, but nothing else
gives you permission to modify or distribute the program. Analog comes with
no warranty.
Although analog is free, if you like it, please consider
making a donation towards its
development. Thank you.
This Readme describes analog 6.0. For the latest version of analog,
see the analog home page.
For examples of the output see
This Readme is split into several pages.
Beginners should start with the licence followed by
the section on Starting to use analog.
You can navigate through the Readme by using the links
within each page or the choices at the top and bottom of each page. There is
also a map showing the layout of the whole Readme, and
an index page.
You might also find the How-To's helpful;
these are descriptions by other authors of how to use analog for particular
tasks.
Now you can go to
Analog form interface
1. Report choices
N.B. This form will not work - e.g. the buttons may
not even appear - until you've configured it according to the instructions.
When you've configured it, you should remove this paragraph.
See the analog
home page for the meanings of the various reports.
Which reports do you want to see?
[On]
[Off] General Summary
[On]
[Off] Monthly Report
[On]
[Off] Weekly Report
[On]
[Off] Daily Summary
[On]
[Off] Daily Report
[On]
[Off] Hourly Summary
[On]
[Off] Domain Report
[On]
[Off] Organisation Report
[On]
[Off] Directory Report
[On]
[Off] File Type Report
[On]
[Off] Request Report
[On]
[Off] File Size Report
[On]
[Off] Referrer Report
[On]
[Off] Search Query Report
[On]
[Off] Search Word Report
[On]
[Off] Browser Summary
[On]
[Off] Operating System Report
[On]
[Off] Status Code Report
Or you can fill in the options below for individual reports.
You can use
bytes to mean 10 Megabytes; also
to mean the 50 items with the most bytes.
2. Detailed report options
Domain Report options
Sort the Domain Report
Include all domains with at least
Organisation Report options
Sort the Organisation Report
Include all organisations with at least
Directory Report options
Sort the Directory Report
Include all directories with at least
Request Report options
Sort the Request Report
Include all files with at least
Show
Referrer Report options
Sort the Referrer Report
Include all referrers with at least
3. Analysing only part of the logfile
Only certain dates
You can analyse only the requests from certain dates.
Enter the range of dates below in the from yymmdd;
e.g., 980301 for 1st March 1998 (or fill in just one box
to limit the range of dates on just one side).
From
to
Only look at the following files (list, separated by commas; can contain wild character *)
Ignore the following files
4. Layout
Your organisation's name (for the title of the page)
URL:
analog-ce-6.0.17/anlgform.pl 0000664 0000000 0000000 00000017471 14063664366 0015625 0 ustar 00root root 0000000 0000000 #!/usr/bin/perl -T
###
### analog 6.0 http://www.analog.cx/
### This program is copyright (c) Stephen R. E. Turner 1995 - 2004 except as
### stated otherwise.
###
### This program is free software. You can redistribute it and/or modify it
### under the terms of version 2 of the GNU General Public License, which you
### should have received with it.
###
### This program is distributed in the hope that it will be useful, but
### without any warranty, expressed or implied.
### Remember: Even the most carefully-designed CGI programs can accidentally
### have serious security bugs! See docs/form.html for notes on security
### design.
###
### anlgform.pl; the cgi front end for analog
# 1) uncomment (remove everything before $analog) and edit one of the next two
# lines to give the location (full pathname) of the analog executable.
# Unix: $analog = '/usr/local/etc/httpd/analog-6.0/analog';
# Windows: $analog = 'C:\program files\analog 6.0\analog.exe';
# 2) If you're on Unix, edit the first line in this file to give the location
# of Perl (don't remove the #! though).
# 3) You also need to edit anlgform.html if you want to use the form.
# 4) Add to the forbidden commands below if you want.
@forbidden = qw(LOGFORMAT APACHELOGFORMAT DEFAULTLOGFORMAT
APACHEDEFAULTLOGFORMAT HEADERFILE FOOTERFILE UNCOMPRESS
OUTFILE CACHEOUTFILE LOCALCHARTDIR ERRFILE DNS CGI
SETTINGS PROGRESSFREQ LANGFILE DESCFILE);
# Forbidden commands: sysadmin can add more (must be in upper case!)
# Other commands you might consider adding, because they allow users to
# specify which files to use for the analysis, are LOGFILE and DOMAINSFILE.
# If you add a command, you must also add any aliases it possesses.
# There is a discussion of all this in docs/form.html.
@allowed = qw();
# Allowed commands. If there are _any_ commands listed here, then _only_
# commands which are in @allowed, and not in @forbidden, can be used.
require 5.001;
use CGI;
# 1) INITIALISATION
# delete all dangerous environment variables
$ENV{PATH} = ''; # blank, not deleted, so that UNCOMPRESS doesn't get a path
delete @ENV{qw/IFS CDPATH ENV BASH_ENV/};
$query = new CGI;
$|=1;
$lt = localtime;
$progname = $0 || 'anlgform.pl';
if (($^O =~ /win32/i || $^O =~ /^win/i) && Win32::GetShortPathName($analog)) {
$analog = Win32::GetShortPathName($analog);
}
# coerce query keys to caps in a new (key, pointer to array) hash called args
# also remember the order the keys arrived in, as far as possible
foreach $p ($query->param) {
foreach $a ($query->param($p)) {
checkchars($a);
push(@order, "\U$p") unless ($args{"\U$p"});
push(@{$args{"\U$p"}}, $a);
}
}
# check LOGFILE and CACHEFILE only contain safe chars (see comments below)
checkfilechars("LOGFILE");
checkfilechars("CACHEFILE");
# 2) OPEN THE ANALOG PROCESS
# qv=1 causes args to go straight to stdout, not program
if (${$args{'QV'}}[-1] && !forbidden('QV')) {
print "Content-Type: text/plain\n\n";
open(ANALOG, ">-");
}
elsif (!$analog) {
badreq(500, "Program Incorrectly Configured",
"Can't run analog because anlgform.pl not set up properly.\n",
"See the server's error log for more details.");
print STDERR "[$lt] $progname: Can't run analog because the variable \$analog was not set: read the setup instructions!\n";
die;
}
elsif (!(-x $analog)) {
badreq(500, "Program Incorrectly Configured", "Can't run analog.",
"See the server's error log for more details.");
print STDERR "[$lt] $progname: Can't run analog because \"$analog\" not found or not executable";
print STDERR ": $!" if ($!);
print STDERR ".\n";
die;
}
else {
open (ANALOG, "|$analog +g-"); # errors here will get caught on close
}
# 3) PRINT ALL THE COMMANDS
# Special cases: must come first
printargs('CG', 'CONFIGFILE') unless forbidden('CG');
# both 'CG' and 'CONFIGFILE' must be allowed for this to happen.
print ANALOG "CGI ON\nDNS NONE\nWARNINGS FL\n";
printargs('WARNINGS');
printargs('LOGTIMEOFFSET');
foreach $k (@order) {
printargs($k)
unless($k eq 'QV' || $k eq 'CG' || $k eq 'CM' || $k =~ /FLOORB$/ ||
$k =~ /2$/ || $k =~ '^LOGTIMEOFFSET' || $k =~ '^WARNINGS' ||
# commands dealt with elsewhere
$k =~ /[^A-Z12]/ || $k eq '' || $k =~ /^IGNORE/);
# other stuff not wanted
}
# Special cases: must come last
print ANALOG "DEBUG -C\n";
printargs('CM', 'CONFIGFILE') unless forbidden('CM');
# again, both 'CM' and 'CONFIGFILE' must be allowed for this to happen.
print ANALOG "OUTFILE stdout\n";
# 4) WAIT FOR PROCESS TO FINISH. THAT'S IT.
unless (close(ANALOG)) {
badreq(500, "Program Failure",
"Analog failed to run or returned an error code.",
"Maybe your server's error log will give a clue why.");
print STDERR "[$lt] $progname: \"$analog\" failed to run or returned an error code";
print STDERR ": $!" if ($!);
print STDERR ".\n";
die;
}
### SUBROUTINES
# A) IS A GIVEN COMMAND FORBIDDEN?
sub forbidden {
return (grep($_[0] eq $_, @forbidden) ||
(@allowed && !grep($_[0] eq $_, @allowed)));
}
# B) PRINT ONE COMMAND
sub printargs {
my($is_floora) = 0;
my($is_12) = 0;
my($name) = $_[1] || $_[0];
if ($name =~ /FLOORA$/) {
chop($name);
$is_floora = 1;
}
elsif ($name =~ /1$/) {
chop($name);
$is_12 = 1;
}
return if forbidden($name);
if ($is_floora) {
$a = ${$args{$name . 'A'}}[-1]; # last "FLOORA=$a" form arg specified
$b = ${$args{$name . 'B'}}[-1];
print ANALOG ("$name $a$b\n") if ($b ne '' && $b !~ /\\$/);
# could bracket $a$b, but no help because any special character in a
# FLOOR command is junk anyway.
}
elsif ($is_12) {
$a = ${$args{$name . '1'}}[-1];
$b = ${$args{$name . '2'}}[-1];
print ANALOG ("$name ", bracket($a), " ", bracket($b), "\n")
if ($b ne '');
}
else {
foreach $a (@{$args{$_[0]}}) { # run through all "NAME=$a" form args
if ($a ne '') {
print ANALOG ("$name ", bracket($a), "\n");
print ANALOG ("DNS READ\n") if ($name eq 'DNSFILE');
}
}
}
}
# C) PUT APPROPRIATE DELIMITERS ROUND AN ARGUMENT CONTAINING SPACES
sub bracket {
local $_ = $_[0];
return $_ unless (/[\s\#]/ || /^['"\(]/ || /\\$/);
return "\"$_\"" unless (/"/);
return "'$_'" unless (/'/);
return "($_)";
# analog has no syntax if string contains ) as well as space, ' and "
}
# D) CHECK ONLY SAFE CHARACTERS in LOGFILEs and CACHEFILEs. See docs/form.html.
sub checkfilechars {
local ($_);
foreach (@{$args{$_[0]}}, @{$args{$_[0] . '1'}}) {
if (m([^\w\. /\\:\-\*\?]) || m(\B-|-\B)) {
# i.e. contains a non-approved character, or a dash not
# between \w's. NB \w includes underscore.
badreq(403, "Illegal Request", "Unsafe characters in $_[0].");
printf STDERR "[$lt] $progname: Unsafe characters in \"$_[0] $_\" on request from %s\n", $ENV{REMOTE_HOST}?$ENV{REMOTE_HOST}:($ENV{REMOTE_ADDR}?$ENV{REMOTE_ADDR}:"unknown host");
die;
}
}
}
# E) CHECK NO UNSAFE CHARACTERS IN OTHER COMMANDS. Again, see docs/form.html.
sub checkchars {
local $_ = $_[0];
if (/[\x00-\x1F\x7F-\x9F]/) {
printf STDERR "[$lt] $progname: Unsafe characters in \"\U$p\E $_\" on request from %s\n", $ENV{REMOTE_HOST}?$ENV{REMOTE_HOST}:($ENV{REMOTE_ADDR}?$ENV{REMOTE_ADDR}:"unknown host");
# Translate dangerous characters to avoid cross-site scripting
$p =~ s/&/&/;
$p =~ s/</;
$p =~ s/>/>/;
$p =~ s/"/"/;
badreq(403, "Illegal Request", "Unsafe characters in \U$p.");
die;
}
}
# F) PRINT OUT ERROR MESSAGE
sub badreq {
my($i);
print "Content-Type: text/html\n";
print "Status: $_[0] $_[1]\n\n";
print '';
print "\n$_[1]
\n";
for ($i = 2; defined($_[$i]); $i++) {
print "
" if ($i >= 3);
print "$_[$i]\n";
}
print "\n";
}
analog-ce-6.0.17/docs/ 0000775 0000000 0000000 00000000000 14063664366 0014401 5 ustar 00root root 0000000 0000000 analog-ce-6.0.17/docs/LicBSD.txt 0000664 0000000 0000000 00000003412 14063664366 0016202 0 ustar 00root root 0000000 0000000 The function memmove() in utils.c is derived from the FreeBSD 2.2.6 source,
and comes with the following copyright notice:
/*
* Copyright (c) 1990, 1993
* The Regents of the University of California. All rights reserved.
*
* This code is derived from software contributed to Berkeley by
* Chris Torek.
*
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
* 1. Redistributions of source code must retain the above copyright
* notice, this list of conditions and the following disclaimer.
* 2. Redistributions in binary form must reproduce the above copyright
* notice, this list of conditions and the following disclaimer in the
* documentation and/or other materials provided with the distribution.
* 3. Neither the name of the University nor the names of its contributors
* may be used to endorse or promote products derived from this software
* without specific prior written permission.
*
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE.
*/
analog-ce-6.0.17/docs/Licbzip2.txt 0000664 0000000 0000000 00000003312 14063664366 0016617 0 ustar 00root root 0000000 0000000 This program, "bzip2" and associated library "libbzip2", are
copyright (C) 1996-2002 Julian R Seward. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. The origin of this software must not be misrepresented; you must
not claim that you wrote the original software. If you use this
software in a product, an acknowledgment in the product
documentation would be appreciated but is not required.
3. Altered source versions must be plainly marked as such, and must
not be misrepresented as being the original software.
4. The name of the author may not be used to endorse or promote
products derived from this software without specific prior written
permission.
THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS
OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY
DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE
GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
Julian Seward, Cambridge, UK.
jseward@acm.org
bzip2/libbzip2 version 1.0.2 of 30 December 2001
analog-ce-6.0.17/docs/Licence.txt 0000664 0000000 0000000 00000046142 14063664366 0016513 0 ustar 00root root 0000000 0000000 Analog is copyright (c) Stephen R. E. Turner and other authors 1995 - 2004.
Analog CE is copyright (c) www.c-amie.co.uk and other authors 2007 - 2019.
This copyright and licence apply to all source code, compiled code,
documentation, graphics and auxiliary files, except where otherwise stated.
Analog is free software. You can redistribute it and/or modify it under the
terms of version 2 of the GNU General Public License, published by the Free
Software Foundation. This licence can be found below. Note that the program
is distributed without any warranty; without even the implied warranty of
merchantability or fitness for a particular purpose.
If you modify analog, you are encouraged to submit your changes to me for
possible inclusion in subsequent versions. If you distribute analog with a
book or a magazine or something like that, I'd be pleased to receive a copy.
Analog includes code from the bzip2, gd, pcre, png, unzip & zlib libraries, and
from FreeBSD. These portions of code are also subject to their own copyrights
and licensing conditions, which can be found in the analog docs directory in
files with names beginning with "Lic".
If you like Analog CE, please consider making a donation towards its
development at http://www.c-amie.co.uk/software/analog/ . Thank you.
Stephen R. E. Turner C:Amie
Cambridge, England England
https://www.c-amie.co.uk/
19 December 2004 24 April 2019
====== GNU GENERAL PUBLIC LICENSE STARTS HERE ======
GNU GENERAL PUBLIC LICENSE
Version 2, June 1991
Copyright (C) 1989, 1991 Free Software Foundation, Inc.
59 Temple Place, Suite 330, Boston, MA 02111-1307 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
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.
Analog CE 6.0: Introduction
Analog is a program which analyses logfiles from WWW servers. It works on
almost any operating system. It is designed to be fast and to produce
accurate and attractive statistics: and combined with
Report Magic, you
can generate
even
prettier reports. It's free software.
Go to the Analog CE home page.
19 December 2004
Thanks are due to the author of getstats, Kevin Hughes. In the days before analog there were only three serious logfile analysis programs, and only one of them, getstats, had attractive output. I wrote analog when getstats stopped being able to cope with the size of our logfile, but my output was based on his, and still shows its parentage.
Thanks are also due to all those who helped in the early stages of writing this program, and gave me the encouragement to continue with analog and to release it publicly. Those who made helpful suggestions during the first few weeks of the program are numerous, but I must mention particularly Dan Anderson, Martyn Johnson, Joe Ramey, Chris Ritson, Quentin Stafford-Fraser and Dave Stanworth. Above all Gareth McCaughan gave me lots of programming advice. The early versions of the program would have run much more slowly without him.
My employer, ClickTracks, kindly let me continue to develop analog while I am working for them. More than that -- they even let me incorporate some code developed for ClickTracks into analog!
For six years, analog's home page was at my previous employer, the University of Cambridge Statistical Laboratory. Now it is provided by SourceForge. niccx.com donated the address analog.cx, and Takayuki Matsuki of Tokyo Kasei University and Peter Gradwell of gradwell dot com ltd provide DNS services.
meer.net very kindly provide the mailing lists for analog, as well as a mailbox for the analog-author mail. Thank you too to Aengus for administering the mailing lists, GMane for turning them into newsgroups, and all the services who provide list archives.
Thanks to Ian Jackson for providing official FTP and rsync sites for analog, and for hosting the old versions of the documentation. Many other people have provided mirror sites for analog, starting with Dave Stanworth (again!). The full list of mirror sites is listed elsewhere; thanks to all of them.
Mark Roedel first suggested porting analog to different platforms, and made the original DOS port. Shortly afterwards, Jason Linhart made the Mac port, and has continued to contribute lots of extra code for that platform and for the program in general. The Mac version also includes code contributed by Stephan Somogyi and Nigel Perry. Later ports were made by Dave Jones, Martin Zinser & Rick Dyson (OpenVMS), Magnus Hagander (Win32), Ivan Martinez (OS/2), Nick Smith & Stefan Bellon (RISC OS), Scott Tadman & Rob Judd (BeOS), Thomas Engel (NeXTSTEP), Martin Kraemer & Holger Schranz (BS2000/OSD, including EBCDIC support), and Hideyuki Yahagi (AS/400). Thank you also to the people who make precompiled versions available for various platforms.
The regular expression parsing is taken from Philip Hazel's PCRE library. The graphics use Thomas Boutell's gd library, the libpng library, and the zlib library by Jean-loup Gailly & Mark Adler. Logfile decompression uses the zlib library, Gilles Vollant's unzip library and Julian Seward's bzip2 library. Each of these libraries is subject to its own copyright and licensing conditions: PCRE licence, gd licence, libpng licence, zlib licence, unzip licence, bzip2 licence. If NEED_MEMMOVE is defined at compile time, then this product includes software developed by the University of California, Berkeley and its contributors (licence).
The XML output style was written by Per Jessen. The form interface is based on an idea by James Dean Palmer. The code to expand wildcards in directory names under Unix is by Owen Cliffe. Thanks to all the other people who have contributed bits of code too: I apologise for not having room to name all of them.
Thanks also to those who have written helper applications, for making analog more usable, and to those who have written How-To's, for sharing their experience of how to use analog in practical situations. And thanks to Alexander Toth for the Unix man page.
Many people have volunteered to translate analog into their own languages. Many thanks to the following who have contributed in this way over the years: Tigran Nazarian (Armenian), Jon Otegi (Basque), Emir Alikadic (Bosnian), Luchezar Georgiev (Bulgarian), Francesc Rocher, M. Mercè Llauge, Francesc Burrull i Mestres & Jordi Vidal (Catalan), Yang Meng & Che Dong (Simplified Chinese), Andrew Choi & Tzu-hsien Yu (Traditional Chinese), Tomo Sombolac (Croatian), Jan Simek & Karel Fajkus (Czech), Adrian Price (Danish), Ferry van het Groenewoud, Joost Baaij, Dimitry Smagghe, Bert Hiddink & Frank Fesevur (Dutch), Henrik Huhtinen, Steve Kelly, Andrew Staples, Mikko Silvonen, Juha Ojaniemi & Markus Peuhkuri (Finnish), Patrice Lafont, Lucien Vieira, Jean-Marc Coursimault, Lionel Delaude & Gordon Macpherson (French), Mario Ellebrecht, Martin Kraemer, Holger Schranz, Thomas Jacob, Thomas Frings, Georg Schwarz, Ralf Döring & Gustaf Mossakowski (German), Dimitris Xenakis (Greek), Laszlo Nemeth & Andras Kemeny (Hungarian), Gustaf Gustafsson & Valberg Larusson (Icelandic), Haris Hasanudin (Indonesian), Furio Ercolessi, Luca Andreucci, Alessio Bragadini & Marco Bernardini (Italian), Takayuki Matsuki, Stephen Obenski, Motonobu Takahashi, Kaori Chikenji & Kazuto Ishigaki (Japanese), Byungkwan Kim & InChang Oh (Korean), Jurijs Turjanskis & Anda Bimbere (Latvian), Ingrid (Lithuanian), Jan-Aage Bruvoll, Espen Bjarnø & Pål Løberg (Norwegian Bokmål), Magni Onsøien & Trond Øksendal (Norwegian Nynorsk), Wlodek Lapot, Tomek Wozniak & Marcin Sochacki (Polish), Ivan Martinez, Paulino Michelazzo & Ronan Lucio Pereira (Brazilian Portuguese), Jaime Carvalho e Silva (European Portuguese), Alex Mihaila (Romanian), San Sanych Timofeev, Boris Litvinenko, Vyacheslav Nikitich, Oleg Philon & Denis Zhukov (Russian), Mile Peric (Serbian), Stefan Billik & Dusan Zervan (Slovak), Andrej Zizmond & Dalibor Cvijetinoviè (Slovene), Javier Solis, Alexander Velasquez, Alfredo Sola, Martin Perez, Nelson Tactuk, Javier Kohan & J. L. García (Spanish), Björn Malmberg, Frank Osterberg, Wesley Schaal & Christian Rose (Swedish), Nezih Erkman & Dikran Diragormacioglu (Turkish), and Yaroslav Boychuk (Ukrainian).
Finally, thanks to all of you for using the program!
Stephen Turner
CASE INSENSITIVE CASE SENSITIVEThere are similar commands for usernames, if your logfile records these. By default, usernames are always case insensitive, but you can specify
USERCASE SENSITIVEto override this.
DIRSUFFIX default.htm(You can only have one DIRSUFFIX.) There are other built-in aliases for other items: for example, hostnames are converted to lower case at this point.
FILEALIAS /football.html /soccer.html HOSTALIAS lion lion.statslab.cam.ac.ukThere is also the special command FILEALIAS none, which cancels any other file aliases which might have been specified.
The alias commands for the other items are called BROWALIAS, REFALIAS, USERALIAS and VHOSTALIAS. Only one alias is ever applied to any item. So after
FILEALIAS /football.html /soccer.html FILEALIAS /soccer.html /brazil.htmlthe file /soccer.html would get translated to /brazil.html, but /football.html would only get translated to /soccer.html and would not see the second alias.
You can also use wildcards in ALIAS commands: ? matches any one character and * matches any number of characters (including none). And on the right-hand side, you can use $1, $2 etc. to represent the parts of the original name matched by the *'s. As a special abbreviation, if there is exactly one * on the left-hand side, then a * on the right-hand side can be used to represent $1. So, for example,
FILEALIAS /*/football/* /soccer/would translate /sport/football/rules.html to just /soccer/, but either of
FILEALIAS /*/football/* /$1/soccer/$2 # or FILEALIAS /sport/football/* /sport/soccer/*would translate /sport/football/rules.html to /sport/soccer/rules.html.
You can use $$ to get an actual $ on the right-hand side. Or you can prefix the right-hand side with "PLAIN:" to treat any $'s and *'s on the right-hand side literally. For example
FILEALIAS /*/football/* PLAIN:/$1/soccer/$2would translate /sport/football/rules.html to exactly /$1/soccer/$2
Analog's *'s are un-greedy: if there are two possible ways of matching, the part of the expression on the left matches as little as possible. This is more often what you want. But it contrasts with Perl's regular expressions, for example. (Oh, two consecutive *'s are completely useless, but if you try it they are collapsed into one before counting the $1, $2, etc.)
The behaviour of FILEALIAS and REFALIAS can be slightly unintuitive if the file has search arguments.
A warning to Unix users: if you put an ALIAS command on the command line with +C, the shell may try and expand $1 etc., which is not what you want. To stop the shell doing this, put the command in single quotes instead of double quotes.
TYPEALIAS .txt ".txt (Plain text files)"would provide an explanation of that line in the File Type Report.
There can be some confusion between some normal alias and output alias commands. For example, what is the difference between FILEALIAS and REQALIAS? In fact, there are several differences because of the different things the aliases are doing. FILEALIAS applies to the files themselves, but REQALIAS only applies to the lines in the Request Report. This means that FILEALIAS also affects the other reports which use the filenames, such as the Directory Report, whereas REQALIAS only affects the Request Report.
Another difference is that REQALIAS applies separately to each line of the Request Report. This means that if two separate files translate to the same thing in a FILEALIAS command, they will become one file for all the reports. But if you were to use the same REQALIAS command, they would still be two files, and would still be listed on separate lines in the Request Report, but with the same name.
So in summary, when should you use each command? FILEALIAS should be used if a single file has two different names; i.e., if your web server returns the same file for two different URLs. REQALIAS, on the other hand, would typically be used to annotate or clarify the Request Report. Sometimes it's useful to use both; first combine some files with FILEALIAS, and then annotate them in the Request Report with REQALIAS.
The full list of output aliases is REQALIAS, REDIRALIAS, FAILALIAS, TYPEALIAS, DIRALIAS, HOSTREPALIAS, REDIRHOSTALIAS, FAILHOSTALIAS, DOMALIAS, ORGALIAS, REFREPALIAS, REFSITEALIAS, REDIRREFALIAS, FAILREFALIAS, BROWREPALIAS, BROWSUMALIAS, OSALIAS, VHOSTREPALIAS, REDIRVHOSTREPALIAS, FAILVHOSTREPALIAS, USERREPALIAS, REDIRUSERALIAS and FAILUSERALIAS.
There is one known bug with the output aliases. The report is sorted before the alias is applied. This means that if the SORTBY for the report is set to ALPHABETICAL, then the report will not be sorted correctly.
You include regular expressions in an ALIAS command by prefixing the left-hand side of the alias with "REGEXP:". Or you can specify a case-insensitive match, like Perl m//i or Unix egrep -i, by using "REGEXPI:". (It's automatically case-insensitive for many items, such as hostnames, or filenames if you have specified CASE INSENSITIVE.)
On the right-hand side of the alias you can use $1, $2 etc. to represent the first, second etc. bracketed expression on the left-hand side, counting in order of the left brackets. (Again, you can't put $1, $2 etc. on the command line unless you put them in single quotes.)
Regular expressions match if they match just part of the string. If you want them to have to match the whole of the string, you have to anchor them to the ends of the string with ^ and $.
For example,
REQALIAS REGEXP:^(/~(.+?)/.*) "[$2] $1"would translate
/~sret1/backgammon/rules.htmlto
[sret1] /~sret1/backgammon/rules.htmlin the Request Report. Or
HOSTALIAS REGEXP:^([^.]*)$ $1.mycompany.comwould add .mycompany.com to all hostnames not containing a dot. (See the FAQ for a discussion about whether this is a good idea.)
Regular expressions are greedy: if there are two possible ways of matching, the part of the expression on the left matches as much as possible.
Stephen Turner