Advertisement
Th3-822

[rapidleech][d] vidbull_com

Jul 28th, 2015
1,476
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.86 KB | None | 0 0
  1. <?php
  2.  
  3. if (!defined('RAPIDLEECH')) {
  4.     require_once('index.html');
  5.     exit();
  6. }
  7.  
  8. if (!file_exists(HOST_DIR . 'download/GenericXFS_DL.php')) html_error('Cannot load "'.htmlentities(HOST_DIR).'download/GenericXFS_DL.php" (File doesn\'t exists)');
  9. require_once(HOST_DIR . 'download/GenericXFS_DL.php');
  10.  
  11. class vidbull_com extends GenericXFS_DL {
  12.     public $pluginVer = 6;
  13.     public function Download($link) {
  14.         $this->wwwDomain = true; // Switch to true if filehost forces it's domain with www.
  15.         $this->cname = 'xfss'; // Session cookie name
  16.         $this->sslLogin = false; // Force https on login.
  17.         $this->embedDL = true; // Try to unpack player's js for finding download link. (Only hosts with video player)
  18.         $this->unescaper = false; // Enable JS unescape decoder.
  19.         $this->customDecoder = true; // Enable custom pageDecoder().
  20.  
  21.         // Custom link-check error messages
  22.         $errMsgs = array('The file you were looking for could not be found',
  23.             'The file was removed by administrator',
  24.             'No available download slots for this region please check back later'
  25.         );
  26.  
  27.         $this->Start($link, $errMsgs);
  28.     }
  29.  
  30.     // Decoder: http://vidbull.com/player/obc.swf
  31.     protected function pageDecoder() {
  32.         if (preg_match('@file\s*:\s*"((?:[0-9a-fA-F]{2})+)"@i', $this->page, $encoded)) {
  33.             $encoded = $encoded[1];
  34.             $this->page = str_replace($encoded, rtrim(mcrypt_decrypt(MCRYPT_RIJNDAEL_128, pack('H*', 'a949376e37b369f17bc7d3c7a04c5721'), pack('H*', $encoded), MCRYPT_MODE_ECB)), $this->page);
  35.         }
  36.     }
  37.  
  38.     protected function getFileName($url) {
  39.         $fname = parent::getFileName($url);
  40.         if (preg_match("@^(?:v(?:ideo)|{$this->fid})?\.(mp4|flv)$@i", $fname, $vExt) && preg_match('@<h3>Watch\s+([^\s<>\"\']+)\s*</h3>@i', $this->page, $title)) {
  41.             $fname = preg_replace('@\.(mp4|flv|mkv|webm|wmv|(m2)?ts|rm(vb)?|mpg?v?|vob)$@i', '', trim($title[1])) . '_S.' . strtolower($vExt[1]);
  42.         }
  43.         return $fname;
  44.     }
  45. }
  46.  
  47. // Written by Th3-822.
  48.  
  49. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement