Advertisement
Tblogger

rapidleech[dl]easybytez_com.php

Oct 1st, 2014
313
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 6.49 KB | None | 0 0
  1. <?php
  2.  
  3. if (!defined('RAPIDLEECH')) {
  4.         require_once ("index.html");
  5.         exit();
  6. }
  7.  
  8. class easybytez_com extends DownloadClass {
  9.         private $page, $cookie;
  10.         public function Download($link) {
  11.                 global $premium_acc;
  12.                 $this->cookie = array('lang' => 'english');
  13.                 $this->page = $this->GetPage($link, $this->cookie);
  14.                 is_present($this->page, "The file you were looking for could not be found");
  15.                 is_present($this->page, "The file of the above link no longer exists");
  16.  
  17.                 if ($_REQUEST["premium_acc"] == "on" && ((!empty($_REQUEST["premium_user"]) && !empty($_REQUEST["premium_pass"])) || (!empty($premium_acc["easybytez_com"]["user"]) && !empty($premium_acc["easybytez_com"]["pass"])))) {
  18.                         $this->Login($link);
  19.                 } else {
  20.                         $this->FreeDL($link);
  21.                 }
  22.         }
  23.  
  24.         private function FreeDL($link) {
  25.                 $page2 = cut_str($this->page, 'Form method="POST" action=', '</form>'); //Cutting page
  26.                 $post = array();
  27.                 $post['op'] = cut_str($page2, 'name="op" value="', '"');
  28.                 $post['usr_login'] = (empty($this->cookie['xfss'])) ? '' : $this->cookie['xfss'];
  29.                 $post['id'] = cut_str($page2, 'name="id" value="', '"');
  30.                 $post['fname'] = cut_str($page2, 'name="fname" value="', '"');
  31.                 $post['referer'] = '';
  32.                 $post['method_free'] = cut_str($page2, 'name="method_free" value="', '"');
  33.  
  34.                 $page = $this->GetPage($link, $this->cookie, $post);
  35.                 if (preg_match('@You have to wait (?:\d+ \w+,\s)?\d+ \w+ till next download@', $page, $err)) html_error("Error: ".$err[0]);
  36.  
  37.                 $page2 = cut_str($page, '<form name="F1" method="POST"', '</form>'); //Cutting page
  38.                 $post = array();
  39.                 $post['op'] = cut_str($page2, 'name="op" value="', '"');
  40.                 $post['id'] = cut_str($page2, 'name="id" value="', '"');
  41.                 $post['rand'] = cut_str($page2, 'name="rand" value="', '"');
  42.                 $post['referer'] = '';
  43.                 $post['method_free'] = cut_str($page2, 'name="method_free" value="', '"');
  44.                 $post['down_script'] = 1;
  45.  
  46.                 if (!preg_match('@<span id="countdown_str">[^<|>]+<span[^>]*>(\d+)</span>[^<|>]+</span>@i', $page2, $count)) $count = array(1=>60);
  47.                 if ($count[1] > 0) $this->CountDown($count[1]);
  48.  
  49.                 $page = $this->GetPage($link, $this->cookie, $post);
  50.                 is_present($page, ">Skipped countdown", "Error: Skipped countdown?.");
  51.                 if (preg_match('@You can download files up to \d+ [K|M|G]b only.@i', $page, $err)) html_error("Error: ".$err[0]);
  52.                 if (!preg_match('@https?://[^/|\r|\n|\"|\'|<|>]+/(?:(?:files)|(?:cgi-bin/dl\.cgi))/[^\r|\n|\"|\'|<|>]+@i', $page, $dlink)) html_error('Error: Download link not found.');
  53.  
  54.                 $FileName = urldecode(basename(parse_url($dlink[0], PHP_URL_PATH)));
  55.                 $this->RedirectDownload($dlink[0], $FileName);
  56.         }
  57.  
  58.         private function PremiumDL($link) {
  59.                 $page = $this->GetPage($link, $this->cookie);
  60.                 if (!preg_match('@Location: (https?://[^/|\r|\n]+/files/[^\r|\n]+)@i', $page, $dlink)) {
  61.                         $page2 = cut_str($page, '<form name="F1" method="POST"', '</form>'); //Cutting page
  62.  
  63.                         $post = array();
  64.                         $post['op'] = cut_str($page2, 'name="op" value="', '"');
  65.                         $post['id'] = cut_str($page2, 'name="id" value="', '"');
  66.                         $post['rand'] = cut_str($page2, 'name="rand" value="', '"');
  67.                         $post['referer'] = '';
  68.                         $post['method_premium'] = cut_str($page2, 'name="method_premium" value="', '"');
  69.                         $post['down_direct'] = 1;
  70.  
  71.                         $page = $this->GetPage($link, $this->cookie, $post);
  72.  
  73.                         if (!preg_match('@https?://[^/|\r|\n|\"|\'|<|>]+/(?:(?:files)|(?:cgi-bin/dl\.cgi))/[^\r|\n|\"|\'|<|>]+@i', $page, $dlink)) html_error('Error: Download-link not found.');
  74.                 }
  75.  
  76.                 $FileName = urldecode(basename(parse_url($dlink[0], PHP_URL_PATH)));
  77.                 $this->RedirectDownload($dlink[0], $FileName);
  78.         }
  79.  
  80.         private function Login($link) {
  81.                 global $premium_acc;
  82.                 $lurl='http://www.easybytez.com/login2.html';
  83.                 $page2 = $this->GetPage($lurl, $this->cookie);
  84.                 $rand = cut_str($page2, '<input type="hidden" name="rand" value="','">');
  85.                 $pA = (!empty($_REQUEST["premium_user"]) && !empty($_REQUEST["premium_pass"]) ? true : false);
  86.                 $user = ($pA ? $_REQUEST["premium_user"] : $premium_acc["easybytez_com"]["user"]);
  87.                 $pass = ($pA ? $_REQUEST["premium_pass"] : $premium_acc["easybytez_com"]["pass"]);
  88.  
  89.                 if (empty($user) || empty($pass)) html_error("Login Failed: User or Password is empty. Please check login data.", 0);
  90.                 $post = array();
  91.                 $post['login'] = urlencode($user);
  92.                 $post['password'] = urlencode($pass);
  93.                 $post['rand'] = $rand;
  94.                 $post['op'] = "login2";
  95.                 $post['redirect'] = "";
  96.  
  97.                 $purl = 'http://easybytez.com/';
  98.                 $page = $this->GetPage($purl, $this->cookie, $post, $purl);
  99.                 is_present($page, "Incorrect Login or Password", "Login Failed: User/Password incorrect.");
  100.  
  101.                 $this->cookie = GetCookiesArr($page);
  102.                 if (empty($this->cookie['xfss'])) html_error("Login Error: Cannot find session cookie.");
  103.                 $this->cookie['lang'] = 'english';
  104.  
  105.                 $page = $this->GetPage("$purl?op=my_account", $this->cookie, 0, $purl);
  106.                 if (stripos($page, '/?op=logout') === false && stripos($page, '/logout') === false) html_error('Login Error.');
  107.  
  108.                 if (stripos($page, "Premium account expire") === false) {
  109.                         $this->changeMesg(lang(300)."<br /><b>Account isn\\\'t premium</b><br />Using it as member.");
  110.                         return $this->FreeDL($link);
  111.                 } else return $this->PremiumDL($link);
  112.         }
  113. }
  114.  
  115. // [19-6-2012]  Written by Th3-822. (XFS... XFS everywhere. :D)
  116. // [02-10-2014] Fixed by Tblogger . (looks like this site has bug in login :-P)
  117.  
  118. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement