link = $link = str_ireplace('freakshare.net/', 'freakshare.com/', $link); $this->cookie = array(); $this->DLRegexp = '@https?://\w+\.freakshare\.com/get\.php\?dlid=\w+@i'; $this->pA = (empty($_REQUEST['premium_user']) || empty($_REQUEST['premium_pass']) ? false : true); $_POST['step'] = empty($_POST['step']) ? false : $_POST['step']; if (empty($_POST['step']) || !in_array($_POST['step'], array('1', '2'))) { $this->page = $this->GetPage($this->link, $this->cookie); if (stripos($this->page, 'selected="selected">English<') === false) { $this->cookie = GetCookiesArr($this->GetPage('http://freakshare.com/index.php?language=EN', $this->cookie), $this->cookie); $this->page = $this->GetPage($this->link, $this->cookie); } is_present($this->page, 'This file does not exist!'); $this->cookie = GetCookiesArr($this->page, $this->cookie); } elseif (!empty($_POST['cookie'])) $this->cookie = StrToCookies(decrypt(urldecode($_POST['cookie']))); if (($_REQUEST['premium_acc'] == 'on' && ($this->pA || (!empty($premium_acc['freakshare_com']['user']) && !empty($premium_acc['freakshare_com']['pass']))))) { return $this->Login(($this->pA ? $_REQUEST['premium_user'] : $premium_acc['freakshare_com']['user']), ($this->pA ? $_REQUEST['premium_pass'] : $premium_acc['freakshare_com']['pass'])); } else return $this->FreeDL(); } private function FreeDL() { switch ($_POST['step']) { default: is_present($this->page, 'Your Traffic is used up for today!'); if (!preg_match('@\svar\s+time\s*=\s*(\d+)@i', $this->page, $cD)) html_error('Countdown not found.'); $this->cookie['ads_download'] = '1'; if ($cD[1] >= 0) { if ($cD[1] > 59) { $data = $this->DefaultParamArr($this->link, encrypt(CookiesToStr($this->cookie))); $data['step'] = '1'; return $this->JSCountdown($cD[1] + 1, $data); } else $this->CountDown($cD[1] + 1); } case '1': $page = $this->GetPage($this->link, $this->cookie, array('section' => 'benefit', 'did' => '0')); if (!preg_match('@https?://(?:[^/]+\.)?(?:(?:google\.com/recaptcha/api)|(?:recaptcha\.net))/(?:(?:challenge)|(?:noscript))\?k=([\w|\-]+)@i', $page, $cpid)) html_error('CAPTCHA not found.'); $data = $this->DefaultParamArr($this->link, encrypt(CookiesToStr($this->cookie))); $data['step'] = '2'; return $this->Show_reCaptcha($cpid[1], $data); case '2': break; } if (empty($_POST['recaptcha_response_field'])) html_error('You didn\'t enter the image verification code.'); $post = array('recaptcha_challenge_field' => $_POST['recaptcha_challenge_field'], 'recaptcha_response_field' => $_POST['recaptcha_response_field']); $post['section'] = 'waitingtime'; $post['did'] = '0'; $page = $this->GetPage($this->link, $this->cookie, $post); is_present($page, 'Wrong Captcha!', 'Login Failed: Wrong CAPTCHA entered.'); if (!preg_match($this->DLRegexp, $page, $DL)) html_error('Download Link Not Found.'); $this->RedirectDownload($DL[0], 'T8_Freakshare_FDL'); } private function Show_reCaptcha($pid, $inputs, $sname = 'Download File') { if (!is_array($inputs)) html_error('Error parsing captcha data.'); // Themes: 'red', 'white', 'blackglass', 'clean' echo "\n\n