diff --git a/AUTHORS b/AUTHORS index 1abe9b6..c9052de 100644 --- a/AUTHORS +++ b/AUTHORS @@ -1,6 +1,6 @@ -Camilo E. Hidalgo Estevez based on -visitors by Salvatore -Sanfilippo . +Camilo E. Hidalgo Estevez based on +visitors by Salvatore +Sanfilippo . -Note that the major part of the source code was written by +Note that the major part of the source code was written by Salvatore Sanfilippo. diff --git a/README b/README index 7ec9a61..b7ad812 100644 --- a/README +++ b/README @@ -12,8 +12,8 @@ Under UNIX systems just type: % make -Under WIN32 you need MINGW and MSYS (an easy way to get these and git -as a bonus is installing msysgit), then follow the above istructions. +Under WIN32 you need MINGW and MSYS (an easy way to get these and git +as a bonus is installing msysgit), then follow the above istructions. For compilation problems please write an email to with the exact problem, version of Visited, environment, GCC used, and so @@ -22,7 +22,7 @@ on. HOW TO HELP ----------- -Please send patches, I'll merge it, but be aware the project is now licensed +Please send patches, I'll merge it, but be aware the project is now licensed under the BSD license, it's no longer GPLed. THANKS TO ... diff --git a/SECURITY b/SECURITY index 6edf3d1..264fce6 100644 --- a/SECURITY +++ b/SECURITY @@ -5,8 +5,8 @@ in visitors. Currently no bug of this kind was reported or found. VISITED CODE QUALITY AND AUDITING -Visited is tested with big log files to ensure that there aren't obvious -memory violation problems with normal log files, and is based on code written +Visited is tested with big log files to ensure that there aren't obvious +memory violation problems with normal log files, and is based on code written with care about security. POSSIBLE PROBLEMS diff --git a/blacklist.h b/blacklist.h index 9fa6c55..76dc2a0 100644 --- a/blacklist.h +++ b/blacklist.h @@ -2,7 +2,7 @@ * Copyright (C) 2005 Salvatore Sanfilippo * * NOTE: - * + * * This fail was obtained as a modification of the * MT-Blacklist Master Copy, see * http://www.jayallen.org/comment_spam/blacklist.txt diff --git a/doc.html b/doc.html index 82ae3e4..e195810 100644 --- a/doc.html +++ b/doc.html @@ -21,16 +21,16 @@ Table of Contents

Name

-visitors - a fast web server log analyzer +visitors - a fast web server log analyzer

Synopsis

visitors [options] -<filename> [<filename> ...] +<filename> [<filename> ...]

Description

Visitors generates access statistics from specified web log files.

The resulting reports contain a number of useful -informations and statistics: +informations and statistics:

@@ -650,7 +650,7 @@

Examples

% visitors /var/log/apache/access.log.*
% zcat access.log.*.gz | visitors -

- +

Stream Mode Details

The usual way to run @@ -688,7 +688,7 @@

Stream Mode Details

visitors --tail /var/log/apache/access.log | visitors --stream -A --update-every 30 --reset-every 3600 \
--output-file /tmp/report.html
- +

Authors

Visitors was written by Salvatore Sanfilippo <antirez@invece.org>. diff --git a/iis2apache.pl b/iis2apache.pl index 6f2ce90..bdf79f9 100644 --- a/iis2apache.pl +++ b/iis2apache.pl @@ -17,7 +17,7 @@ $tzoffset = shift @ARGV if ($arg eq "--faketz"); $vhost = shift @ARGV if ($arg eq "--vhost"); $debug = 1 if ($arg eq "--debug"); # show field interpretation -} +} if ($tzoffset eq "") { print STDERR "Will use -0000 as a fake tzoffset\n"; @@ -31,7 +31,7 @@ } # an IIS log adheres to what's defined by 'Fields;' -# attempt to parse this, tagging +# attempt to parse this, tagging LINE: @@ -40,7 +40,7 @@ if ($line =~ /^#Fields: /) { @line = split(" ", $line); shift @line; # shifts of #Fields - # build a hash so we can look up a fieldname and + # build a hash so we can look up a fieldname and # have it return a position in the string undef %fieldh; $n = 0; # zero-based array for split @@ -53,10 +53,10 @@ next LINE if ($line =~ /^#/); #Fields: date time c-ip cs-username s-sitename s-computername s-ip cs-method cs- -#uri-stem cs-uri-query sc-status sc-win32-status sc-bytes cs-bytes time-taken +#uri-stem cs-uri-query sc-status sc-win32-status sc-bytes cs-bytes time-taken #s-port cs-version cs(User-Agent) cs(Cookie) cs(Referer) - # this is really slow. + # this is really slow. $date = yankfield("date"); $time = yankfield("time"); @@ -67,9 +67,9 @@ $query = yankfield("cs-uri-query"); $status = yankfield("sc-status"); #$bytes = yankfield("cs-bytes"); - # Which is it? sc-bytes or cs-bytes? + # Which is it? sc-bytes or cs-bytes? # cs-bytes only appears in some of the IIS logs I've seen. - # I'll assume that sc-bytes is "server->client bytes", which + # I'll assume that sc-bytes is "server->client bytes", which # is what we want anyway. $bytes = yankfield("sc-bytes"); # I'm gonna go with this. $useragent = yankfield("cs(User-Agent)"); @@ -80,7 +80,7 @@ # our modified CLF sez: # IP - - [DD/MMM/YYYY:HH:MM:SS TZOFFSET] "method stem[?query]" status bytes "referer" "user agent" "vhost" - # convert date + # convert date # 2000-07-19 00:00:01 ($y, $m, $d) = split("-", $date); $m =~ s/^0//g; @@ -98,7 +98,7 @@ # return the proper field, or "-" if it's not defined. -# (unfortunately ($date) = (split(" ", $line))[$fieldh{date}]; +# (unfortunately ($date) = (split(" ", $line))[$fieldh{date}]; # will return element 0 if $fieldh{date} is undefined . . .) sub yankfield { @@ -112,5 +112,5 @@ sub yankfield { print STDERR "$field undefined\n" if ($debug); return "-"; } -} +} diff --git a/tail.c b/tail.c index b891058..223ea00 100644 --- a/tail.c +++ b/tail.c @@ -66,7 +66,7 @@ void vi_tail(int filec, char **filev) { long *len; int i; - + if (filec <= 0) { fprintf(stderr, "No files specified in tail-mode\n"); exit(1); diff --git a/visited.1 b/visited.1 index 74df584..21a735f 100644 --- a/visited.1 +++ b/visited.1 @@ -70,7 +70,7 @@ Note that logfile can be a \- character to use the standard input. .BI "\-A \-\-all" Activate all the optional reports. This option is equivalent to .B -GKUWRDOB. -Note that +Note that .B --trails is not implicitly included in this option because it also requires .B --prefix. @@ -191,7 +191,7 @@ you can find in the README file in the visitors tarball. .PP .TP 8 .BI "\-\-stream" -Enable the Stream Mode (see the +Enable the Stream Mode (see the .B STREAM MODE DETAILS section for more information). Shortly: when in stream mode .I Visitors diff --git a/visited.c b/visited.c index 49efe80..22e1758 100644 --- a/visited.c +++ b/visited.c @@ -1120,7 +1120,7 @@ void vi_process_month_and_day(struct vih *vih, int month, int day, long size) { } /* Process requests populating the pages and sites hash tables. - * Populate also date and month hash tables if requested + * Populate also date and month hash tables if requested * Return non-zero on out of memory. */ int vi_process_requests(struct vih *vih, char *req, long size, char *date) { char *p, *site = NULL, *month = "fixme if I'm here!"; @@ -1152,7 +1152,7 @@ int vi_process_requests(struct vih *vih, char *req, long size, char *date) { if (res == 0) return 1; res = vi_counter_incr(&vih->sites_hits, site); if (res == 0) return 1; - // restore url to avoid interfering with functions called after this + // restore url to avoid interfering with functions called after this *p = '/'; } } @@ -1192,12 +1192,12 @@ int vi_process_types(struct vih *vih, char *url, long size) { p++; } if (!*p) return 0; - // get the last "." position + // get the last "." position dot = strrchr(p, '.'); - // if no dot found, assume no file type given and exit + // if no dot found, assume no file type given and exit if (!dot) return 0; - // find file type end by searching the first non digit/alpha char after dot + // find file type end by searching the first non digit/alpha char after dot p = dot+1; while (*p && isalnum(*p)) { if (isalpha(*p)) @@ -1206,7 +1206,7 @@ int vi_process_types(struct vih *vih, char *url, long size) { } if (*p) // we found a non digit/alpha so set to null to end file type string *p = '\0'; - + res = vi_counter_incr(&vih->types_hits, dot); if (res == 0) return 1; res = vi_traffic_incr(&vih->types_size, dot, size); @@ -1410,7 +1410,7 @@ int vi_process_line(struct vih *vih, char *l) { /* The following are processed only for new visits */ if (seen) return 0; - + return 0; } else { vih->invalid++; @@ -1797,7 +1797,7 @@ void om_html_print_keykey_entry(FILE *fp, char *key1, char *key2, int num) { fprintf(fp, ""); om_html_entities(fp, key1); fprintf(fp, ""); - + if (strncmp(key2, "http://", 7) || !strncmp(key2, "https://", 8) || !strncmp(key2, "ftp://", 6)) { fprintf(fp, "", key2); om_html_entities(fp, key2); @@ -2564,7 +2564,7 @@ void vi_print_monthday_map_report(FILE *fp, struct vih *vih) { /* do sizes now */ md = (int*) vih->monthday_size; minj = 0, maxj = 0; - + /* Check indexes of minimum and maximum in the array. */ for (j = 0; j < 12*31; j++) { if (md[j] > md[maxj]) @@ -2627,7 +2627,7 @@ int vi_print_report(char *of, struct vih *vih) { vi_print_hline(fp); vi_print_report_links(fp); vi_print_hline(fp); - + vi_print_pages_report(fp, vih); vi_print_hline(fp); if (Config_process_sites) { @@ -2658,12 +2658,12 @@ int vi_print_report(char *of, struct vih *vih) { vi_print_error404_report(fp, vih); vi_print_hline(fp); } - + vi_print_weekdays_report(fp, vih); vi_print_hline(fp); vi_print_hours_report(fp, vih); vi_print_hline(fp); - + vi_print_hits_report(fp, vih); vi_print_hline(fp);