Don't like ads? PRO users don't see any ads ;-)

[rapidleech][d] fileover_net.php

By: Th3-822 on Apr 18th, 2012  |  syntax: PHP  |  size: 5.50 KB  |  hits: 98  |  expires: Never
download  |  raw  |  embed  |  report abuse  |  print
Text below is selected. Please press Ctrl+C to copy to your clipboard. (⌘+C on Mac)
  1. <?php
  2.  
  3. if (!defined('RAPIDLEECH')) {
  4.         require_once ("index.html");
  5.         exit;
  6. }
  7.  
  8. class fileover_net extends DownloadClass {
  9.         public function Download($link) {
  10.                 global $premium_acc;
  11.                 if ($_REQUEST["premium_acc"] == "on" && ((!empty($_REQUEST["premium_user"]) && !empty($_REQUEST["premium_pass"])) || ($premium_acc["fileover_net"]["user"] && $premium_acc["fileover_net"]["pass"]))) {
  12.                         return $this->Download_Premium($link);
  13.                 } elseif ($_POST['step'] == 1) {
  14.                         return $this->Download_Free($link);
  15.                 } else {
  16.                         return $this->Prepare_Free($link);
  17.                 }
  18.         }
  19.  
  20.         private function Prepare_Free($link) {
  21.                 $page = $this->GetPage($link);
  22.                 $cookie = GetCookies($page);
  23.                 is_present($page, "Location: /deleted/", 'Error: File not found.');
  24.                 if (preg_match('@You have to wait: [^\.]+.@i', $page, $dlt)) html_error("Download limit exceeded: {$dlt[0]}");
  25.                 if (!preg_match('@fileover\.net/(\d+)@i', $link, $lid)) html_error('Error: Link ID not found. Malformed link?');
  26.                 if (!preg_match('@"wseconds">(\d+)<@i', $page, $cD)) html_error('Error: Timer not found.');
  27.  
  28.                 $page = $this->GetPage("http://fileover.net/ax/timereq.flo?{$lid[1]}", $cookie);
  29.                 if (!preg_match('@"hash":"([^"]+)"@i', $page, $lhs)) html_error('Error: Timehash not found.');
  30.                 $this->CountDown($cD[1]+1);
  31.  
  32.                 $page = $this->GetPage("http://fileover.net/ax/timepoll.flo?file={$lid[1]}&hash={$lhs[1]}", $cookie);
  33.                 if (!preg_match('@/challenge\?k=([^"|\']+)(?:"|\')@i', $page, $rpid)) html_error('Error: Captcha not found.');
  34.  
  35.                 $data = $this->DefaultParamArr($link, $cookie);
  36.                 $data['step'] = '1';
  37.                 $data['fo_file'] = $lid[1];
  38.                 $data['fo_hash'] = $lhs[1];
  39.  
  40.                 $this->Show_reCaptcha($rpid[1], $data);
  41.         }
  42.  
  43.         private function Show_reCaptcha($pid, $inputs) {
  44.                 global $PHP_SELF;
  45.  
  46.                 if (!is_array($inputs)) {
  47.                         html_error("Error parsing captcha data.");
  48.                 }
  49.  
  50.                 // Themes: 'red', 'white', 'blackglass', 'clean'
  51.                 echo "<script type='text/javascript'>var RecaptchaOptions={theme:'white', lang:'en'};</script>\n";
  52.  
  53.                 echo "\n<center><form name='dl' action='$PHP_SELF' method='post' ><br />\n";
  54.                 echo "<script type='text/javascript' src='http://www.google.com/recaptcha/api/challenge?k=$pid'></script>";
  55.                 echo "<noscript><iframe src='http://www.google.com/recaptcha/api/noscript?k=$pid' height='300' width='500' frameborder='0'></iframe><br />";
  56.                 echo "<textarea name='recaptcha_challenge_field' rows='3' cols='40'></textarea><input type='hidden' name='recaptcha_response_field' value='manual_challenge' /></noscript><br />\n";
  57.                 foreach ($inputs as $name => $input) {
  58.                         echo "<input type='hidden' name='$name' id='$name' value='$input' />\n";
  59.                 }
  60.                 echo "<input type='submit' name='submit' onclick='javascript:return checkc();' value='Download File' />\n";
  61.                 echo "<script type='text/javascript'>/*<![CDATA[*/\nfunction checkc(){\nvar capt=document.getElementById('recaptcha_response_field');\nif (capt.value == '') { window.alert('You didn\'t enter the image verification code.'); return false; }\nelse { return true; }\n}\n/*]]>*/</script>\n";
  62.                 echo "</form></center>\n</body>\n</html>";
  63.                 exit;
  64.         }
  65.  
  66.         private function Download_Free($link) {
  67.                 if (empty($_POST['recaptcha_response_field'])) {
  68.                         html_error("Error: You didn't enter the image verification code.");
  69.                 }
  70.  
  71.                 $post = array();
  72.                 $post['recaptcha_challenge_field'] = $_POST['recaptcha_challenge_field'];
  73.                 $post['recaptcha_response_field'] = $_POST['recaptcha_response_field'];
  74.                 $post['recaptcha_shortencode_field'] = $_POST['recaptcha_shortencode_field'];
  75.                 $post['file'] = $_POST['fo_file'];
  76.                 $post['hash'] = $_POST['fo_hash'];
  77.                 $cookie = urldecode($_POST['cookie']);
  78.  
  79.                 $page = $this->GetPage("http://fileover.net/ax/timepoll.flo", $cookie, $post);
  80.                 is_present($page, "/recaptcha/api/challenge?k=", 'Error: Entered captcha was incorrect.');
  81.  
  82.                 if (!preg_match('@(?:"|\')(http://[^/]+\.fileover\.net/\d+/\w+/([^"|\']+))(?:"|\')@i', $page, $downl)) html_error('Error: Download link not found.');
  83.  
  84.                 $this->RedirectDownload($downl[1], $downl[2], $cookie);
  85.         }
  86.  
  87.         private function Download_Premium($link) {
  88.                 $page = $this->GetPage($link);
  89.                 is_present($page, "Location: /deleted/", 'Error: File not found.');
  90.  
  91.                 $cookie = $this->Login();
  92.                 $page = $this->GetPage($link, $cookie);
  93.  
  94.                 if (!preg_match('@Location: (https?://(?:[^/|\r|\n]+\.)?fileover.net/[^\r|\n]+)@i', $page, $dllink)) html_error("Error: Download-link not found.");
  95.  
  96.                 $FileName = urldecode(basename(parse_url($dllink[1], PHP_URL_PATH)));
  97.                 $this->RedirectDownload($dllink[1], $FileName, $cookie);
  98.         }
  99.  
  100.         private function Login() {
  101.                 global $premium_acc;
  102.                 $pA = (empty($_REQUEST["premium_user"]) || empty($_REQUEST["premium_pass"])) ? false : true;
  103.                 $email = ($pA ? $_REQUEST["premium_user"] : $premium_acc["fileover_net"]["user"]);
  104.                 $pass = ($pA ? $_REQUEST["premium_pass"] : $premium_acc["fileover_net"]["pass"]);
  105.                 if (empty($email) || empty($pass)) html_error("Login Failed: EMail or Password is empty. Please check login data.");
  106.  
  107.                 $post = array();
  108.                 $post["email"] = urlencode($email);
  109.                 $post["password"] = urlencode($pass);
  110.                 $page = $this->GetPage("http://fileover.net/api/users/login/", 0, $post);
  111.                 is_notpresent($page, "Set-Cookie: email=", "Login failed: Check your login details.");
  112.                 $cookie = GetCookiesArr($page);
  113.  
  114.                 $page = $this->GetPage("http://fileover.net/user/account", $cookie);
  115.                 is_notpresent($page, "<h2>Expires</h2>", "Login error: Account isn't premium?.");
  116.                 return $cookie;
  117.         }
  118. }
  119.  
  120. //[13-6-2011]  Written by Th3-822 (Free download only).
  121. //[18-4-2012]  Added premium download support. - Th3-822
  122.  
  123. ?>