Re: Re: Ann: 6.0.3 Release

"Aengus" <[email protected]>
Newsgroups gmane.comp.web.analog.general
Message-ID <002e01c80ba5$745165a0$0701a8c0@xppro>
On Tuesday, October 09, 2007 3:53 PM [EDT],
Aengus <[email protected]> wrote:

>
> if (*c == '5') {
>   if (*(c + 1) == '.' && (*(c + 2) == '0'))
>     *name = "Windows:Windows 2000";
>   else if (*(c + 1) == '.' && (*(c + 2) == '1')) {
>      if (strstr(whole, "x64") != NULL)
>        *name = "Windows:Windows XP64";
>      else
>         *name = "Windows:Windows XP";
>   }
> etc, etc. (I don't have time to test this at the moment).

I can confirm that this code works. I recompiled Analog, tweaked some of the 
browser strings in an existing logfile, and generated this OS Report:

Operating System Report
-----------------------
This report lists the operating systems used by visitors.

Listing operating systems, sorted by the number of requests for pages.

no.: reqs: pages: OS
---: ----: -----: --
  1:   84:    13: Windows
   :   81:    10:   Windows XP
   :    1:     1:   Windows Vista64
   :    1:     1:   Windows XP64
   :    1:     1:   Windows Vista
  2:    2:     2: Known robots

This is the code that I modified in tree.c - it's slightly different from 
what I posted above, and I only checked for XP64 and Vista64. I presume 
there's a 64 bit version of 2003 server that shoud be checked for too, and 
there's probably a more efficient way to do the check too.

   if (*c == '5') {
     if (*(c + 1) == '.' && (*(c + 2) == '0'))
       *name = "Windows:Windows 2000";
     else if (*(c + 1) == '.' && (*(c + 2) == '1')) {
       if (strstr(whole, "; x64;") != NULL)
         *name = "Windows:Windows XP64";
       else
         *name = "Windows:Windows XP";
     }
     else if (*(c + 1) == '.' && (*(c + 2) == '2'))
       *name = "Windows:Windows Server 2003";
     else
       *name = "Windows:Unknown Windows";
   }
   else if (*c =='6')  {
     if (strstr(whole, "; x64;") != NULL)
       *name = "Windows:Windows Vista64";
     else
       *name = "Windows:Windows Vista";
     }
     else if (*c >= '7' && *c <= '9')
       *name = "Windows:Unknown Windows";
     else
       *name = "Windows:Windows NT";
   }

Aengus

+------------------------------------------------------------------------
|  TO UNSUBSCRIBE from this list:
|    http://lists.meer.net/mailman/listinfo/analog-help
|
|  Analog Documentation: http://analog.cx/docs/Readme.html
|  List archives:  http://www.analog.cx/docs/mailing.html#listarchives
|  Usenet version: news://news.gmane.org/gmane.comp.web.analog.general
+------------------------------------------------------------------------
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.