Advertisement
Th3-822

[rapidleech][d] movzap_com.php

Mar 6th, 2012
270
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.25 KB | None | 0 0
  1. <?php
  2.  
  3. if (!defined('RAPIDLEECH')) {
  4.     require_once ("index.html");
  5.     exit;
  6. }
  7.  
  8. class movzap_com extends DownloadClass {
  9.     public function Download($link) {
  10.         $page = $this->GetPage($link, 'lang=english');
  11.         is_present($page, "<h2>File Not Found</h2>", 'Video not found or it was deleted.');
  12.         is_present($page, "Video is not encoded yet.", 'Video is not encoded yet. Please wait some minutes.');
  13.         is_present($page, "The file you were looking for could not be found");
  14.  
  15.         $page2 = cut_str($page, '<form name="F1" method="POST"', '</form>'); //Cutting page
  16.  
  17.         if (!preg_match('@name="id" value="([^"]+)"@i', $page2, $id)) html_error("Video ID not found.");
  18.  
  19.         $page = $this->GetPage("http://movzap.com/xml/{$id[1]}.xml", 'lang=english');
  20.         if (!preg_match('@<title><!\[CDATA\[([^\[|\]]+)\]\]></title>@i', $page, $title)) html_error("Video Title not found.");
  21.  
  22.         $page = $this->GetPage("http://movzap.com/xml2/{$id[1]}.xml", 'lang=english');
  23.         if (!preg_match('@<hd\.file><!\[CDATA\[([^\[|\]]+)\]\]></hd\.file>@i', $page, $encrypted))
  24.             if (!preg_match('@<file><!\[CDATA\[([^\[|\]]+)\]\]></file>@i', $page, $encrypted)) html_error("Encrypted link not found.");
  25.         $down = $this->decryptme(substr($encrypted[1], 0, -6)) or $down = $this->decryptme($encrypted[1]);
  26.         if ($down === false) html_error("Cannot decrypt download link");
  27.  
  28.         if(!preg_match('@\.[^\.]+$@i', basename($down), $ext)) $ext = array('.mp4');
  29.         $badchars = '<>:"/\\|?*\'@#+~{}[]^';
  30.         $fname = str_replace(str_split($badchars), "_", trim($title[1])) . $ext[0];
  31.         $this->RedirectDownload($down."?start=0", $fname, 0, 0, 0, $fname);
  32.     }
  33.  
  34.     private function decryptme($encrypted) {
  35.         $KEY = 'N%66=]H6';
  36.         $method = MCRYPT_DES;
  37.         $mode = MCRYPT_MODE_ECB;
  38.  
  39.         $iv_size = mcrypt_get_iv_size($method, $mode);
  40.         $iv = mcrypt_create_iv($iv_size, MCRYPT_RAND);
  41.  
  42.         return $this->pkcs5_unpad(mcrypt_decrypt($method, $KEY, base64_decode($encrypted), $mode, $iv));
  43.     }
  44.  
  45.     // Source: A comment @ http://php.net/manual/en/ref.mcrypt.php
  46.     private function pkcs5_unpad($text) {
  47.         $pad = ord($text{strlen($text)-1});
  48.         if ($pad > strlen($text)) return false;
  49.         if (strspn($text, chr($pad), strlen($text) - $pad) != $pad) return false;
  50.         return substr($text, 0, -1 * $pad);
  51.     }
  52. }
  53.  
  54. //[06-3-2012]  Written by Th3-822.
  55.  
  56. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement