Advertisement
Th3-822

[rapidleech][d] picofile_com

Dec 30th, 2015
202
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 1.39 KB | None | 0 0
  1. <?php
  2.  
  3. if (!defined('RAPIDLEECH')) {
  4.     require_once('index.html');
  5.     exit();
  6. }
  7.  
  8. class picofile_com extends DownloadClass {
  9.     public function Download($link) {
  10.         $link = explode('|', str_ireplace('%7C', '|', $link), 2);
  11.         $lpass = (count($link) > 1 ? rawurldecode($link[1]) : '');
  12.         $link = $GLOBALS['Referer'] = $link[0];
  13.  
  14.         $page = $this->GetPage($link);
  15.         $cookie = GetCookiesArr($page);
  16.         if (substr($page, 9, 3) == '404') html_error('File Not Found.');
  17.         if (!preg_match('@file/GenerateDownloadLink\?fileId=\d+@i', $page, $ajaxurl)) html_error('FileID Not Found.');
  18.         $ajaxurl = $ajaxurl[0];
  19.  
  20.         $url = parse_url($link);
  21.         $page = $this->GetPage(sprintf('%s://%s/%s', $url['scheme'], $url['host'], $ajaxurl), $cookie, array('password' => urlencode($lpass)), "$link\r\nX-Requested-With: XMLHttpRequest");
  22.         $cookie = GetCookiesArr($page, $cookie);
  23.  
  24.         switch (intval(substr($page, 9, 3))) {
  25.             case 200: break;
  26.             case 404: html_error('File Not Found');break;
  27.             case 403: html_error('Wrong File Password, Please add password on the format: link|password');break;
  28.             default: html_error('Error While Requesting Download Link.');
  29.         }
  30.  
  31.         if (!preg_match('@https?://(?:[\w\-]+\.)+[\w\-]+(?:\:\d+)?/d/[\w\-]+/[^\'\"\t<>\r\n\\\]+@i', $page, $DL)) html_error('Download Link Not Found.');
  32.         $this->RedirectDownload($DL[0], urldecode(basename(parse_url($DL[0], PHP_URL_PATH))), $cookie);
  33.     }
  34. }
  35.  
  36. // [30-12-2015] Written by Th3-822.
  37.  
  38. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement