Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

import version 0.7

  • Loading branch information...
commit 05a1f4e662372a212922f15559c8f4a912a61e1b 0 parents
Moritz Lenz authored
9 AUTHORS
@@ -0,0 +1,9 @@
+Salvatore Sanfilippo <antirez@invece.org>
+
+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).
+
+
350 COPYING
@@ -0,0 +1,350 @@
+ All the Software contained in this source distribution is
+ Copyright(C) 2004,2005 Salvatore Sanfilippo.
+ All Rights reserved.
+
+ The file iis2apache.pl is Copyright(C) 2000 jwa@jammed.com
+
+ The Software is released by the author under the
+ following GPL version 2 license, except for the file named "aht.c"
+ that is released under the license specified in the first comments
+ of the C file itself.
+
+ 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.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) 19yy <name of author>
+
+ 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.
+
+ <signature of Ty Coon>, 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.
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
+
+agent.
+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) im-all.net>.
+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
23 Makefile
@@ -0,0 +1,23 @@
+# Makefile for visitors
+# Copyright (C) 2004 Salvatore Sanfilippo <antirez@invece.org>
+# All Rights Reserved
+# Under the GPL license version 2
+
+DEBUG?= -g
+CFLAGS?= -O2 -Wall -W
+CCOPT= $(CFLAGS)
+
+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)
+
+.c.o:
+ $(CC) -c $(CCOPT) $(DEBUG) $(COMPILE_TIME) $<
+
+clean:
+ rm -rf $(PRGNAME) *.o
7 NOTIFY
@@ -0,0 +1,7 @@
+This is a list of email addresses and internet sites to notify when
+a new version of visitors is available:
+
+Freshmeat http://www.freshmeat.net
+Florent Thoumie <flz (at) xbsd.org> FreeBSD port maintainer
+Romain Francoise <rfrancoise@debian.org> Debian package maintainer
+Sven Wegener <swegener@gentoo.org> Gentoo portage
104 README
@@ -0,0 +1,104 @@
+WELCOME TO VISITORS 0.7
+-----------------------
+
+Hello, this is Visitors,
+a fast and easy to use web log analyzer.
+
+For more usage information, documentation and examples
+please visit:
+
+ http://www.hping.org/visitors
+
+or check the docs.html file in this directory
+for the reference documentation.
+
+HOW TO COMPILE
+--------------
+
+Under UNIX systems just type:
+
+% make
+
+Under WIN32 you need MINGW and MSYS, then follow the above
+istructions.
+
+For compliation problems please write an email to <antirez@invece.org>
+with the exact problem, version of Visitors, environment, GCC used, and so
+on.
+
+HOW TO USE WITH IIS LOGS
+------------------------
+
+Use the iis2apache.pl perl script to do the conversion, like:
+
+cat yourIISLogFile.txt | perl iis2apache.pl > 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 http://www.rebex.net/RConvLog/
+
+HOW TO GET SCREEN RESOLUTION INFORMATION
+----------------------------------------
+
+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>
+tag:
+
+<script>
+document.write("<div style=\"visiblity:hidden;display:none;\"><img src=\"visitors-screen-res-check.jpg?"+screen.width+"x"+screen.height+"x"+screen.colorDepth+"\" /></div>");
+</script>
+
+Without this code the screen resolution report will not work.
+
+HOW TO HELP
+-----------
+
+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.
+
+ABOUT THE GPL, AND WHY SOMETIMES IT DOES NOT WORK
+-------------------------------------------------
+
+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 http://jim.berlios.de). 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.
+
+THANKS TO ...
+-------------
+
+Please see the ChangeLog file for credits.
+
+Enjoy,
+Salvatore Sanfilippo
21 SECURITY
@@ -0,0 +1,21 @@
+SECURITY FILE
+
+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 CODE QUALITY AND AUDITING
+
+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.
+
+POSSIBLE PROBLEMS
+
+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.
+
+LIST OF SECURITY BUGS FOUND
+
+ None for now.
59 TODO
@@ -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 http://www.karlnelson.net/weblog/000925.html
+
+- Compress the man page with gzip -9 for Debian policy
+
+- Glob-style matching in --prefix, like:
+ --prefix *invece.org
+
+- 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? http://www.maxmind.com/app/geoip_country
+
+- --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: http://mail.gnu.org/archive/html/bug-gnu-chess/2004-01/msg00020.html
+
+- 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.
654 aht.c
@@ -0,0 +1,654 @@
+/* An implementation of in-memory hash tables:
+ * Copyright (c) 2000-2004 Salvatore Sanfilippo <antirez@invece.org>
+ *
+ * -- VERSION 2004.05.22 --
+ *
+ * COPYRIGHT AND PERMISSION NOTICE
+ * -------------------------------
+ *
+ * Copyright (c) 2000 Salvatore Sanfilippo <antirez@invece.org>
+ * Copyright (c) 2001 Salvatore Sanfilippo <antirez@invece.org>
+ * Copyright (c) 2002 Salvatore Sanfilippo <antirez@invece.org>
+ * Copyright (c) 2003 Salvatore Sanfilippo <antirez@invece.org>
+ * Copyright (c) 2004 Salvatore Sanfilippo <antirez@invece.org>
+ *
+ * All rights reserved.
+ *
+ * Permission is hereby granted, free of charge, to any person obtaining a
+ * copy of this software and associated documentation files (the
+ * "Software"), to deal in the Software without restriction, including
+ * without limitation the rights to use, copy, modify, merge, publish,
+ * distribute, and/or sell copies of the Software, and to permit persons
+ * to whom the Software is furnished to do so, provided that the above
+ * copyright notice(s) and this permission notice appear in all copies of
+ * the Software and that both the above copyright notice(s) and this
+ * permission notice appear in supporting documentation.
+ *
+ * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
+ * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+ * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT
+ * OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR
+ * HOLDERS INCLUDED IN THIS NOTICE BE LIABLE FOR ANY CLAIM, OR ANY SPECIAL
+ * INDIRECT OR CONSEQUENTIAL DAMAGES, OR ANY DAMAGES WHATSOEVER RESULTING
+ * FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT,
+ * NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION
+ * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
+ *
+ * Except as contained in this notice, the name of a copyright holder
+ * shall not be used in advertising or otherwise to promote the sale, use
+ * or other dealings in this Software without prior written authorization
+ * of the copyright holder.
+ *
+ * CHANGELOG
+ * ---------
+ *
+ * 22May2004 - Fixed a but in ht_destroy(). Now after this call the
+ * hashtable is really ready to be reused. Fixed also a memory leak
+ * in the same function. Luckly this function is only called at exit
+ * in many programs.
+ *
+ * OVERVIEW
+ * --------
+ *
+ * AHT is an implementation of a dictionary with support for
+ * INSERT, DELETE and SEARCH operations. It uses the hash table
+ * as base data structure to provide almost constant times for
+ * the three operations. AHT also automatically care about the
+ * size of the current key-values set increasing the hash table
+ * as needed.
+ *
+ * DESIGN PRINCIPLE
+ * ----------------
+ *
+ * - AHT try to resist to attacker-induced worst-case behaviour
+ * trought the randomization of the hash-function. This is
+ * optional.
+ *
+ * - AHT take care of the hash table expansion when needed.
+ * The hash table load ranges from 0 to 0.5, the hash table
+ * size is a power of two.
+ *
+ * - A simple implementation. The collisions resolution used
+ * is a simple linear probing, that takes advantage of
+ * the modern CPU caches, the low hash table max load and
+ * the use of a strong hash function provided with this library
+ * (ht_strong_hash), should mitigate the primary clustering
+ * enough. Experimental results shown that double hashing
+ * was a performance lost with common key types in modern
+ * CPUs.
+ *
+ * - Moderatly method oriented, it is possible to define the hash
+ * function, key/value destructors, key compare function, for a
+ * given hash table, but not with a per-element base.
+ *
+ * === WARNING ===
+ * = Before to use this library, think about the -fact- that the
+ * = worst case is O(N). Like for the quick sort algorithm, it may
+ * = be a bad idea to use this library in medical software, or other
+ * = software for wich the worst case should be taken in account
+ * = even if not likely to happen.
+ * = Good alternatives are red-black trees, and other trees with
+ * = a good worst-case behavior.
+ * ===============
+ *
+ * TODO
+ * ----
+ *
+ * - Write the documentation
+ * - ht_copy() to copy an element between hash tables
+ * - ht_dup() to duplicate an entire hash table
+ * - ht_merge() to add the content of one hash table to another
+ * - disk operations, the ability to save an hashtable from the
+ * memory to the disk and the reverse operation.
+ *
+ * Most of this features needs additional methods, like one
+ * to copy an object, and should return an error if such methods
+ * are not defined.
+ *
+ */
+
+#include <sys/types.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <assert.h>
+#include "aht.h"
+
+/* -------------------------- private prototypes ---------------------------- */
+static int ht_expand_if_needed(struct hashtable *t);
+static unsigned int next_power(unsigned int size);
+static int ht_insert(struct hashtable *t, void *key, unsigned int *avail_index);
+
+/* The special ht_free_element pointer is used to mark
+ * a freed element in the hash table (note that the elements
+ * neven used are just NULL pointers) */
+static struct ht_ele *ht_free_element = (void*) -1;
+
+/* -------------------------- hash functions -------------------------------- */
+/* The djb hash function, that's under public domain */
+u_int32_t djb_hash(unsigned char *buf, size_t len)
+{
+ u_int32_t h = 5381;
+ while(len--)
+ h = (h + (h << 5)) ^ *buf++;
+ return h;
+}
+
+u_int32_t djb_hashR(unsigned char *buf, size_t len)
+{
+ u_int32_t h = 5381;
+ buf += len-1;
+ while(len--)
+ h = (h + (h << 5)) ^ *buf--;
+ return h;
+}
+
+/* Another trivial hash function */
+#define ROT32R(x,n) (((x)>>n)|(x<<(32-n)))
+u_int32_t trivial_hash(unsigned char *buf, size_t len)
+{
+ u_int32_t h = 0;
+ while(len--) {
+ h = h + *buf++;
+ h = ROT32R(h, 3);
+ }
+ return h;
+}
+
+u_int32_t trivial_hashR(unsigned char *buf, size_t len)
+{
+ u_int32_t h = 0;
+ buf += len-1;
+ while(len--) {
+ h = h + *buf--;
+ h = ROT32R(h, 3);
+ }
+ return h;
+}
+
+/* A strong hash function that should be the default with this
+ * hashtable implementation. Our hash tables does not support
+ * double hashing for design: the idea is to avoid double
+ * hashing and use a bit slower but very strong hash function like
+ * this. This should provide quite good performances with
+ * all the kinds of keys if you take the default max load of 50%.
+ *
+ * For more information see: http://burtleburtle.net/bob/hash/evahash.html */
+
+/* The mixing step */
+#define mix(a,b,c) \
+{ \
+ a=a-b; a=a-c; a=a^(c>>13); \
+ b=b-c; b=b-a; b=b^(a<<8); \
+ c=c-a; c=c-b; c=c^(b>>13); \
+ a=a-b; a=a-c; a=a^(c>>12); \
+ b=b-c; b=b-a; b=b^(a<<16); \
+ c=c-a; c=c-b; c=c^(b>>5); \
+ a=a-b; a=a-c; a=a^(c>>3); \
+ b=b-c; b=b-a; b=b^(a<<10); \
+ c=c-a; c=c-b; c=c^(b>>15); \
+}
+
+/* The whole new hash function */
+u_int32_t __ht_strong_hash(u_int8_t *k, u_int32_t length, u_int32_t initval)
+{
+ u_int32_t a,b,c; /* the internal state */
+ u_int32_t len; /* how many key bytes still need mixing */
+
+ /* Set up the internal state */
+ len = length;
+ a = b = 0x9e3779b9; /* the golden ratio; an arbitrary value */
+ c = initval; /* variable initialization of internal state */
+
+ /*---------------------------------------- handle most of the key */
+ while (len >= 12)
+ {
+ a=a+(k[0]+((u_int32_t)k[1]<<8)+((u_int32_t)k[2]<<16)+
+ ((u_int32_t)k[3]<<24));
+ b=b+(k[4]+((u_int32_t)k[5]<<8)+((u_int32_t)k[6]<<16)+
+ ((u_int32_t)k[7]<<24));
+ c=c+(k[8]+((u_int32_t)k[9]<<8)+((u_int32_t)k[10]<<16)+
+ ((u_int32_t)k[11]<<24));
+ mix(a,b,c);
+ k = k+12; len = len-12;
+ }
+
+ /*------------------------------------- handle the last 11 bytes */
+ c = c+length;
+ switch(len) /* all the case statements fall through */
+ {
+ case 11: c=c+((u_int32_t)k[10]<<24);
+ case 10: c=c+((u_int32_t)k[9]<<16);
+ case 9 : c=c+((u_int32_t)k[8]<<8);
+ /* the first byte of c is reserved for the length */
+ case 8 : b=b+((u_int32_t)k[7]<<24);
+ case 7 : b=b+((u_int32_t)k[6]<<16);
+ case 6 : b=b+((u_int32_t)k[5]<<8);
+ case 5 : b=b+k[4];
+ case 4 : a=a+((u_int32_t)k[3]<<24);
+ case 3 : a=a+((u_int32_t)k[2]<<16);
+ case 2 : a=a+((u_int32_t)k[1]<<8);
+ case 1 : a=a+k[0];
+ /* case 0: nothing left to add */
+ }
+ mix(a,b,c);
+ /*-------------------------------------------- report the result */
+ return c;
+}
+
+/* ----------------------------- API implementation ------------------------- */
+/* reset an hashtable already initialized with ht_init().
+ * NOTE: This function should only called by ht_destroy(). */
+static void ht_reset(struct hashtable *t)
+{
+ t->table = NULL;
+ t->size = 0;
+ t->sizemask = 0;
+ t->used = 0;
+ t->collisions = 0;
+}
+
+/* Initialize the hash table */
+int ht_init(struct hashtable *t)
+{
+ ht_reset(t);
+ t->hashf = ht_hash_pointer;
+ t->key_destructor = ht_no_destructor;
+ t->val_destructor = ht_no_destructor;
+ t->key_compare = ht_compare_ptr;
+ return HT_OK;
+}
+
+/* Resize the table to the minimal size that contains all the elements */
+int ht_resize(struct hashtable *t)
+{
+ int minimal = (t->used * 2)+1;
+
+ if (minimal < HT_INITIAL_SIZE)
+ minimal = HT_INITIAL_SIZE;
+ return ht_expand(t, minimal);
+}
+
+/* Move an element accross hash tables */
+int ht_move(struct hashtable *orig, struct hashtable *dest, unsigned int index)
+{
+ int ret;
+ unsigned int new_index;
+
+ /* If the element isn't in the table ht_search will store
+ * the index of the free ht_ele in the integer pointer by *index */
+ ret = ht_insert(dest, orig->table[index]->key, &new_index);
+ if (ret != HT_OK)
+ return ret;
+
+ /* Move the element */
+ dest->table[new_index] = orig->table[index];
+ orig->table[index] = ht_free_element;
+ orig->used--;
+ dest->used++;
+ return HT_OK;
+}
+
+/* Expand or create the hashtable */
+int ht_expand(struct hashtable *t, size_t size)
+{
+ struct hashtable n; /* the new hashtable */
+ unsigned int realsize = next_power(size), i;
+
+ /* the size is invalid if it is smaller than the number of
+ * elements already inside the hashtable */
+ if (t->used >= size)
+ return HT_INVALID;
+
+ ht_init(&n);
+ n.size = realsize;
+ n.sizemask = realsize-1;
+ n.table = malloc(realsize*sizeof(struct ht_ele*));
+ if (n.table == NULL)
+ return HT_NOMEM;
+ /* Copy methods */
+ n.hashf = t->hashf;
+ n.key_destructor = t->key_destructor;
+ n.val_destructor = t->val_destructor;
+ n.key_compare= t->key_compare;
+
+ /* Initialize all the pointers to NULL */
+ memset(n.table, 0, realsize*sizeof(struct ht_ele*));
+
+ /* Copy all the elements from the old to the new table:
+ * note that if the old hash table is empty t->size is zero,
+ * so ht_expand() acts like an ht_create() */
+ n.used = t->used;
+ for (i = 0; i < t->size && t->used > 0; i++) {
+ if (t->table[i] != NULL && t->table[i] != ht_free_element) {
+ u_int32_t h;
+
+ /* Get the new element index: note that we
+ * know that there aren't freed elements in 'n' */
+ h = n.hashf(t->table[i]->key) & n.sizemask;
+ if (n.table[h]) {
+ n.collisions++;
+ while(1) {
+ h = (h+1) & n.sizemask;
+ if (!n.table[h])
+ break;
+ n.collisions++;
+ }
+ }
+ /* Move the element */
+ n.table[h] = t->table[i];
+ t->used--;
+ }
+ }
+ assert(t->used == 0);
+ free(t->table);
+
+ /* Remap the new hashtable in the old */
+ *t = n;
+ return HT_OK;
+}
+
+/* Add an element, discarding the old if the key already exists */
+int ht_replace(struct hashtable *t, void *key, void *data)
+{
+ int ret;
+ unsigned int index;
+
+ /* Try to add the element */
+ ret = ht_add(t, key, data);
+ if (ret == HT_OK || ret != HT_BUSY)
+ return ret;
+ /* It already exists, get the index */
+ ret = ht_search(t, key, &index);
+ assert(ret == HT_FOUND);
+ /* Remove the old */
+ ret = ht_free(t, index);
+ assert(ret == HT_OK);
+ /* And add the new */
+ return ht_add(t, key, data);
+}
+
+/* Add an element to the target hash table */
+int ht_add(struct hashtable *t, void *key, void *data)
+{
+ int ret;
+ unsigned int index;
+
+ /* If the element isn't in the table ht_insert() will store
+ * the index of the free ht_ele in the integer pointer by *index */
+ ret = ht_insert(t, key, &index);
+ if (ret != HT_OK)
+ return ret;
+
+ /* Allocates the memory and stores key */
+ if ((t->table[index] = malloc(sizeof(struct ht_ele))) == NULL)
+ return HT_NOMEM;
+ /* Store the pointers */
+ t->table[index]->key = key;
+ t->table[index]->data = data;
+ t->used++;
+ return HT_OK;
+}
+
+/* search and remove an element */
+int ht_rm(struct hashtable *t, void *key)
+{
+ int ret;
+ unsigned int index;
+
+ if ((ret = ht_search(t, key, &index)) != HT_FOUND)
+ return ret;
+ return ht_free(t, index);
+}
+
+/* Destroy an entire hash table */
+int ht_destroy(struct hashtable *t)
+{
+ unsigned int i;
+
+ /* Free all the elements */
+ for (i = 0; i < t->size && t->used > 0; i++) {
+ if (t->table[i] != NULL && t->table[i] != ht_free_element) {
+ if (t->key_destructor)
+ t->key_destructor(t->table[i]->key);
+ if (t->val_destructor)
+ t->val_destructor(t->table[i]->data);
+ free(t->table[i]);
+ t->used--;
+ }
+ }
+ /* Free the table and the allocated cache structure */
+ free(t->table);
+ /* Re-initialize the table */
+ ht_reset(t);
+ return HT_OK; /* Actually ht_destroy never fails */
+}
+
+/* Free an element in the hash table */
+int ht_free(struct hashtable *t, unsigned int index)
+{
+ if (index >= t->size)
+ return HT_IOVERFLOW; /* Index overflow */
+ /* ht_free() calls against non-existent elements are ignored */
+ if (t->table[index] != NULL && t->table[index] != ht_free_element) {
+ /* release the key */
+ if (t->key_destructor)
+ t->key_destructor(t->table[index]->key);
+ /* release the value */
+ if (t->val_destructor)
+ t->val_destructor(t->table[index]->data);
+ /* free the element structure */
+ free(t->table[index]);
+ /* mark the element as freed */
+ t->table[index] = ht_free_element;
+ t->used--;
+ }
+ return HT_OK;
+}
+
+/* Search the element with the given key */
+int ht_search(struct hashtable *t, void *key, unsigned int *found_index)
+{
+ int ret;
+ u_int32_t h;
+
+ /* Expand the hashtable if needed */
+ if (t->size == 0) {
+ if ((ret = ht_expand_if_needed(t)) != HT_OK)
+ return ret;
+ }
+
+ /* Try using the first hash functions */
+ h = t->hashf(key) & t->sizemask;
+ /* this handles the removed elements */
+ if (!t->table[h])
+ return HT_NOTFOUND;
+ if (t->table[h] != ht_free_element &&
+ t->key_compare(key, t->table[h]->key))
+ {
+ *found_index = h;
+ return HT_FOUND;
+ }
+
+ while(1) {
+ h = (h+1) & t->sizemask;
+ /* this handles the removed elements */
+ if (t->table[h] == ht_free_element)
+ continue;
+ if (!t->table[h])
+ return HT_NOTFOUND;
+ if (t->key_compare(key, t->table[h]->key)) {
+ *found_index = h;
+ return HT_FOUND;
+ }
+ }
+}
+
+/* This function is used to run the entire hash table,
+ * it returns:
+ * 1 if the element with the given index is valid
+ * 0 if the element with the given index is empty or marked free
+ * -1 if the element if out of the range */
+int ht_get_byindex(struct hashtable *t, unsigned int index)
+{
+ if (index >= t->size)
+ return -1;
+ if (t->table[index] == NULL || t->table[index] == ht_free_element)
+ return 0;
+ return 1;
+}
+
+/* Returns the hash table as an array of paris of key/value void* pointers.
+ * The array is allocated with malloc() and should be freed when no
+ * longer useful. The key and value pointers should not be freed or
+ * altered in any way, they will be handled by the hash table structure.
+ *
+ * This function is mainly useful to sort the hashtable's content
+ * without to alter the hashtable itself.
+ *
+ * Returns NULL on out of memory. */
+void **ht_get_array(struct hashtable *t)
+{
+ int used = ht_used(t);
+ void **table, **tptr;
+ long idx;
+
+ if ((table = (void**) malloc(sizeof(void*)*(used*2))) == NULL)
+ return NULL;
+ tptr = table;
+ for (idx = 0; ;idx++) {
+ int type = ht_get_byindex(t, idx);
+ if (type == -1) break;
+ if (type == 0) continue;
+ *tptr++ = ht_key(t, idx);
+ *tptr++ = ht_value(t, idx);
+ }
+ return table;
+}
+/* ------------------------- private functions ------------------------------ */
+
+/* Expand the hash table if needed */
+static int ht_expand_if_needed(struct hashtable *t)
+{
+ /* If the hash table is empty expand it to the intial size,
+ * if the table is half-full redobule its size. */
+ if (t->size == 0)
+ return ht_expand(t, HT_INITIAL_SIZE);
+ if (t->size <= t->used*2)
+ return ht_expand(t, t->size * 2);
+ return HT_OK;
+}
+
+/* Our hash table capability is a power of two */
+static unsigned int next_power(unsigned int size)
+{
+ unsigned int i = 256;
+
+ if (size >= 2147483648U)
+ return 2147483648U;
+ while(1) {
+ if (i >= size)
+ return i;
+ i *= 2;
+ }
+}
+
+/* the insert function to add elements out of ht expansion */
+static int ht_insert(struct hashtable *t, void *key, unsigned int *avail_index)
+{
+ int ret;
+ u_int32_t h;
+
+ /* Expand the hashtable if needed */
+ if ((ret = ht_expand_if_needed(t)) != HT_OK)
+ return ret;
+
+ /* Try using the first hash functions */
+ h = t->hashf(key) & t->sizemask;
+ /* this handles the removed elements */
+ if (!t->table[h] || t->table[h] == ht_free_element) {
+ *avail_index = h;
+ return HT_OK;
+ }
+ t->collisions++;
+ if (t->key_compare(key, t->table[h]->key))
+ return HT_BUSY;
+
+ while(1) {
+ h = (h+1) & t->sizemask;
+ /* this handles the removed elements */
+ if (!t->table[h] || t->table[h] == ht_free_element) {
+ *avail_index = h;
+ return HT_OK;
+ }
+ t->collisions++;
+ if (t->key_compare(key, t->table[h]->key))
+ return HT_BUSY;
+ }
+}
+
+/* ------------------------- provided destructors --------------------------- */
+
+/* destructor for heap allocated keys/values */
+void ht_destructor_free(void *obj)
+{
+ free(obj);
+}
+
+/* ------------------------- provided comparators --------------------------- */
+
+/* default key_compare method */
+int ht_compare_ptr(void *key1, void *key2)
+{
+ return (key1 == key2);
+}
+
+/* key compare for nul-terminated strings */
+int ht_compare_string(void *key1, void *key2)
+{
+ return (strcmp(key1, key2) == 0) ? 1 : 0;
+}
+
+/* -------------------- hash functions for common data types --------------- */
+
+/* We make this global to allow hash function randomization,
+ * as security measure against attacker-induced worst case behaviuor.
+ *
+ * Note that being H_i the strong hash function with init value of i
+ * and H_i' the same hash function with init value of i' than:
+ *
+ * if H_i(StringOne) is equal to H_i(CollidingStringTwo)
+ *
+ * it is NOT true that
+ *
+ * H_i'(StringOne) is equal to H_i''(CollidingStringTwo)
+ */
+static u_int32_t strong_hash_init_val = 0xF937A21;
+
+/* Set the secret initialization value. It should be set from
+ * a secure PRNG like /dev/urandom at program initialization time */
+void ht_set_strong_hash_init_val(u_int32_t secret)
+{
+ strong_hash_init_val = secret;
+}
+
+/* __ht_strong_hash wrapper that mix a user-provided initval
+ * with the global strong_hash_init_val. __ht_strong_hash is
+ * even exported directly. */
+u_int32_t ht_strong_hash(u_int8_t *k, u_int32_t length, u_int32_t initval)
+{
+ return __ht_strong_hash(k, length, initval^strong_hash_init_val);
+}
+
+/* Hash function suitable for C strings and other data types using
+ * a 0-byte as terminator */
+u_int32_t ht_hash_string(void *key)
+{
+ return __ht_strong_hash(key, strlen(key), strong_hash_init_val);
+}
+
+/* This one is to hash the value of the pointer itself. */
+u_int32_t ht_hash_pointer(void *key)
+{
+ return __ht_strong_hash((void*)&key, sizeof(void*), strong_hash_init_val);
+}
95 aht.h
@@ -0,0 +1,95 @@
+/* An implementation of hash tables:
+ * Copyright(C) 2000-2004 by Salvatore Sanfilippo <antirez@invece.org>
+ *
+ * This software is under the GNU GPL license
+ */
+
+#include <sys/types.h>
+
+#ifndef _AHT_H
+#define _AHT_H
+
+/* Fix to compile under WIN32/MINGW and SunOS */
+#if defined(WIN32) || defined(__sun__)
+#ifndef u_int8_t
+#define u_int8_t unsigned char
+#define u_int16_t unsigned short
+#define u_int32_t unsigned int
+#endif
+#endif
+
+/* ------------------------------ exit codes -------------------------------- */
+#define HT_OK 0 /* Success */
+#define HT_FOUND 1 /* Key found */
+#define HT_NOTFOUND 2 /* Key not found */
+#define HT_BUSY 3 /* Key already exist */
+#define HT_NOMEM 4 /* Out of memory */
+#define HT_IOVERFLOW 5 /* Index overflow */
+#define HT_INVALID 6 /* Invalid argument */
+
+#define HT_INITIAL_SIZE 256
+
+/* ----------------------- hash table structures -----------------------------*/
+struct ht_ele {
+ void *key;
+ void *data;
+};
+
+struct hashtable {
+ struct ht_ele **table;
+ unsigned int size;
+ unsigned int sizemask;
+ unsigned int used;
+ unsigned int collisions;
+ u_int32_t (*hashf)(void *key);
+ int (*key_compare)(void *key1, void *key2);
+ void (*key_destructor)(void *key);
+ void (*val_destructor)(void *obj);
+};
+
+/* ----------------------------- Prototypes ----------------------------------*/
+int ht_init(struct hashtable *t);
+int ht_move(struct hashtable *orig, struct hashtable *dest, unsigned int index);
+int ht_expand(struct hashtable *t, size_t size);
+int ht_add(struct hashtable *t, void *key, void *data);
+int ht_replace(struct hashtable *t, void *key, void *data);
+int ht_rm(struct hashtable *t, void *key);
+int ht_destroy(struct hashtable *t);
+int ht_free(struct hashtable *t, unsigned int index);
+int ht_search(struct hashtable *t, void *key, unsigned int *found_index);
+int ht_get_byindex(struct hashtable *t, unsigned int index);
+int ht_resize(struct hashtable *t);
+void **ht_get_array(struct hashtable *t);
+
+/* provided destructors */
+void ht_destructor_free(void *obj);
+#define ht_no_destructor NULL
+
+/* provided compare functions */
+int ht_compare_ptr(void *key1, void *key2);
+int ht_compare_string(void *key1, void *key2);
+
+/* ------------------------ The hash functions ------------------------------ */
+u_int32_t djb_hash(unsigned char *buf, size_t len);
+u_int32_t djb_hashR(unsigned char *buf, size_t len);
+u_int32_t trivial_hash(unsigned char *buf, size_t len);
+u_int32_t trivial_hashR(unsigned char *buf, size_t len);
+u_int32_t ht_strong_hash(u_int8_t *k, u_int32_t length, u_int32_t initval);
+u_int32_t __ht_strong_hash(u_int8_t *k, u_int32_t length, u_int32_t initval);
+
+/* ----------------- hash functions for common data types ------------------- */
+u_int32_t ht_hash_string(void *key);
+u_int32_t ht_hash_pointer(void *key);
+
+/* ----------------------------- macros --------------------------------------*/
+#define ht_set_hash(t,f) ((t)->hashf = (f))
+#define ht_set_key_destructor(t,f) ((t)->key_destructor = (f))
+#define ht_set_val_destructor(t,f) ((t)->val_destructor = (f))
+#define ht_set_key_compare(t,f) ((t)->key_compare = (f))
+#define ht_collisions(t) ((t)->collisions)
+#define ht_size(t) ((t)->size)
+#define ht_used(t) ((t)->used)
+#define ht_key(t, i) ((t)->table[(i)]->key)
+#define ht_value(t, i) ((t)->table[(i)]->data)
+
+#endif /* _AHT_H */
299 antigetopt.c
@@ -0,0 +1,299 @@
+/* antigetopt -- a getopt replacement
+ * Copyright(C) 2001 Salvatore Sanfilippo <antirez@invece.org>
+ * This software is released under the GPL license
+ * see the COPYING file for more information */
+
+/* $Id: antigetopt.c,v 1.1.1.1 2005/10/02 22:44:47 antirez Exp $ */
+
+/* TODO:
+ * argument list sanity check */
+
+#include <stdlib.h>
+#include <string.h>
+#include <stdio.h>
+
+#include "antigetopt.h"
+
+/* global vars */
+char *ago_optarg = NULL;
+char *ago_optname = NULL;
+char ago_optchar = '\0';
+
+/* static vars */
+static struct ago_exception {
+ int (*tester)(void);
+ char *msg;
+} ago_exceptions[3] = {
+ { NULL, NULL },
+ { NULL, NULL },
+ { NULL, NULL }
+};
+
+static int ago_exception_bits[] = { AGO_EXCEPT0, AGO_EXCEPT1, AGO_EXCEPT2 };
+
+/* static functions */
+static struct ago_optlist
+*ago_lookup(struct ago_optlist *list, char *arg, int *islong, int *amb);
+static int strinitcmp(char *a, char *b);
+
+/*----------------------------- implementation ------------------------------ */
+
+int antigetopt(int argc, char **argv, struct ago_optlist *list)
+{
+ static char **save_argv = NULL;
+ static char *chain = NULL;
+ static int endoptions = 0;
+ struct ago_optlist *opt;
+ int islong;
+
+ argc = argc; /* avoid a warning */
+
+ /* Reset */
+ if (argv == NULL) {
+ save_argv = NULL;
+ chain = NULL;
+ endoptions = 0;
+ return AGO_RESET;
+ } else {
+ if (save_argv == NULL) {
+ save_argv = argv+1; /* skips the argv[0] */
+ /* XXX: argument list sanity check */
+ }
+ }
+
+chain_start:
+ if (chain) {
+ if (*chain == '\0')
+ chain = NULL;
+ else {
+ if ((opt = ago_lookup(list, chain, &islong, NULL))
+ == NULL)
+ return AGO_UNKNOWN;
+ if (!(opt->ao_flags & AGO_NOARG)) {
+ /* the if expression maybe false if the
+ * argument is optional */
+ if (chain[1] == '\0' && *save_argv)
+ ago_optarg = *save_argv++;
+ /* while it is mandatory for the NEEDARG type */
+ else if (opt->ao_flags & AGO_NEEDARG)
+ return AGO_REQARG;
+ }
+ chain++;
+ return opt->ao_id;
+ }
+ }
+
+ argv = save_argv;
+
+ /* handle the "--" special option */
+ if (*argv && strcmp(*argv, "--") == 0) {
+ endoptions = 1;
+ argv++;
+ save_argv++;
+ }
+
+ while(*argv) {
+ /* The option must start with '-' */
+ if (!endoptions && argv[0][0] == '-' && argv[0][1] != '\0') {
+ int amb;
+
+ /* note: ago_lookup also sets ago_optname */
+ if ((opt = ago_lookup(list, argv[0], &islong, &amb))
+ == NULL)
+ return amb ? AGO_AMBIG : AGO_UNKNOWN;
+
+ /* handle the collapsed short options */
+ if (!islong && argv[0][2] != '\0') {
+ chain = argv[0]+1;
+ save_argv++;
+ goto chain_start;
+ }
+
+ /* if the option require or may have an argument */
+ ago_optarg = NULL;
+ /* If the argument is needed we get the next argv[]
+ * element without care about what it contains */
+ if (opt->ao_flags & AGO_NEEDARG) {
+ if (argv[1] == NULL)
+ return AGO_REQARG;
+ ago_optarg = argv[1];
+ argv++;
+ }
+ /* If the argument is optional we only recognize it
+ * as argument if it does not starts with '-' */
+ else if (opt->ao_flags & AGO_OPTARG) {
+ if (argv[1] && argv[1][0] != '-') {
+ ago_optarg = argv[1];
+ argv++;
+ }
+ }
+ save_argv = argv+1;
+ return opt->ao_id;
+ } else {
+ save_argv = argv+1;
+ ago_optarg = argv[0];
+ ago_optchar = '\0';
+ ago_optname = NULL;
+ return AGO_ALONE;
+ }
+ }
+ return AGO_EOF;
+}
+
+#define UNK_SHORT_ERRSTRING "invalid option -- %c\n"
+#define UNK_LONG_ERRSTRING "unrecognized option `--%s'\n"
+#define ARG_SHORT_ERRSTRING "option requires an argument -- %c\n"
+#define ARG_LONG_ERRSTRING "option `--%s' requires an argument\n"
+#define AMB_ERRSTRING "option `--%s' is ambiguos\n"
+#define IERR_ERRSTRING "internal error. ago_gnu_error() called with " \
+ "a bad error code (%d)\n"
+void ago_gnu_error(char *pname, int error)
+{
+ if (pname)
+ fprintf(stderr, "%s: ", pname);
+ switch(error) {
+ case AGO_UNKNOWN:
+ if (ago_optname)
+ fprintf(stderr, UNK_LONG_ERRSTRING,
+ ago_optname);
+ else
+ fprintf(stderr, UNK_SHORT_ERRSTRING,
+ ago_optchar);
+ break;
+ case AGO_REQARG:
+ if (ago_optname)
+ fprintf(stderr, ARG_LONG_ERRSTRING,
+ ago_optname);
+ else
+ fprintf(stderr, ARG_SHORT_ERRSTRING,
+ ago_optchar);
+ break;
+ case AGO_AMBIG:
+ fprintf(stderr, AMB_ERRSTRING, ago_optname);
+ break;
+ default:
+ fprintf(stderr, IERR_ERRSTRING, error);
+ break;
+ }
+}
+
+int ago_set_exception(int except_nr, int (*tester)(void), char *msg)
+{
+ if (tester == NULL || msg == NULL || except_nr < 0 || except_nr >= 3)
+ return -1;
+ ago_exceptions[except_nr].tester = tester;
+ ago_exceptions[except_nr].msg = msg;
+ return 0;
+}
+
+/*-------------------------- static functions ------------------------------- */
+
+struct ago_optlist
+*ago_lookup(struct ago_optlist *list, char *arg, int *islong, int *amb)
+{
+ int i;
+
+ /* ago_lookup can be receive as `arg' a pointer to a
+ * long argument, like --option, a pointer to a short
+ * argument like -O, or just a pointer to a char sequence
+ * in the case of collapsed short arguments like -abcde. */
+
+ /* Clear the 'ambiguos' flag, used to report the caller
+ * an ambiguos option abbreviation error */
+ if (amb) *amb = 0;
+
+ if (*arg == '-') /* skips the first - if any */
+ arg++;
+
+ switch(*arg) {
+ case '\0':
+ return NULL;
+ case '-':
+ *islong = 1;
+ arg++; /* skip the last - */
+ break;
+ default:
+ *islong = 0;
+ break;
+ }
+
+ /* search the argument in the list */
+ if (*islong) {
+ int retval;
+ struct ago_optlist *last = NULL;
+
+ while(!(list->ao_flags & AGO_ENDOFLIST)) {
+ ago_optname = arg;
+ ago_optchar = '\0';
+ if ((retval = strinitcmp(arg, list->ao_long)) != 0) {
+ switch(retval) {
+ case 1:
+ if (last) {
+ if (amb) *amb = 1;
+ return NULL;
+ }
+ last = list;
+ break;
+ case 2:
+ goto ok;
+ }
+ }
+ list++;
+ }
+ if (last) {
+ ago_optname = last->ao_long;
+ list = last;
+ goto ok;
+ }
+ } else {
+ ago_optchar = *arg;
+ ago_optname = NULL;
+ while(!(list->ao_flags & AGO_ENDOFLIST)) {
+ if (*arg == list->ao_short)
+ goto ok;
+ list++;
+ }
+ }
+ return NULL;
+ok:
+ /* handle the exceptions if any */
+ for (i = 0; i < 3; i++) {
+ if ((list->ao_flags & ago_exception_bits[i]) &&
+ ago_exceptions[i].tester)
+ {
+ if (ago_exceptions[i].tester()) {
+ if (ago_optname) {
+ fprintf(stderr, "%s `--%s'\n",
+ ago_exceptions[i].msg,
+ ago_optname);
+ } else {
+ fprintf(stderr, "%s `-%c'\n",
+ ago_exceptions[i].msg,
+ ago_optchar);
+ }
+ exit(1);
+ }
+ }
+ }
+ return list;
+}
+
+/* Given two strings this function returns:
+ * 1, if the strings are the same for the len of the first string (abc, abcde)
+ * 2, if the strings are exactly the same: (abcd, abcd)
+ * otherwise zero is returned (abcde, abcd) ... (djf, 293492) */
+int strinitcmp(char *a, char *b)
+{
+ if (!a || !b)
+ return 0;
+ while (*a && *b) {
+ if (*a != *b)
+ return 0;
+ a++; b++;
+ }
+ if (*a)
+ return 0;
+ if (*a == *b)
+ return 2;
+ return 1;
+}
35 antigetopt.h
@@ -0,0 +1,35 @@
+#ifndef __ANTIGETOPT_H
+#define __ANTIGETOPT_H
+
+/* special return codes */
+enum { AGO_EOF=4000, AGO_ALONE, AGO_UNKNOWN, AGO_REQARG, AGO_RESET, AGO_AMBIG };
+
+/* option flags */
+#define AGO_NOARG (1<<0) /* no argument */
+#define AGO_NEEDARG (1<<1) /* required argument */
+#define AGO_OPTARG (1<<2) /* optional argument */
+#define AGO_EXCEPT0 (1<<3) /* exception #0 */
+#define AGO_EXCEPT1 (1<<4) /* exception #1 */
+#define AGO_EXCEPT2 (1<<5) /* exception #3 */
+#define AGO_ENDOFLIST (1<<15) /* end of argument list marker */
+
+/* option list null term */
+#define AGO_LIST_TERM {'\0',NULL,0,AGO_ENDOFLIST}
+
+/* The structure that defines an argument */
+struct ago_optlist {
+ char ao_short;
+ char *ao_long;
+ int ao_id;
+ int ao_flags;
+};
+
+extern char *ago_optarg;
+extern char *ago_optname;
+extern char ago_optchar;
+
+int antigetopt(int argc, char **argv, struct ago_optlist *list);
+void ago_gnu_error(char *pname, int error);
+int ago_set_exception(int except_nr, int (*tester)(void), char *msg);
+
+#endif /* __ANTIGETOPT_H */
3,170 blacklist.h
@@ -0,0 +1,3170 @@
+/* blacklist.h -- Part of the Visitors Web Log Analyzer
+ * 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
+ *
+ * It is modified for visitors in order to make regexps
+ * simpler direct matches that can be performed with strstr()
+ * C lib function.
+ */
+
+#define VI_BLACKLIST_LEN (sizeof(vi_blacklist)/sizeof(char*))
+
+static char *vi_blacklist[] = {
+"lsotr",
+"lostr",
+"blowjob",
+"enlargement",
+"sonneries",
+"levitra",
+"lolita",
+"phentermine",
+"viagra",
+"zyban",
+"valtex",
+"xenical",
+"adipex",
+"meridia",
+"netfirms",
+"apartment",
+"milf",
+"hunter",
+"moms",
+"fucking",
+"casino",
+"prozac",
+"zoloft",
+"xanax",
+"valium",
+"hydrocodone",
+"vicodin",
+"paxil",
+"vioxx",
+"ragazze",
+"ultram",
+"tenuate",
+"tramadol",
+"pheromones",
+"phendimetrazine",
+"ionamin",
+"ortho",
+"tricyclen",
+"retin",
+"valtrex",
+"zyrtec",
+"ambien",
+"flonase",
+"allegra",
+"didrex",
+"renova",
+"bontril",
+"nexium",
+"-4-you.info",
+"-4u.info",
+"-mobile-phones.org",
+"-site.info",
+".gb.com",
+".lycos.de",
+".static.net",
+"-casino.com",
+"-poker.com",
+"-porn.com"
+"01-beltonen.com",
+"01-klingeltoene.at",
+"01-klingeltoene.de",
+"01-loghi.com",
+"01-logo.com",
+"01-logot.com",
+"01-logotyper.com",
+"01-melodia.com",
+"01-melodias.com",
+"01-ringetone.com",
+"01-ringsignaler.com",
+"01-ringtone.com",
+"01-ringtones.us",
+"01-soittoaanet.com",
+"01-suonerie.com",
+"01-toque.com",
+"01ringtones.co.uk",
+"0adult-cartoon.com",
+"0adult-manga.com",
+"0cartoon-porn.com",
+"0cartoon-sex.com",
+"0cartoon.com",
+"0casino-online.com",
+"0casinoonline.com",
+"0catch.com",
+"0free-hentai.com",
+"0freehentai.com",
+"0hentai-anime.com",
+"0hentai-manga.com",
+"0hentaimanga.com",
+"0livesex.com",
+"0manga-porno.com",
+"0manga-sesso.com",
+"0manga.com",
+"0sesso-amatoriale.com",
+"0sesso-orale.biz",
+"0sesso.biz",
+"0sesso.us",
+"0sessoanale.com",
+"0sessogratis.us",
+"0sex-toons.com",
+"0sfondi-desktop.com",
+"0sfondi.com",
+"0suonerie.com",
+"0tatuaggi.com",
+"0toons.com",
+"0video-porno.com",
+"0xxx-cartoon.com",
+"1-bignaturals.com",
+"1-cumfiesta.com",
+"1-klingeltone.com",
+"1-online-poker.us",
+"1-poker-games.biz",
+"1-welivetogether.com",
+"1-wholesale-distributor.com",
+"100-sex.com",
+"100free.com",
+"100hgh.com",
+"101pills.com",
+"108bikes.com",
+"123-home-improvement-equity-loans.com",
+"123-sign-making-equipment-and-supplies.com",
+"123onlinepoker.com",
+"123sessogratis.com",
+"125mb.com",
+"15668.com",
+"16pp.com",
+"1a1merchantaccounts.com",
+"1asphost.com",
+"1concerttickets.com",
+"1footballtickets.com",
+"1freespot.com",
+"1on8.co.uk",
+"1on8.com",
+"1st-advantage-credit-repair.com",
+"1st-auto-insurance-4u.com",
+"1st-host.org",
+"1st-payday-loans.net",
+"1st-phonecard.com",
+"1st-poker-online.com",
+"1st-printer-ink-cartridge.com",
+"1st-shemale-sex.com",
+"1stincomeracing.co.uk",
+"1stindustrialdirectory.com",
+"1stlookcd.com",
+"1xp6z.com",
+"20fr.com",
+"216.130.167.230",
+"24-hour-fitness-online.com",
+"247-rx.net",
+"2ndmortgageinterestrates.com",
+"2teens.net",
+"2twinks.com",
+"2y.net",
+"2zj.cn",
+"3-day-diet-plan.com",
+"321cigarettes.com",
+"333-poker.com",
+"3333.ws",
+"365jp.com",
+"38ha.com",
+"3host.com",
+"3sixtyfour.com",
+"3yaoi.com",
+"404host.com",
+"404servers.com",
+"41b.net",
+"42tower.ws",
+"444-poker.com",
+"4hs8.com",
+"4mg.com",
+"4result.net",
+"4u-topshelfpussy.com",
+"4womenoftheworld.com",
+"51.net",
+"51asa.com",
+"555-poker.com",
+"5amateurs.com",
+"65.217.108.182",
+"666-gambling.com",
+"69.61.11.163",
+"6p.org.uk",
+"6x.to",
+"7host.com",
+"7p.org.uk",
+"7yardsweb.com",
+"888-online-poker.com",
+"888cas.com",
+"888jack.com",
+"88aabb.com",
+"8bit.co.uk",
+"8gold.com",
+"8k.com",
+"8yardsweb.com",
+"911easymoney.com",
+"911pills.info",
+"989888.com",
+"9p.org.uk",
+"a--e.com",
+"a-1-versicherungsvergleich.de",
+"a-pics.net",
+"a-purfectdream-expression.com",
+"a-stories.com",
+"a1-mortgage-finder.com",
+"a1cellphoneaccessories.info",
+"a1digitalcameras.info",
+"a1metalbuildings.info",
+"a1steelbuildings.info",
+"a1timemanagement.info",
+"abc3x.com",
+"abnehmen-ganz-sicher.com",
+"abocams.de",
+"aboutgrouphomes.com",
+"abymetro.org.uk",
+"academyofmusic.us",
+"acceptcreditcardsonlineinternetmerchantaccountservices.com",
+"acceptcreditcardsrealtime.com",
+"accompagnatrici.cc",
+"achtung.hopto.org",
+"acornfm.com",
+"acornwebdesign.co.uk",
+"acrs.us",
+"activerx.com",
+"acyclovir.net",
+"addictinggames.com",
+"aducasher.spb.ru",
+"adult-dvd-dot.com",
+"adult-dvds-dot.com",
+"adult-free-webcams.com",
+"adult-friend.info",
+"adult-games.name",
+"adult-manga.org",
+"adult-porno.us",
+"adultfreehosting.com",
+"adultfriendfinder.com",
+"adultfriendfindernow.com",
+"adultfriendfindersite.com",
+"adultfriendsite.com",
+"adulthostpro.com",
+"adultlingerieuk.com",
+"adultnonstop.com",
+"adultporncentral.net",
+"adultserviceproviders.com",
+"adultshare.com",
+"advantage-quotes.com",
+"aektschen.de",
+"aesthetics.co.il",
+"affilino.net",
+"afreeserver.com",
+"ahbabe.com",
+"aimite.com",
+"airfare-links.net",
+"airshow-china.com.cn",
+"alawna.blogspot.com",
+"all-calmortgage.com",
+"all-debt-consolidation.org",
+"all-fioricet.com",
+"all-gay-porn.us",
+"all-poker-online",
+"all-we-live-together.com",
+"allago.de",
+"allfind.us",
+"allinsurancetype.com",
+"allmagic.ru",
+"alloha.info",
+"allohaweb.com",
+"allthediets.com",
+"allthroating.com",
+"almacenpc.com",
+"alphacarolinas.org",
+"alright.com.ru",
+"alumnicards.com",
+"amateur-lesbian.us",
+"amateur-movie.us",
+"amateur-naked.us",
+"amateur-porn-gallery.com",
+"amateur-porno.us",
+"amateur-site.us",
+"amateur-thumbnail.com",
+"amateur-thumbs.net",
+"amateurjerkoff.org",
+"amateurs-xxx.us",
+"amateurs.r00m.com",
+"amateursuite.com",
+"amazing-satellite-tv-deals.info",
+"americacashfast.com",
+"american-single-dating.com",
+"americancdduplication.com",
+"americanpaydayloans.net",
+"americastgp.com",
+"amoxicillin-online.net",
+"anal-sex-pictures.us",
+"analloverz.com",
+"andyedf.de",
+"angenehmen-aufenthalt.de",
+"animal-fuck.org",
+"animal-porn.ws",
+"animalsex-movies-archive.com",
+"animalsex-pics-gallery.com",
+"anime-adult.us",
+"anime-hentai-porn.com",
+"anime-manga.us",
+"anime-porn-sex-xxx.com",
+"anime-porn.name",
+"anime-sex-cartoon-porn.com",
+"annunci-coppie.net",
+"annunci-erotici.net",
+"annunci-erotici.org",
+"annunci-personali.org",
+"annunci-sesso.org",
+"annunci-sesso.us",
+"annuncisesso.us",
+"anonsi.com",
+"anonymous-blogger.com",
+"ansar-u-deen.org",
+"anti-exploit.com",
+"anticlick.com.ru",
+"anuntisinmobiliaria.com",
+"anxietydisorders.biz",
+"anylight4u.com",
+"anything4health.com",
+"anzwers.org",
+"aol-com.us",
+"ap8.com",
+"apecceosummit2003.com",
+"apollopatch.com",
+"apornhost.com",
+"apply-to-green-card.org",
+"appollo.org",
+"approval-loan.com",
+"aquari.ru",
+"aquatyca.net",
+"arcsecurity.co.uk",
+"area-code-npa-nxx.com",
+"argendrom.com",
+"armor2net.com",
+"aromacc.com",
+"artsculpture.org",
+"aseman.weblogs.us",
+"asian-girls-porn-sex.com",
+"asian-girls.name",
+"asian-nude.blogspot.com",
+"asian-sex-woman.com",
+"asianbum.com",
+"ass-picture.us",
+"assserver.com",
+"at-capstone.com",
+"atkins-diet-center.com",
+"atkinsexpert.com",
+"atkpremium.net",
+"atkpremium.org",
+"atlanta2000.org",
+"atlas-pharmacy.com",
+"auctionmoneymakers.com",
+"auktions-uebersicht.de",
+"australia-online-travel.com",
+"austria-travels.info",
+"auto-insurance-links.net",
+"auto-loans-usa.biz",
+"autodetailproducts.com",
+"autodirektversicherung.com",
+"autofinanzierung-autokredit.de",
+"autofinanzierung-zum-festzins.de",
+"autohandelsmarktplatz.de",
+"autokredit-autofinanzierung.de",
+"autokredit-tipp.de",
+"automotive.com",
+"autumn-jade.com",
+"avon-one.com",
+"azian.org",
+"b-witchedcentral.co.uk",
+"ba2000.com",
+"babes-d.com",
+"babes-plus.com",
+"baby-perfekt.de",
+"babymarktplatz-aktiv.de",
+"back-room-facials.angelcities.com",
+"background-check.info",
+"backroom-facials.150m.com",
+"backseatbangers",
+"bad-movies.net",
+"bad-passion.com",
+"bahraichfun.com",
+"bali-dewadewi-tours.com",
+"bali-hotels.co.uk",
+"balidiscovery.org",
+"balivillas.net",
+"balltaas.com",
+"banialoba3w.150m.com",
+"banned-pics.com",
+"bannedhome.com",
+"barcodes.cn",
+"bare.org",
+"barely-legal-teenb.com",
+"barely-legald.com",
+"barelylegalgirlsex.com",
+"bargainfindsonebay.com",
+"bargeld-tipp.de",
+"basi-musicali.com",
+"basketball--betting.net",
+"bast3.ru",
+"batukaru.",
+"bbwclips.com",
+"bccinet.org",
+"bdsm-story.blogspot.com",
+"beastiality-animal-sex-stories.com",
+"beastiality-stories.net",
+"beastsex-movies.com",
+"beauty-farm.net",
+"bedding-etc.com",
+"belinking.com",
+"belle-donne.biz",
+"belle-ragazze.net",
+"belle-ragazze.org",
+"belleragazze.biz",
+"belleragazze.org",
+"bellissime-donne.com",
+"bellissime-donne.net",
+"bellissimedonne.com",
+"bellissimedonne.org",
+"beltonen-logos-spel.com",
+"benessere.us",
+"berwickfoundation.org",
+"best-buy-cialis.com",
+"best-cell-phone-batteries.info",
+"best-cialis-source.com",
+"best-deals-blackjack.info",
+"best-deals-casino.info",
+"best-deals-cheap-airline-tickets.info",
+"best-deals-diet.info",
+"best-deals-flowers.info",
+"best-deals-hotels.info",
+"best-deals-online-gambling.info",
+"best-deals-online-poker.info",
+"best-deals-poker.info",
+"best-deals-roulette.info",
+"best-deals-weight-loss.info",
+"best-e-site.com",
+"best-gambling.biz",
+"best-high-speed-internet.com",
+"best-internet-bingo.com",
+"best-pharmacy.us",
+"best-result-fast.com",
+"bestasianteens.com",
+"bestdims.com",
+"bestdvdclubs.com",
+"bestgamblinghouseonline.com",
+"besthandever.com",
+"bestiality-pics.org",
+"bestialitylinks.org",
+"bestits.net",
+"bestlowmortgagerates",
+"bestonline-medication.com",
+"bestonline-medication.net",
+"bestonline-shopping.com",
+"bestpornhost.com",
+"bet-on-horseracing.com",
+"beverlyhillspimpandhos.com",
+"beverlyhillspimpsandhos.com",
+"biexperience.org",
+"big-black-butts.net",
+"big-breast-success.com",
+"big-hooters.net",
+"big-natural-boobs.us",
+"big-naturals-4u.com",
+"big-rant.com",
+"bigbras-club.com",
+"bigmag.com.ua",
+"bigmoms.com",
+"bigtitchaz.com",
+"bigyonet.com",
+"bildmitteilung.us",
+"billigfluege-billige-fluege.de",
+"bingo-net.com",
+"bio-snoop.com",
+"birth-control-links.com",
+"bizhat.com",
+"bj-cas.cn",
+"bj-fyhj.com",
+"bj-hchy.com",
+"bjerwai.com",
+"bjgift.com",
+"bjkhp.com",
+"bjxhjy.com",
+"bla5.com",
+"black-amateur-cock.net",
+"black-dick-white-slut.com",
+"black-girls.blowsearch.ws",
+"black-jack-4u.net",
+"black-jack-trx.com",
+"blackbusty.com",
+"blackjack-123.com",
+"blackjack-21.ws",
+"blackjack-4u.net",
+"blackjack-777.net",
+"blackjack-8.com",
+"blackjack-dot.com",
+"blackjack-homepage.com",
+"blackjack-p.com",
+"blackjack-play-blackjack.com",
+"blackjack-winner.net",
+"blackjack.fm",
+"blackjack777.net",
+"blackjacksite.net",
+"blahblah.tk",
+"blk-web.de",
+"bllogspot.com",
+"blog-tips.com",
+"bloglabs.biz",
+"blogman.biz",
+"blogmen.net",
+"blogspam.org",
+"blonde-pussy.us",
+"blonde-video.us",
+"blonde-xxx.us",
+"blondes2fuck.com",
+"blumengruss-onlineshop.de",
+"blumenshop-versand.de",
+"bnetsol.com",
+"body-jewelry.reestr.net",
+"body-piercing.softinterop.com",
+"bodyjock.com",
+"bon-referencement.com",
+"bondage-story.blogspot.com",
+"boobmorning.com",
+"boobspost.com",
+"booktextone.com",
+"boom.ru",
+"borindonaragara.com",
+"boysgonebad.net",
+"brazilbang.biz",
+"breast-augmentation.top-big-tits.com",
+"briana-banks-dot.com",
+"british-hardcore.net",
+"bszz.com",
+"bueroversand-xxl.de",
+"bugaboo-stroller.com",
+"build-penis.com",
+"bulkemailsoft.com",
+"burningcar.net",
+"burundonamagara.com",
+"business-grants.org",
+"business-web-site.net",
+"businessgrants.biz",
+"busty-models.us",
+"bustyangelique.com",
+"bustydustystash.com",
+"bustykerrymarie.com",
+"butalbital.org",
+"buy-2005-top.com",
+"buy-2005.com",
+"buy-adult-sex-toys.com",
+"buy-adult-toys.biz",
+"buy-car-insurance-4-us.com",
+"buy-ceramics.com",
+"buy-cheapest-lexapro-side-effects-noprescription.biz",
+"buy-cialis.ws",
+"buy-computer-memory.net",
+"buy-computer.us",
+"buy-discount-airline-tickets.com",
+"buy-laptop.biz",
+"buy-rx-usa.com",
+"buy-sex-toys.net",
+"buycheapcialis",
+"buycheappills.net",
+"buyhgh",
+"buylipitor",
+"buyprilosec",
+"buystuffpayless.com",
+"buyzocor",
+"byronbayinternet.com",
+"c-start.net",
+"ca-america.com",
+"ca-s-ino.com",
+"calendari-donne.com",
+"calendari-donne.net",
+"calendaridonne.com",
+"calendaridonne.net",
+"california-real-estate-sale.com",
+"callingcardchoice.com",
+"cambridgetherapynotebook.co.uk",
+"camemberts.org",
+"canadianlabels.net",
+"cantwell2000.com",
+"canzoni-italiane.com",
+"canzoni-italiane.net",
+"canzoni-italiane.org",
+"canzoni-karaoke.com",
+"canzoni-mp3.com",
+"canzoni-mp3.us",
+"canzoni-musica.com",
+"canzoni.cc",
+"canzonisanremo.com",
+"canzonistraniere.com",
+"capital-credit-cards.com",
+"capquella.com",
+"captain-stabbin-4u.com",
+"captain-stabbin.blogspot.com",
+"car-financing-low-rates.biz",
+"car-fuck.net",
+"car-rental-links.com",
+"car-rental-search.com",
+"car-rentals-2go.com",
+"card-games-tfx.com",
+"cardsloansmortgages.com",
+"caribbean-poker-web.com",
+"carnalhost.com",
+"carnumbers.ru",
+"cars-links.com",
+"cartoni-animati.com",
+"cartoni-hentai.com",
+"cartoni-hentai.net",
+"cartoni-hentai.org",
+"cartoni-porno.com",
+"cartonierotici.com",
+"cartonigiapponesi.com",
+"cartonihentai.net",
+"cartopia.com",
+"cas7.net",
+"cash-advance-quick.com",
+"cashadvanceclub.com",
+"casino-bet-casino.com",
+"casino-cash.net",
+"casino-en-ligne.fr.vu",
+"casino-game-trx.com",
+"casino-games-4-us.com",
+"casino-games-i.com",
+"casino-gaming-trx.com",
+"casino-in-linea.it.st",
+"casino-jp.com",
+"casino-on-net.com",
+"casino-online-i.com",
+"casino-online-on-line.com",
+"casino-onnet-bonus.com",
+"casino-slot.ws",
+"casino-wins.net",
+"casino.150m.com",
+"casino.menegum.co.uk",
+"casino747.net",
+"casinochique.com",
+"casinoequipmentsalesandrental.com",
+"casinolasvegas-online.com",
+"casinoplaces.net",
+"casinos-8.com",
+"casinos-jp.com",
+"casinos-plus.com",
+"castingagentur2004.de",
+"catchathief.org",
+"cbitech.com",
+"ccie-ccnie.com",
+"ccie130.com",
+"ccna-ccna.com",
+"ccna130.com",
+"ccnp-ccnp.com",
+"ccnp130.com",
+"cds-xxl.de",
+"cdshop-guenstig.de",
+"celebrexonline.us",
+"celebritylust.blog-city.com",
+"celebritypics.ws",
+"celebskin.com",
+"celebtastic.com",
+"cell-phone-accessories-dot.com",
+"ceramics-store.com",
+"certificationking.net",
+"certified-new-autos.com",
+"certified-new-cars.com",
+"certified-new-suvs.com",
+"certified-used-cars.com",
+"certified-used-suvs.com",
+"cesew.org",
+"charisma.dyndns.dk",
+"chat-l.de",
+"chatten.bilder-j.de",
+"chauffeurtours.co.uk",
+"cheap-adult-sex-toys.com",
+"cheap-airfare-airline-ticket.com",
+"cheap-celebrex-prescriptions.com",
+"cheap-christmas-gifts.co.uk",
+"cheap-cigarettes.com",
+"cheap-laptop-notebook.netdims.com",
+"cheap-online-pharmacy.org",
+"cheap-pills-online.com",
+"cheap-web-hosting-companies.com",
+"cheapacyclovir.com",
+"cheapcodeine.biz",
+"cheapdrugpharmacy.com",
+"cheaper-digital-cameras.uk.com",
+"cheaper-loans.eu.com",
+"cheapest-pills-online.com",
+"cheapgenericsoma.info",
+"cheapsomaonline.biz",
+"cheaptabs.envy.nu",
+"checkmeds.com",
+"cherrybrady.com",
+"chickz.com",
+"chillout.bpa.nu",
+"chinaaircatering.com",
+"chinagoldcoininc.com",
+"chineseapesattack",
+"chloesworld.com",
+"choose-online-university.com",
+"chrislaker.co.uk",
+"christmas-casino.spb.ru",
+"cialis-buy.com",
+"cialis-dot.com",
+"cialis-express.com",
+"cialis-weekend-pills.com",
+"cialis.homeip.net",
+"cialisapcalis.com",
+"cialisnetwork.com",
+"cialisusa.bravehost.com",
+"ciscochina.com",
+"clamber.de",
+"clanbov.com",
+"classifiche-italiane.org",
+"classifiche-musicali.com",
+"classifiche-musicali.net",
+"classifiche-musicali.org",
+"classifichemusicali.com",
+"claudiachristian.co.uk",
+"claypokerchips-claypokerchips.com",
+"cleanadulthost.com",
+"cleannbright.co.uk",
+"click-or-not.de",
+"click-poker.com",
+"clophillac.org.uk",
+"closed-network.com",
+"club-online-poker",
+"club69.net",
+"clubatlantiscasino.com",
+"cmeontv.de",
+"cnbjflower.com",
+"cngangqiu.com",
+"cntoplead.com",
+"coed-girls.com",
+"coffee-delivered.com",
+"college-girl-pic.com",
+"college-links.net",
+"college-scholarships-grants.biz",
+"combaltec.com",
+"comeback.com",
+"cometojapan.com",
+"cometomalaysia.com",
+"cometosingapore.com",
+"cometothailand.com",
+"completelycars.com",
+"completelyherbal.com",
+"comptershops-online.de",
+"computer-onlinebestellung.de",
+"computer-und-erotische-spiele-download.com",
+"computerversand-xxl.de",
+"condodream.com",
+"condosee.com",
+"conjuratia.com",
+"consolidate-debt-usa.net",
+"consolidation-loans.com",
+"container-partner.de",
+"cool-extreme.com",
+"cool-mix.com",
+"cool-poker.com",
+"coolp.biz",
+"coolp.net",
+"coolp.org",
+"coresleep.com",
+"cosmeticsurgery.us",
+"cosmeticsurgery.us.com",
+"couponmountain.com",
+"cover-your-feet.com",
+"crazyfrog.wtf.la",
+"creamfilledholes.biz",
+"credit-cards-credit-cards-credit-cards.net",
+"credit-factor.com",
+"credit-links.net",
+"credit-loans-2005.com",
+"credit-report-links.net",
+"creditcardpost.com",
+"creditrepairsoft.com",
+"creditsharpie.com",
+"crepesuzette.com",
+"crescentarian.net",
+"crpublish.com",
+"cum-facials.us",
+"cumfiesta-4u.com",
+"cumfietavideos.com",
+"cumlogin.com",
+"customer-reviews.org",
+"cutpricepills.com",
+"cyberfreehost.com",
+"cycatki.com",
+"cyclo-cross.co.uk",
+"cykanax.com",
+"dad-daughter-incest.com",
+"daiiuvwx.com",
+"dailyliving.info",
+"dallmayr.de",
+"damianer.top-100.pl",
+"danni.com",
+"darest.de",
+"darkangelclan.com",
+"darzgx.com",
+"datestop.net",
+"dating-choice.com",
+"dating-harmony.com",
+"dating-online-dating.org",
+"dating-service-dating.com",
+"dating-services-dating-service.com",
+"dating999",
+"dating999.com",
+"davidtaylor.topcities.com",
+"day4sex.com",
+"debt-consolidation-i",
+"debt-consolidation-i.biz",
+"debt-consolidation-kick-a.com",
+"debt-consolidation-low-rates.biz",
+"debt-consolidation-now-online.com",
+"debt-disappear.com",
+"debt-help-bill-consolidation-elimination.com",
+"debt-solution-tips.com",
+"debtconsolidationfirm.net",
+"debtconsolidationloans",
+"debtconsolidationusa.org",
+"debtmanagementcompanyonline.com",
+"dedichepersonali.com",
+"deep-ice.com",
+"deikmann.de",
+"dental-insurance-plan.freeservers.com",
+"dental-plan-source",
+"dentalinsurancehealth.com",
+"department-storez.com",
+"design4u.ws",
+"desiraesworld.com",
+"deutschlandweite-immobilienangebote.de",
+"devilofnights.net",
+"devilofnights.org",
+"devon-daniels.com",
+"devonanal.com",
+"dia-host.com",
+"dianepoppos.com",
+"diarypeople.com",
+"dick-deputy.com",
+"diecastdot.com",
+"diet-doctor.net",
+"diet-pills-now",
+"dieta-dimagrante.net",
+"dieta-mediterranea.net",
+"dieta-zona.com",
+"dieta.cc",
+"diete-dimagranti.com",
+"diete.bz",