Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #!/usr/bin/perl
- $|=1;
- while (<>) {
- chomp;
- my @X = split;
- my $method = $X[1];
- my $uri = $X[2];
- if ($method =~ m/^GET$/) {
- # Youtube.
- if ($uri =~ m/\.youtube\.com/) {
- print $X[0] . " OK\n";
- } elsif ($uri =~ m/\.googlevideo\.com/) {
- print $X[0] . " OK\n";
- } elsif ($uri =~ m/\.ytimg\.com/) {
- print $X[0] . " OK\n";
- } elsif ($uri =~ m/\.vd\.aclst\.com/) {
- print $X[0] . " OK\n";
- } elsif ($uri =~ m/\.akamaihd\.net/) {
- print $X[0] . " OK\n";
- } elsif ($uri =~ m/\.fbcdn\.net/) {
- print $X[0] . " OK\n";
- } elsif ($uri =~ m/\.dl\.playstation\.net/) {
- print $X[0] . " OK\n";
- } else {
- print $X[0] ." ERR\n";
- }
- } else {
- print $X[0] ." ERR\n";
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment