Advertisement
adhiefree

storeurl Bersama by SJW

Dec 16th, 2013
162
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.42 KB | None | 0 0
  1. # Link nya : https://www.facebook.com/notes/mikrotik-squid-indonesia/storeurl-bersama/631745193538422
  2. # tempat storeurl kita bersama, paste dibawah sini apabila anda merasa layak tuk dimasukkan kestoreurl
  3. # apabila anda merasa itu tidak layak dan atau itu rahasia anda maka jangan tampilkan
  4.  
  5. #!/usr/bin/perl
  6.  
  7. $|=1;
  8. while () {
  9. @X = split;
  10. $x = $X[0] . " ";
  11. $_ = $X[1];
  12. $u = $X[1];
  13. # acl dontrewrite url_regex -i s\-platform\.ak\.fbcdn\.net
  14. # acl store_rewrite_list url_regex -i fbcdn.*net
  15. # 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
  16.  
  17. # 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
  18. # http://static.ak.fbcdn.net/rsrc.php/v2/yb/r/GsNJNwuI-UM.gif
  19. # http://static.ak.fbcdn.net/rsrc.php/v2/y1/r/lBvtSWSBAGQ.png
  20. # 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
  21. # hasil atas http://bycdn8-i.akamaihd.net/antwars_id/images/continueslogin.png
  22. # http://profile.ak.fbcdn.net/hprofile-ak-ash2/274241_1187750150_2088800094_q.jpg
  23. if ($X[1] =~ m/^http:\/\/[\w\d\-\.\%]*fbcdn[\w\d\-\.\%]*net\/safe\_image\.php\?(.*)/) {
  24. print $x . "storeurl://fbcdn.SQUIDINTERNAL/" . $1 . "\n";
  25.  
  26. } elsif ($X[1] =~ m/^http:\/\/[\w\d\-\.\%]*fbcdn[\w\d\-\.\%]*net\/rsrc\.php\/(.*)/) {
  27. print $x . "storeurl://fbcdn.SQUIDINTERNAL/" . $1 . "\n";
  28.  
  29. } elsif ($X[1] =~ m/^http:\/\/[\w\d\-\.\%]*fbcdn[\w\d\-\.\%]*net\/[\w\d\-\.\%]*\/(.*)/) {
  30. print $x . "storeurl://fbcdn.SQUIDINTERNAL/" . $1 . "\n";
  31.  
  32. # acl dontrewrite url_regex redbot\.org (get_video|videoplayback\?id|videoplayback.*id).*begin\=[1-9][0-9]*
  33. # acl store_rewrite_list url_regex -i (youtube|google).*(videoplayback|liveplay)
  34. # 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
  35. } elsif ($X[1] =~ m/^http(|s)\:\/\/.*youtube.*(ptracking|stream_204|player_204|gen_204).*(video_id|docid|v)\=([^\&\s]*).*/){
  36. $vid = $4 ;
  37. @cpn = m/[&?]cpn\=([^\&\s]*)/;
  38. if (defined($vid )) {
  39. $fn = "/var/log/squid/@cpn";
  40. unless (-e $fn) {
  41. open FH,">".$fn ;
  42. print FH "$vid\n";
  43. close FH;
  44. }
  45. }
  46. print $x . $X[1] . "\n";
  47.  
  48. } elsif ($X[1] =~ m/^http:\/\/.*(youtube|google).*videoplayback.*/){
  49. @itag = m/[&?](itag=[\d]*)/;
  50. @ids = m/[&?]id\=([^\&\s]*)/;
  51. @mime = m/[&?](mime\=[^\&\s]*)/;
  52. @cpn = m/[&?]cpn\=([^\&\s]*)/;
  53. if (defined($cpn[0])) {
  54. $fn = "/var/log/squid/@cpn";
  55. if (-e $fn) {
  56. open FH,"
  57. $id = ;
  58. chomp $id ;
  59. close FH ;
  60. } else {
  61. $id = $ids[0] ;
  62. }
  63. } else {
  64. $id = $ids[0] ;
  65. }
  66. @range = m/[&?](range=[^\&\s]*)/;
  67. print $x . "http://video-srv.youtube.com.SQUIDINTERNAL/id=" . $id . "&@itag@range@mime\n";
  68.  
  69. } else {
  70. print $x . $X[1] . "\n";
  71. }
  72. # end
  73. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement