Browse files

import version 0.7

  • Loading branch information...
0 parents commit 05a1f4e662372a212922f15559c8f4a912a61e1b @moritz committed May 13, 2010
Showing with 13,744 additions and 0 deletions.
  1. +9 −0 AUTHORS
  2. +350 −0 COPYING
  3. +114 −0 Changelog
  4. +23 −0 Makefile
  5. +7 −0 NOTIFY
  6. +104 −0 README
  7. +21 −0 SECURITY
  8. +59 −0 TODO
  9. +654 −0 aht.c
  10. +95 −0 aht.h
  11. +299 −0 antigetopt.c
  12. +35 −0 antigetopt.h
  13. +3,170 −0 blacklist.h
  14. +17 −0
  15. +748 −0 doc.html
  16. +38 −0
  17. +116 −0
  18. +3,533 −0 out.html
  19. BIN powered-by-visitors.png
  20. +14 −0 sleep.h
  21. +87 −0 tail.c
  22. +535 −0 visitors.1
  23. +3,669 −0 visitors.c
  24. +47 −0 visitors.css
  25. BIN visitors.png
@@ -0,0 +1,9 @@
+Salvatore Sanfilippo <>
+Other people contributing ideas or bug reports are listed
+in the Changelog file. Note that there are no contributors
+of source code, that's all written by Salvatore Sanfilippo
+(see the "HOW TO HELP" section of the README file to know
+why, I'm not happy about it).

Large diffs are not rendered by default.

Oops, something went wrong.
114 Changelog
@@ -0,0 +1,114 @@
+-> Visitors 0.7 Released (30 March 2006)
+30Mar2005 - Added screen resolution and color depth report (via Javascript) see the README file for more info.
+12Dic2005 - Added --debug option for verbose errors.
+17Nov2004 - Debian Bug#339594: default output is html, but the manpage says text. Fixed. Thanks to Rick Pasotto for reporting the bug.
+15Nov2005 - --grep and --exclude options implemented.
+13Nov2005 - --ignore-404 option, useful to ignore log lines about missing pages. When this option is turned on log lines with 404 errors are just used to generate the 404 errors report and not used for other reports.
+-> Visitors 0.61 Released (25 October 2005)
+24Oct2005 - Versioning scheme changed, after 0.6 now there is 0.61 instead of 0.6a like it was in the past. 0.6a may look like an alpha release.
+24Oct2005 - Ignore more bots other than bots from google when computing unique visitors stats. This makes unique visitors stats much more reliable, there are crawlers with 200 and more different IP addresses so the unique visitors algorithm does not help there.
+-> Visitors 0.6 Released (10 October 2005)
+10Oct2005 - New report: Adsensed-pages. Like googled-pages but for the adsense crawler, that's supposted to be the one with Mediapartners-Google user agent.
+10Oct2005 - Fixed a bug resulting in wrong googled-pages report.
+04Oct2005 - Some formatting problem and a bug introduced in the 0.6 beta version fixed thanks to Simon Waters <sysadmin at zynet dot net>
+03Oct2005 - Visitors's site finally contains a Japanese translation thanks to Takeshi ABE (tabe (at) fixedpoint (dot) jp).
+02Oct2005 - Fixed the parsing code to detect the user agent string when no occurence of (...) string is present. This results in more accurate stats.
+02Oct2005 - New feature: Referer spam filtering via blacklist.h
+02Oct2005 - New report: google's "hl" human language.
+17Sep2005 - Browsers list updated, Internet Explorer splitted into IE4, IE5 and IE6, detection of Firefox as a special case of Gecko based.
+16Sep2005 - Fixed Debian Bug #312345, adding newline for every 'td' table
+element generated to create 2D maps. This makes simpler to send reports by
+email. Thanks to Simon Waters <sysadmin at zynet dot net>
+-> Visitors 0.5 Released
+29Apr2005 - An unix manual page was added thanks to Romain Francoise <rfrancoise at debian dot org> that wrote it for Debian.
+29Apr2005 - Most stats are now done by visits instead of by hits.
+28Apr2005 - Changes to the referer algorithms to be a bit more immune to referer spamming.
+28Apr2005 - Memory usage reduced of 50% with very minor speed penality.
+28Apr2005 - Fixed an overflow resulting in negative percentages in reports.
+07Dec2004 - Added .swf and .js extensions as 'images'.
+03Oct2004 - Fixed a bug in url encoding routine.
+02Oct2004 - Resolved a collision with the short option 'P' (Thx to Yvse Goerden for bug report).
+02Oct2004 - Added options to ignore selected "special" nodes, for the grapvhiz graph generation.
+02Oct2004 - Better graphviz graph generation, includes google, external link, no referers, percentages in arcs.
+27Sep2004 - HTML is now the default output module
+27Sep2004 - Highlight colors for weekend days changed (more visible).
+27Sep2004 - Referers by age, in the report is now named "referers by first time"
+25Sep2004 - New report: monthly visitors and monthly visitors from google.
+24Sep2004 - New report: month-day bidimentional map.
+--> Visitors 0.4a Released
+22Sep2004 - Fixed a problem resulting from a change in Google's bot user
+--> Visitors 0.4 Released
+develop shell scripts. Thanks to David Siegal for the suggestion.
+file specified. It's more useful for system administrators that want to
+exit with error code '1' instead to continue and try to process the next log
+15Sep2004 - On missing file or error in report generation Visitors will now
+14Sep2004 - keyphrases in "google keyphrases" report are now links that will perform a search on google for the given keyphrase. Thanks to David Siegal for the idea.
+13Sep2004 - Fixed a bug in the parser (vi_parse_line don't used to check if vi_parse_date() returned an error). Added a redundant sanity check related to this. Thanks to David Siegal <dsiegal at brave dot cs dot uml dot edu> for reporting the error and offending (currupted) log lines.
+13Aug2004 - New report: pageviews per visit.
+12Aug2004 - Added --time-delta option to the command line. It's useful if the web server is in a timezone but most visitors are accessing the site from a different timezone. Feature suggested by Philipp Droessler <pd (at)>.
+30Jul2004 - Keyphrases are now processed in a case-insensitive manner, spaces at the start and at the end of the keyphrases are now filtered.
+30Jul2004 - Google Keyphrases report contains the number of google page for every keyphrase.
+30Jul2004 - New report, 404 errors.
+29Jul2004 - Google's cache accesses no longer reported as keyphrases.
+29Jul2004 - Keyphrases and requested pages/files are now urldecoded in the report.
+29Jul2004 - Now referers report shows two new items: internal link and google search engine.
+31May2004 - Fixed makefile to respect environment vars thanks to Florent Thoumie <flz at xbsd dot org>
+--> Visitors 0.3a Released
+27May2004 - Fixed a compilation problem with older versions of GCC
+27May2004 - Fixed a bug in the plaintext output formatting
+--> Visitors 0.3 Released
+23May2004 - the General Information section now includes the generation date.
+23May2004 - New report, Browsers
+22May2004 - New report, Operating Systems by hits.
+22May2004 - Weekend dates highlighted in the html report.
+22May2004 - Added ancors to reports to easily jump to the specified report.
+22May2004 - Css modified.
+22May2004 - Stream mode implemented, for incremental statistics almost in realtime.
+22May2004 - Fixed compilation on SunOS (patch from Michel Gravey <michel.gravey (at) orange (dot) fr>)
+22May2004 - New report, clients top level domains by hits.
+22May2004 - Implemented a 'tail-mode' that emulates the unix "tail -f" command. The tail-mode handles file rotations. This new mode will be useful with the stream-mode still not implemented.
+22May2004 - Dates are converted in time_t values at line-parsing stage, and converted back to strings only to create reports. After this change the gogoled and referers by age reports are sorted even by hour/minute/second and not only by date. This should also make it faster.
+21May2004 - Fixed a bug with referers by age, on date format error don't stop the log processing now.
+20May2004 - All the output functions modified to get a file descriptor as first argument instead to assume standard output.
+--> Visitors 0.2a Released
+12May2004 - New report, referers by age. A new function generalize the report of url/date type.
+12May2004 - 'print_keykey_method' modofied to get the number of the item.
+12May2004 - Referers report does no longer include referers from google.
+12May2004 - Added subtitles in reports to better explain how to read they.
+11May2004 - 'print_numkey_method' modified to get the number of the item, so reports like referer, keyphrases have numbered items from "1)" to "<max>)".
+11May2004 - Credits text in html output modified.
+11May2004 - New report, bidimentional weekdays/hours map.
+--> Visitors 0.2 Released
+09May2004 - Too long lines are now truncated in the html report.
+09May2004 - Fixed a bug in google's keyphrases processing.
+09May2004 - Fixed a bug in the text output module bar printing.
+09May2004 - Web trails max lines made configurable with --max-trails.
+09May2004 - CSS files are now reported under the "images and css" report.
+08May2004 - Added support to output Graphviz graphs with web trails.
+08May2004 - Multiple --prefix options are now accepted and processed.
+08May2004 - Order of reports visualization changed.
+08May2004 - New report added: visitors from google VS all the rest for every day.
+07May2004 - Entries with "bad" dates are now put at the end of the "unique visitors for every day" report.
+07May2004 - Fixed 'processed in N seconds' stderr output in case of file not found. (Salvatore Sanfilippo)
+--> Visitors 0.1 Released
@@ -0,0 +1,23 @@
+# Makefile for visitors
+# Copyright (C) 2004 Salvatore Sanfilippo <>
+# All Rights Reserved
+# Under the GPL license version 2
+DEBUG?= -g
+CFLAGS?= -O2 -Wall -W
+OBJ = visitors.o aht.o antigetopt.o tail.o
+PRGNAME = visitors
+all: visitors
+visitors.o: visitors.c blacklist.h
+visitors: $(OBJ)
+ $(CC) -o $(PRGNAME) $(CCOPT) $(DEBUG) $(OBJ)
+ $(CC) -c $(CCOPT) $(DEBUG) $(COMPILE_TIME) $<
+ rm -rf $(PRGNAME) *.o
@@ -0,0 +1,7 @@
+This is a list of email addresses and internet sites to notify when
+a new version of visitors is available:
+Florent Thoumie <flz (at)> FreeBSD port maintainer
+Romain Francoise <> Debian package maintainer
+Sven Wegener <> Gentoo portage
@@ -0,0 +1,104 @@
+Hello, this is Visitors,
+a fast and easy to use web log analyzer.
+For more usage information, documentation and examples
+please visit:
+or check the docs.html file in this directory
+for the reference documentation.
+Under UNIX systems just type:
+% make
+Under WIN32 you need MINGW and MSYS, then follow the above
+For compliation problems please write an email to <>
+with the exact problem, version of Visitors, environment, GCC used, and so
+Use the perl script to do the conversion, like:
+cat yourIISLogFile.txt | perl > yourConvertedFile.txt
+Then run visitors against "yourConvertedFile.txt".
+There is an alternative way to convert logs using a program
+that does not require Perl, with Windows and Linux binaries.
+This program is called RConvLog and it's possible to
+download it at
+Log files don't contain information about the screen resolution
+so in order to generate the screen resolution report Visitors needs
+that you add the following code in your home page, after the <body>
+document.write("<div style=\"visiblity:hidden;display:none;\"><img src=\"visitors-screen-res-check.jpg?"+screen.width+"x"+screen.height+"x"+screen.colorDepth+"\" /></div>");
+Without this code the screen resolution report will not work.
+Unfortunately I can't accept source code written by external contributors
+without a "Copyright Assignment", because I'm not sure I'll take the
+GPL license in the future, instead I may switch to BSD, or even to create
+a commercial version of Visitors (very unlikely). Because I don't like
+the idea of "Copyright Assignment" at all I'll be happy to implement
+any useful feature in Visitors for you so: Please send suggestions
+and bug reports. Thank you.
+There is some kind of problem with the GPL and small projects, when
+you can expect an amount of help by external contributors that is so
+little that's not worth the "License Lock-In" problem. What I mean
+is that Visitors is under the GPL license, and I'm not sure I'll be
+happy with this license forever. For example I may want to change
+the license using the BSD in the future, it's worth to lost the
+ability to do it just to accept some patch?
+When it's a big project and it is very likely to get a lot of contribs
+all is ok, I start directly with the BSD license. An example of this
+is the "Jim Interpreter", an open source program I started to develop
+after Visitors itself (see You get a lot of help,
+the project gets bigger/better, still if you want you can use the
+code for your commercial stuff (it's BSD), and everybody can do it.
+Also note that nor the GPL accepting patches, nor the BSD allow
+the open source developer to create software that is available in
+two flawours: one free, and one commercial. BSD allows this but
+everybody can create another commercial product based on the same
+code: not fair. GPL allows this if you don't accept patches, that's
+also not good given that after all the code contributed will stay
+anyway in the GPL product forever.
+This is why I don't accept patches for Visitors, and why I'm highly
+unhappy with this solution. If you have some idea or comment please
+feel free to send it to antirez (at) gmail (dot) org.
+Please see the ChangeLog file for credits.
+Salvatore Sanfilippo
@@ -0,0 +1,21 @@
+This file will contain a list of bugs related to security problems found
+in visitors. Currently no bug of this kind was reported or found.
+Visitors is tested with big log files and the valgrind program before of every
+release to ensure that there aren't obvious memory violation problems
+with normal log files, and was written with care about security.
+Still it's a C program that does a lot of pointer math in order to
+be fast, and its work is to process untrusted input (what's written in
+log files is in part client-driven), this file is here to contain
+detailed information if this kind of bugs will be found in future.
+ None for now.
@@ -0,0 +1,59 @@
+- Ignore 404 errors in every report, but in the 404 errors.
+- Screen resolution: conver 32 colorDepth to 24. Set a cookie with
+ expire time to 24 hours so that the screen resolution is checked only
+ for new visitors and not for every pageview.
+- Good suggestions at
+- Compress the man page with gzip -9 for Debian policy
+- Glob-style matching in --prefix, like:
+ --prefix *
+- Keyword trails:
+ hping -> /
+ hping3 -> /hping3.html
+ packet MTU -> /docs.html
+ ...
+- Enter pages
+- Best referer in every month+year. This may be done with a single
+ hash table if the key is: month+year+referer, then sort it by hits,
+ and get every pair of month+year one the first time (running the
+ hash table form the higher hits to the lower ones).
+- Best keyphrase in every month+year. See "Best referer in every month+year"
+ for implementation tips.
+- When the list of urls/referers/... are limited, a final
+ entry "others" should sum all the non shown values.
+- Countries by IP addresses?
+- --period to limit the analysis to log entries matching the specified period.
+- Processing time in seconds with decimal part, like 5,663 seconds.
+ After this is implemented, it may print the lines for second speed
+ if the time spent is more than 2 seconds or so.
+ win32:
+- Page-specific referers
+- An option to specify an external CSS name to link inside the HTML
+ instead of the inline CSS.
+- An option to specify the r/g/b values of the bidimentional maps
+- Exclude google crawler accesses from weekday-hour map report?
+- Modify parse_date() to cache the result.
+- Normal "Foobar by hits" statistics should show the percentage
+- Better formatting for the new reports browser/os/domain in the
+ plaintext report.
+- Think about hashing the time as unix-time integer instead of string in
+ order to reduce processing time and memory usage.
Oops, something went wrong.

0 comments on commit 05a1f4e

Please sign in to comment.