Advertisement
Th3-822

[rapidleech][d][freedl] littlebyte_net

Dec 31st, 2016
124
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 3.33 KB | None | 0 0
  1. <?php
  2.  
  3. if (!defined('RAPIDLEECH')) {
  4.     require_once('index.html');
  5.     exit;
  6. }
  7.  
  8. class littlebyte_net extends DownloadClass {
  9.     private $page, $cookie = array('lng' => 'EN'), $link, $baseUrl, $fid, $fuid;
  10.     public function Download($link) {
  11.         if (!preg_match('@(http://littlebyte\.net/)download/(\d+)\.(\w+)/[^/\r\n\"\'<>]+\.html@i', $link, $fid)) html_error('Invalid Link?.');
  12.         $this->link = $GLOBALS['Referer'] = $fid[0];
  13.         $this->baseUrl = $fid[1];
  14.         $this->fid = $fid[2];
  15.         $this->fuid = $fid[3];
  16.  
  17.         $this->page = $this->GetPage($this->link, $this->cookie);
  18.         is_present($this->page, 'There are no files to be shown', 'File Not Found or Deleted.');
  19.         $this->cookie = GetCookiesArr($this->page, $this->cookie);
  20.  
  21.         // Only FreeDL at the Moment.
  22.         return $this->FreeDL();
  23.     }
  24.  
  25.     private function FreeDL() {
  26.         $post = array(
  27.             'action' => 'getSlowDownload',
  28.             'params%5Bfile_id%5D' => $this->fid,
  29.             'params%5Bfile_uid%5D' => $this->fuid,
  30.         );
  31.         $page = $this->GetPage($this->baseUrl . 'ajax.php', $this->cookie, $post);
  32.         if (preg_match('@Next free download will be available for you after \d+ minutes@', $page, $err)) html_error("FreeDL Error: {$err[0]}");
  33.  
  34.         $post = array('action' => 'checkCaptcha');
  35.         if (!preg_match('@\s*(captchaId)\s*:\s*(\d+)\s*,\s*(captchaHash)\s*:\s*\'(\w+)\'@', $page, $captchaData)) html_error('CAPTCHA Data Not Found.');
  36.         $post[$captchaData[1]] = $captchaData[2];
  37.         $post[$captchaData[3]] = $captchaData[4];
  38.         if (preg_match('@\.html(\'<h1>(\d{4})</h1>\');@i', $page, $captcha)) {
  39.             $captcha = $captcha[1];
  40.         } else if (preg_match('@://((?:[\w\-]+\.)+[\w\-]+(?:\:\d+)?)/(?:(?:frame)?video|embed)/([\w\.\-]+)@i', $page, $captcha)) {
  41.             $video = $this->GetPage("http://{$captcha[1]}/video/{$captcha[2]}");
  42.             if (preg_match("@\nLocation: https?://((?:[\w\-]+\.)+[\w\-]+(?:\:\d+)?)/video/({$captcha[2]})@i", $video, $captcha)) {
  43.                 $video = $this->GetPage("http://{$captcha[1]}/video/{$captcha[2]}");
  44.             }
  45.             if (!preg_match('@[\s\,]title\s*:\s*"([^"]+)"\s*,@i', $video, $captcha) || !preg_match('@\b(\d{4})\b@', preg_replace('@\D@', ' ', $captcha[1]), $captcha)) html_error('Video "CAPTCHA" Response Not Found.');
  46.             $captcha = $captcha[1];
  47.         } else html_error('Video "CAPTCHA" Not Found.');
  48.         $post['captcha'] = $captcha;
  49.  
  50.         //if (!preg_match('@[\s,]freeRemind\s*=\s*(\d+)\s*;@i', $page, $cD)) html_error('Countdown Not Found.');
  51.         //if ($cD[1] > 0) $this->Countdown($cD[1] + 2);
  52.  
  53.         $page = $this->GetPage($this->baseUrl . 'ajax.php', $this->cookie, $post);
  54.         $reply = $this->json2array($page, 'Error At FreeDL Post');
  55.         if (empty($reply['status'])) html_error('Unexpected Response At FreeDL.');
  56.  
  57.         if ($reply['status'] != 'OK') {
  58.             if ($reply['status'] == 'ERROR') {
  59.                 if (array_key_exists('content', $reply)) {
  60.                     if (is_null($reply['content'])) html_error('Invalid "CAPTCHA" Response"');
  61.                     else textarea($reply['content']);
  62.                 }
  63.                 html_error('Unknown FreeDL Error.');
  64.             } else if ($reply['status'] == 'RELOAD') html_error('FreeDL Limit Reached.');
  65.             else html_error('Unknown FreeDL Error: ' . htmlspecialchars($reply['status']));
  66.         } else if (empty($reply['content']) || !preg_match('@https?://cdn\d+.littlebyte\.net/files/[^\r\n\t\"\'<>]+@i', $reply['content'], $DL)) html_error('Download Link Not Found.');
  67.  
  68.         return $this->RedirectDownload($DL[0]);
  69.     }
  70. }
  71.  
  72. // [31-12-2016] Written by Th3-822.
  73.  
  74. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement