doktersquid

external acl store-id

Jul 31st, 2017
1,248
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Perl 0.70 KB | None | 0 0
  1. #!/usr/bin/perl
  2. $|=1;
  3. while (<>) {
  4. chomp;
  5. my @X = split;
  6. my $method = $X[1];
  7. my $uri = $X[2];
  8.  
  9. if ($method =~ m/^GET$/) {
  10. # Youtube.
  11. if ($uri =~ m/\.youtube\.com/) {
  12.         print $X[0] . " OK\n";
  13.  
  14. } elsif ($uri =~ m/\.googlevideo\.com/) {
  15.         print $X[0] . " OK\n";
  16.  
  17. } elsif ($uri =~ m/\.ytimg\.com/) {
  18.         print $X[0] . " OK\n";
  19.  
  20. } elsif ($uri =~ m/\.vd\.aclst\.com/) {
  21.         print $X[0] . " OK\n";
  22.  
  23. } elsif ($uri =~ m/\.akamaihd\.net/) {
  24.         print $X[0] . " OK\n";
  25.  
  26. } elsif ($uri =~ m/\.fbcdn\.net/) {
  27.         print $X[0] . " OK\n";
  28.  
  29. } elsif ($uri =~ m/\.dl\.playstation\.net/) {
  30.         print $X[0] . " OK\n";
  31.  
  32. } else {
  33.         print $X[0] ." ERR\n";
  34.        }
  35.  
  36.  
  37. } else {
  38.         print $X[0] ." ERR\n";
  39.        }
  40. }
Advertisement
Add Comment
Please, Sign In to add comment