Patrick Andrieu: Die erfolgreiche Fälschung

Beitrag lesen

Hallo Siechfred!

Dann zähle die Fakes doch mit:
  (/compatible; MSIE (\d)(?!.+MSIE)/) ? $IE{$1}++ : $IE{fake}++;
}

Super, danke! Das hat mir geholfen, die Zeilen zu finden, die unterschlagen wurden. Zusätzlich zu den UAs von »meinem Typ 1«:

"Mozilla/4.0 (compatible; MSIE 6.0; MSIE 5.5; Windows NT 5.1)"

gab es noch 25 solcher:

"Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; MSIECrawler)"
"Mozilla/4.0 (compatible; MSIE 5.01; Windows 95; MSIECrawler)"

Ein bisschen am RegExp geschraubt und Tadaa:

  
use strict;  
use Data::Dumper;  
  
chdir "desktop" or die $!;  
open (FILE, "IEall.txt") or die "FILEFILE: $!";  
my %IE;  
while (<FILE>) {  
  # Nicht-IEs uebergehen  
  next unless (/compatible; MSIE / && !/Opera/);  
  # alle IEs zählen  
  $IE{all}++;  
  # RegExp anwenden und auswerten  
  (/compatible; MSIE (\d)((?!.+MSIE\s)|(?!.+MSIECrawler))/) ? $IE{$1}++ : $IE{fake}++;  
}  
close FILE;  
print Dumper \%IE;  
^Z  
$VAR1 = {  
          '6' => 92096,  
          '4' => 5160,  
          '3' => 30,  
          '7' => 43580,  
          '2' => 27,  
          'all' => 148742,  
          '5' => 7849  
        };  

Summe stimmt, Fälschung erfolgreich, habe fertig... zumindest bis die nächsten chaotischen UAs auftauchen ;)

Viele Grüße aus Frankfurt/Main,
Kujau

--

_ - jenseits vom delirium - _
[link:hatehtehpehdoppelpunktslashslashwehwehwehpunktatomicminuseggspunktcomslash]
Nichts ist unmöglich? Doch!
Heute schon gegökt?
0 79

Bekloppte User Agents zuordnen (RegExp)

Patrick Andrieu
  • programmiertechnik
  1. 0
    Cheatah
    1. 2

      UA-Statistiken fälschen

      Siechfred
      • perl
      1. 0
        Patrick Andrieu
        1. 1
          Siechfred
          1. 0

            Die erfolgreiche Fälschung

            Patrick Andrieu
            1. 1

              Das Modul zur erfolgreichen Fälschung?

              Siechfred
              1. 0
                Patrick Andrieu
                1. 0
                  Siechfred
              2. 0
                Siechfred
              3. 0
                Patrick Andrieu
                1. 0
                  Siechfred
                  1. 0
                    Patrick Andrieu
                    1. 0
                      Siechfred
                      1. 0
                        Patrick Andrieu
                        1. 0
                          Siechfred
                          1. 0
                            Patrick Andrieu
                            1. 0
                              Siechfred
                              1. 0
                                Patrick Andrieu
                                1. 0
                                  Patrick Andrieu
                                  1. 0
                                    Siechfred
                                    1. 0
                                      Patrick Andrieu
                                      1. 0
                                        Siechfred
                                        1. 0
                                          Patrick Andrieu
                                          1. 0
                                            Patrick Andrieu
                                          2. 0
                                            Siechfred
                                2. 0
                                  Siechfred
            2. 0

              Die erfolgreichen Statmaker- und -fälscher-Skripts für 1&1-User!

              Patrick Andrieu
              1. 0
                Patrick Andrieu
                1. 0
                  Struppi
                  1. 0
                    Patrick Andrieu
    2. 0
      Patrick Andrieu
      1. 0
        Cheatah
        1. 0
          Patrick Andrieu
  2. 0
    Don P
    1. 0
      Don P
    2. 0
      Patrick Andrieu
      1. 0
        Don P
        1. 0
          Patrick Andrieu
          1. 0
            Don P
            1. 0
              Patrick Andrieu
      2. 0

        Logline splitter (RegExp)

        Patrick Andrieu
  3. 2
    Struppi
    1. 0
      Patrick Andrieu
      1. 0
        Patrick Andrieu
  4. 0
    Der Martin
    1. 0
      Alexander (HH)
    2. 0
      Patrick Andrieu
      1. 0
        Der Martin
        1. 0
          Cheatah
          1. 0
            Patrick Andrieu
            1. 0
              Cheatah
        2. 0
          Patrick Andrieu
          1. 0
            Der Martin
            1. 0

              RegExp'sch ist gar nicht so schwer :)

              Siechfred
              • menschelei
    3. 0
      Patrick Andrieu
      1. 0
        Der Martin
        1. 0
          Patrick Andrieu
          1. 0
            Patrick Andrieu
            1. 0
              Struppi
      2. 0
        Ingo Turski
        1. 0
          Patrick Andrieu
          1. 0
            Ingo Turski
            1. 0
              Patrick Andrieu
              1. 0
                Ingo Turski
                1. 0
                  Patrick Andrieu
                  1. 0
                    Engin
                  2. 0
                    Engin
                    1. 0
                      Patrick Andrieu
                      1. 0
                        Engin
                        1. 0
                          Patrick Andrieu
                          1. 0
                            Engin
                            1. 0
                              Patrick Andrieu
                              1. 0
                                Engin
                                1. 0
                                  Patrick Andrieu
                                  1. 0
                                    Engin
                  3. 0
                    Ingo Turski
                    1. 0
                      Patrick Andrieu
        2. 0
          Patrick Andrieu