[analog-help] Re: Ann: 6.0.3 Release

Aengus analog07 at eircom.net
Fri Oct 12 13:53:58 PDT 2007


Aengus <analog07 at eircom.net> wrote:
>
> If you replace lines 868-874 in trees.c with these lines:
>
>       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')
>
> and recompile, then your new copy of Analog should recognize browser
> strings like these:
>
> Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; Win64; x64; .NET
> CLR 2.0.50727; SLCC1)

Apparently, XP-64 identifies itself as NT 5.2, not 5.1, so the code 
above wouldn't work for any real XP64 browser strings, but it should 
work for Vista-64 browsers.

It's not imediately obvious whether to identify a 64-bit NT 5.2 browser 
as Server 2003-64 or as XP-64!

These lines should replace lines 869-874 in the original tree.c:

     else if (*(c + 1) == '.' && (*(c + 2) == '2')) {
       if (strstr(whole, "; x64;") != NULL)
         *name = "Windows:Windows XP64";
       else
       *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')


The next time someone wants changes made to the way browsers are 
identified, I think he or she should provide the browser strings at 
issue!

Aengus





More information about the analog-help mailing list