source: liacs/ccs/op3/nat-proxy.pl@ 3

Last change on this file since 3 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
RevLine 
[2]1#!/usr/bin/env perl
2do "common.pl";
3
4%user_agent;
5%proxy;
6
7open(FILE,$file);
8while(<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}
22close(FILE);
23
24$total = scalar(keys %user_agent);
25$proxies = scalar(keys %proxy);
26print "proxy/others hosts: $proxies/$total ",
27 percent($proxies,$total), "\n";
28exit(0);
Note: See TracBrowser for help on using the repository browser.