Last change
on this file since 8 was 2, checked in by Rick van der Zwet, 15 years ago |
Initial import of data of old repository ('data') worth keeping (e.g. tracking
means of URL access statistics)
|
-
Property svn:executable
set to
*
|
File size:
564 bytes
|
Rev | Line | |
---|
[2] | 1 | #!/usr/bin/env perl
|
---|
| 2 | do "common.pl";
|
---|
| 3 |
|
---|
| 4 | %user_agent;
|
---|
| 5 | %proxy;
|
---|
| 6 |
|
---|
| 7 | open(FILE,$file);
|
---|
| 8 | while(<FILE>) {
|
---|
| 9 | /(\S*)\ \S*\ \S*\ \S*\ \S*\ \S*\ \S*\ \S*\ \S* \S*\ ".*"\ (.*)$/;
|
---|
| 10 | $host = $1;
|
---|
| 11 | $agent = $2;
|
---|
| 12 | if ( exists $user_agent{$host} ) {
|
---|
| 13 | if ( $user_agent{$host} ne $agent ) {
|
---|
| 14 | $proxy{$host} = "YES";
|
---|
| 15 | }
|
---|
| 16 | }
|
---|
| 17 | else {
|
---|
| 18 | $user_agent{$host} = $agent;
|
---|
| 19 | }
|
---|
| 20 |
|
---|
| 21 | }
|
---|
| 22 | close(FILE);
|
---|
| 23 |
|
---|
| 24 | $total = scalar(keys %user_agent);
|
---|
| 25 | $proxies = scalar(keys %proxy);
|
---|
| 26 | print "proxy/others hosts: $proxies/$total ",
|
---|
| 27 | percent($proxies,$total), "\n";
|
---|
| 28 | exit(0);
|
---|
Note:
See
TracBrowser
for help on using the repository browser.