Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Link nya : https://www.facebook.com/notes/mikrotik-squid-indonesia/storeurl-bersama/631745193538422
- # tempat storeurl kita bersama, paste dibawah sini apabila anda merasa layak tuk dimasukkan kestoreurl
- # apabila anda merasa itu tidak layak dan atau itu rahasia anda maka jangan tampilkan
- #!/usr/bin/perl
- $|=1;
- while () {
- @X = split;
- $x = $X[0] . " ";
- $_ = $X[1];
- $u = $X[1];
- # acl dontrewrite url_regex -i s\-platform\.ak\.fbcdn\.net
- # acl store_rewrite_list url_regex -i fbcdn.*net
- # refresh_pattern -i fbcdn.*net 1440 99% 14400 override-expire override-lastmod ignore-no-cache ignore-private reload-into-ims ignore-must-revalidate ignore-reload store-stale
- # http://external.ak.fbcdn.net/safe_image.php?d=AQDfyygmJfvPVGen&w=154&h=154&url=http%3A%2F%2Fassets.kompas.com%2Fdata%2Fphoto%2F2013%2F04%2F10%2F1054532-jantungserangan-780x390.jpg&cfs=1
- # http://static.ak.fbcdn.net/rsrc.php/v2/yb/r/GsNJNwuI-UM.gif
- # http://static.ak.fbcdn.net/rsrc.php/v2/y1/r/lBvtSWSBAGQ.png
- # http://s-platform.ak.fbcdn.net/www/app_full_proxy.php?app=211923588878449&v=1&size=z&cksum=d06fe084823f168f335a831a949bf61b&src=http%3A%2F%2Fbycdn8-i.akamaihd.net%2Fantwars_id%2Fimages%2Fcontinueslogin.png
- # hasil atas http://bycdn8-i.akamaihd.net/antwars_id/images/continueslogin.png
- # http://profile.ak.fbcdn.net/hprofile-ak-ash2/274241_1187750150_2088800094_q.jpg
- if ($X[1] =~ m/^http:\/\/[\w\d\-\.\%]*fbcdn[\w\d\-\.\%]*net\/safe\_image\.php\?(.*)/) {
- print $x . "storeurl://fbcdn.SQUIDINTERNAL/" . $1 . "\n";
- } elsif ($X[1] =~ m/^http:\/\/[\w\d\-\.\%]*fbcdn[\w\d\-\.\%]*net\/rsrc\.php\/(.*)/) {
- print $x . "storeurl://fbcdn.SQUIDINTERNAL/" . $1 . "\n";
- } elsif ($X[1] =~ m/^http:\/\/[\w\d\-\.\%]*fbcdn[\w\d\-\.\%]*net\/[\w\d\-\.\%]*\/(.*)/) {
- print $x . "storeurl://fbcdn.SQUIDINTERNAL/" . $1 . "\n";
- # acl dontrewrite url_regex redbot\.org (get_video|videoplayback\?id|videoplayback.*id).*begin\=[1-9][0-9]*
- # acl store_rewrite_list url_regex -i (youtube|google).*(videoplayback|liveplay)
- # refresh_pattern -i (youtube|google).*(videoplayback|liveplay) 1440 99% 14400 override-expire override-lastmod ignore-no-cache ignore-private reload-into-ims ignore-must-revalidate ignore-reload store-stale
- } elsif ($X[1] =~ m/^http(|s)\:\/\/.*youtube.*(ptracking|stream_204|player_204|gen_204).*(video_id|docid|v)\=([^\&\s]*).*/){
- $vid = $4 ;
- @cpn = m/[&?]cpn\=([^\&\s]*)/;
- if (defined($vid )) {
- $fn = "/var/log/squid/@cpn";
- unless (-e $fn) {
- open FH,">".$fn ;
- print FH "$vid\n";
- close FH;
- }
- }
- print $x . $X[1] . "\n";
- } elsif ($X[1] =~ m/^http:\/\/.*(youtube|google).*videoplayback.*/){
- @itag = m/[&?](itag=[\d]*)/;
- @ids = m/[&?]id\=([^\&\s]*)/;
- @mime = m/[&?](mime\=[^\&\s]*)/;
- @cpn = m/[&?]cpn\=([^\&\s]*)/;
- if (defined($cpn[0])) {
- $fn = "/var/log/squid/@cpn";
- if (-e $fn) {
- open FH,"
- $id = ;
- chomp $id ;
- close FH ;
- } else {
- $id = $ids[0] ;
- }
- } else {
- $id = $ids[0] ;
- }
- @range = m/[&?](range=[^\&\s]*)/;
- print $x . "http://video-srv.youtube.com.SQUIDINTERNAL/id=" . $id . "&@itag@range@mime\n";
- } else {
- print $x . $X[1] . "\n";
- }
- # end
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement