private function DownloadPremium($link)
 {
     global $premium_acc, $Referer;
     $post = array();
     $post["email"] = $_REQUEST["premium_user"] ? $_REQUEST["premium_user"] : $premium_acc["uploaded_to"]["user"];
     $post["password"] = $_REQUEST["premium_pass"] ? $_REQUEST["premium_pass"] : $premium_acc["uploaded_to"]["pass"];
     $page = $this->GetPage('http://uploaded.to/login', 0, $post);
     if (strpos($page, "Login failed")) {
         html_error("Login Failed , Bad username/password combination.", 0);
     }
     $cook = GetCookies($page);
     $id = trim(substr($link, 24, 6));
     $newHref = "http://uploaded.to/file/" . $id . "/?redirect";
     $post = array();
     $page = $this->GetPage($newHref, $cook, $post, $Referer);
     preg_match('/Location: (.*)/', $page, $newredir);
     $Href = trim($newredir[1]);
     if (strpos($Href, "view=error_fileremoved")) {
         html_error("Error getting Download Link", 0);
     }
     $Url = parse_url($Href);
     $FileName = !$FileName ? basename($Url["path"]) : $FileName;
     $this->RedirectDownload($Href, $FileName, $cook);
     exit;
 }
 private function Free($link)
 {
     if ($_REQUEST['step'] == '1') {
         $post['recaptcha_challenge_field'] = $_POST['recaptcha_challenge_field'];
         $post['recaptcha_response_field'] = $_POST['recaptcha_response_field'];
         $postlink = urldecode($_POST['link']);
         $cookie = urldecode($_POST['cookie']);
         $challenge = $_POST['challenge'];
         $this->page = $this->GetPage($postlink, $cookie, $post, $link);
     } else {
         $cookie = GetCookies($this->page);
         if (!preg_match("@\\{ xmlobject\\.open\\('POST', '([^']+)',@i", $this->page, $rd)) {
             echo "<center><font color='red'><b>No Direct Link found, proceed to filehost!</b></font></center>";
             if (!preg_match("/progress\\/\\?d=" . $this->id . "&r=/", $this->page, $dm)) {
                 html_error('Can\'t find id link!');
             }
             $page = $this->GetPage('http://www.multiupload.nl/' . $dm[0] . time(), $cookie, 0, $link);
             if (!preg_match_all('/url":"([^\\r\\n"]+)"/', $page, $tmp)) {
                 html_error('Error[Unknown Page Response]');
             }
             $check = '';
             foreach ($tmp[1] as $k => $v) {
                 $check .= $this->GetPage(str_replace('\\', '', $v));
             }
             if (!preg_match_all('/location: (http:\\/\\/[^\\r\\n]+)/i', $check, $match)) {
                 html_error('Can\'t find true filehost link!');
             }
             $this->Submit($match[1]);
             exit;
         }
         $postlink = $link . $rd[1];
         if (!preg_match('@Recaptcha\\.create\\("([^"]+)",@i', $this->page, $cap)) {
             html_error("Error: Captcha id not found!");
         }
         //send the captcha data
         $data = $this->DefaultParamArr($postlink, $cookie);
         $data['step'] = '1';
         $data['challenge'] = $cap[1];
         //incase we have input the wrong captcha
         $this->Show_reCaptcha($cap[1], $data);
         exit;
     }
     if (!preg_match('@\\{"([^"]+)":"([^"]+)"\\}@', $this->page, $check)) {
         html_error("Error: Unknown Response Page!");
     }
     switch ($check[1]) {
         case 'response':
             echo "<center><font color='red'><b>The captcha wasn't entered correctly. Please try again</b></font></center>";
             $data = $this->DefaultParamArr($postlink, $cookie);
             $data['step'] = '1';
             $data['challenge'] = $challenge;
             $this->Show_reCaptcha($challenge, $data);
             break;
         case 'href':
             $dlink = str_replace('\\', '', $check[2]);
             $filename = basename(parse_url($dlink, PHP_URL_PATH));
             $this->RedirectDownload($dlink, $filename, $cookie, 0, $link);
             break;
     }
 }
 private function Login($auth = false)
 {
     global $premium_acc;
     if (!$auth) {
         if (!empty($_REQUEST["premium_user"]) && !empty($_REQUEST["premium_pass"])) {
             $user = $_REQUEST["premium_user"];
             $pass = $_REQUEST["premium_pass"];
         } else {
             $user = $premium_acc["real-debrid_com"]['user'];
             $pass = $premium_acc["real-debrid_com"]['pass'];
         }
         if (empty($user) || empty($pass)) {
             html_error("Username or password is empty, you need to insert your login detail!");
         }
         $page = $this->GetPage($this->posturl . "ajax/login.php?user="******"&pass="******"", "lang=en", 0, $this->posturl . "\r\nX-Requested-With: XMLHttpRequest");
         $cookie = GetCookies($page) . "; lang=en";
         is_present($page, 'Your login informations are incorrect !');
     } elseif (strlen($auth) == 114) {
         $cookie = "auth={$auth}; lang=en";
     } else {
         html_error("[Cookie] Invalid cookie (" . strlen($auth) . " != 114).");
     }
     //check account
     $page = $this->GetPage($this->posturl . "account", $cookie, 0, $this->posturl);
     is_present($page, "<h3>403 - Forbidden</h3>", "Account invalid!");
     is_present($page, 'A dedicated server has been detected and your account will not be Premium on this IP address.');
     is_present($page, '<strong>Free</strong>', 'Account Free, login not validated!');
     return $cookie;
 }
Beispiel #4
0
 private function Prepare_Free($link)
 {
     $page = $this->GetPage($link);
     $cookie = GetCookies($page);
     is_present($page, "Location: /deleted/", 'Error: File not found.');
     if (preg_match('@You have to wait: [^\\.]+.@i', $page, $dlt)) {
         html_error("Download limit exceeded: {$dlt[0]}");
     }
     if (!preg_match('@fileover\\.net/(\\d+)@i', $link, $lid)) {
         html_error('Error: Link ID not found. Malformed link?');
     }
     if (!preg_match('@"wseconds">(\\d+)<@i', $page, $cD)) {
         html_error('Error: Timer not found.');
     }
     $page = $this->GetPage("http://fileover.net/ax/timereq.flo?{$lid[1]}", $cookie);
     if (!preg_match('@"hash":"([^"]+)"@i', $page, $lhs)) {
         html_error('Error: Timehash not found.');
     }
     $this->CountDown($cD[1] + 1);
     $page = $this->GetPage("http://fileover.net/ax/timepoll.flo?file={$lid[1]}&hash={$lhs[1]}", $cookie);
     if (!preg_match('@/challenge\\?k=([^"|\']+)(?:"|\')@i', $page, $rpid)) {
         html_error('Error: Captcha not found.');
     }
     $data = $this->DefaultParamArr($link, $cookie);
     $data['step'] = '1';
     $data['fo_file'] = $lid[1];
     $data['fo_hash'] = $lhs[1];
     $this->Show_reCaptcha($rpid[1], $data);
 }
 public function Download($link)
 {
     global $premium_acc, $Referer;
     $page = $this->GetPage($link);
     is_present($page, "Removed", "The file has been removed or has been expired!");
     if (stristr($page, 'class="handlinkblocked"')) {
         $pass = $_REQUEST["premium_pass"] ? $_REQUEST["premium_pass"] : $premium_acc["fileflyer_com"]["pass"];
         if (empty($pass)) {
             html_error("This link required premium account!");
         }
         if (!preg_match('/<form name="form1" method="post" action="(.*)"/U', $page, $pre)) {
             html_error('Error: Premium link not found?');
         }
         $link = $pre[1];
         $post = array();
         $post['__EVENTTARGET'] = "";
         $post['__EVENTARGUMENT'] = "";
         $post['__VIEWSTATE'] = urlencode(cut_str($page, 'id="__VIEWSTATE" value="', '"'));
         $post['__EVENTVALIDATION'] = urlencode(cut_str($page, 'id="__EVENTVALIDATION" value="', '"'));
         $post['SMSButton'] = "Go";
         $post['Password'] = $pass;
         $post['TextBox1'] = "";
         $page = $this->GetPage($link, 0, $post, $Referer);
         is_notpresent($page, "Access enabled", "Invalid premium codes");
     }
     $cookie = GetCookies($page);
     if (!preg_match('@http:\\/\\/.+fileflyer\\.com\\/d\\/[^"]+@', $page, $dl)) {
         html_error('Error: Download link not found, plugin need to be updated!');
     }
     $dlink = trim($dl[0]);
     $filename = parse_url($dlink);
     $FileName = basename($filename['path']);
     $this->RedirectDownload($dlink, $FileName, $cookie, 0, $Referer);
     exit;
 }
Beispiel #6
0
 public function Download($link)
 {
     $page = $this->GetPage($link);
     is_present($page, "file link that you requested is not valid", "The file link that you requested is not valid. Please contact link publisher or try to make a search");
     is_present($page, "File download limit has been exceeded.", "Free download limit has been exceeded. Try again later.");
     $cookie = GetCookies($page);
     if (isset($_GET["step"]) && $_GET["step"] == "1") {
         $post = array();
         $post["userPass2"] = $_POST['userPass2'];
         $cookie = urldecode($_POST['cookie']);
         $page = $this->GetPage($link, $cookie, $post, $link);
         is_present($page, "enter password to access this file", "The password you have entered is not valid.");
     } elseif (stristr($page, 'enter password to access this file')) {
         global $PHP_SELF;
         $data = $this->DefaultParamArr($link, $cookie);
         $data['step'] = 1;
         echo "\n<form name='dl_password' action='{$PHP_SELF}' method='post'>\n";
         foreach ($data as $name => $value) {
             echo "<input type='hidden' name='{$name}' id='{$name}' value='{$input}' />\n";
         }
         echo "<h4>Enter password here: <input type='text' name='userPass2' id='filepass' size='13' />&nbsp;&nbsp;<input type='submit' onclick='return check()' value='Download File' /></h4>\n";
         echo "<script language='JavaScript'>\nfunction check() {\nvar pass=document.getElementById('filepass');\nif (pass.value == '') { window.alert('You didn\\'t enter the password'); return false; }\nelse { return true; }\n}\n</script>\n";
         echo "</form>\n</body>\n</html>";
         exit;
     }
     $this->getCountDown($page);
     // Retrieve download link
     if (preg_match('/dc(\\d+)\\.2shared\\.com\\/download\\/([^\'|\\"|\\<|\\>|\\r|\\n]+)/i', $page, $L)) {
         $dllink = "http://dc" . $L[1] . ".2shared.com/download/" . $L[2];
         $FileName = urldecode(basename(parse_url($dllink, PHP_URL_PATH)));
     } else {
         html_error("Download-link not found.");
     }
     $this->RedirectDownload($dllink, $FileName, $cookie);
 }
 public function DownloadPremium($link, $user, $pass)
 {
     $rootURL = 'http://www.uploadstation.com/';
     if (!preg_match('#http://(?:www\\.)?uploadstation.com/file/(.+)#i', $link)) {
         html_error("Invalid URL");
     } else {
         $login = array('loginFormSubmit' => 'Login', 'loginUserName' => $user, 'loginUserPassword' => $pass, 'autoLogin' => 'on');
         $page = $this->getPage("{$rootURL}login.php", 0, $login);
         $cookie = GetCookies($page);
         is_notpresent($cookie, "Cookie=", "Login error. Cookie not found.");
         $page = $this->GetPage("{$rootURL}dashboard.php", $cookie, 0, $rootURL);
         is_present($page, "acctype_free", "Error:Not Premium [0]");
         is_notpresent($page, "Expiry date: ", "Error:Not Premium [1]");
         $page = $this->GetPage($link, $cookie, array('download' => 'premium'));
         if (stristr($page, "HTTP/1.1 200 OK")) {
             $page = $this->GetPage($this->link, $cookie, array('download' => 'premium'));
         }
         if (preg_match('/Location: (http:\\/\\/d\\d+.uploadstation.com[^\\r\\n]+)/i', $page, $tmpDownload)) {
             $download_link = $tmpDownload[1];
         } else {
             is_present($page, "You are not able to download", "Error:Not Premium [2]");
         }
         $downloadElements = parse_url($download_link);
         $filename = urldecode(basename($downloadElements["path"]));
         $this->RedirectDownload($download_link, $filename, $cookie);
     }
 }
 public function Download($link)
 {
     if ($_REQUEST['step'] == 'Recaptcha') {
         $post['op'] = $_POST['op'];
         $post['id'] = $_POST['id'];
         $post['rand'] = $_POST['rand'];
         $post['referer'] = $_POST['referer'];
         $post['method_free'] = $_POST['method_free'];
         $post['method_premium'] = '';
         $post['recaptcha_challenge_field'] = $_POST['recaptcha_challenge_field'];
         $post['recaptcha_response_field'] = $_POST['recaptcha_response_field'];
         $post['down_direct'] = $_POST['down_direct'];
         $link = urldecode($_POST['link']);
         $cookie = urldecode($_POST['cookie']);
         $page = $this->GetPage($link, $cookie, $post, $link);
     } else {
         $page = $this->GetPage($link);
         is_present($page, 'The file you were looking for could not be found, sorry for any inconvenience.');
         $cookie = GetCookies($page);
         $form = cut_str($page, '<form method="POST" action=\'\'>', '</form>');
         if (!preg_match_all('/<input type="hidden" name="([^"]+)" value="([^"]+)?">/', $form, $one) || !preg_match_all('/<input type="submit" name="(\\w+_free)" value="([^"]+)">/', $form, $two)) {
             html_error('Error[Post Data 1 not found!]');
         }
         $match = array_merge(array_combine($one[1], $one[2]), array_combine($two[1], $two[2]));
         $post = array();
         foreach ($match as $key => $value) {
             $post[$key] = $value;
         }
         $page = $this->GetPage($link, $cookie, $post, $link);
     }
     if (stripos($page, 'Type the two words')) {
         $form = cut_str($page, '<form name="F1" method="POST"', '</form>');
         if (stripos($form, cut_str($form, '<div class="err">', '</div>'))) {
             echo "<center><font color='red'><b>Wrong Captcha, Please rety!</b></font></center>";
         }
         if (!preg_match('/(\\d+)<\\/span> seconds/', $form, $wait)) {
             html_error('Error[Timer not found!]');
         }
         $this->CountDown($wait[1]);
         if (!preg_match_all('/<input type="hidden" name="([^"]+)" value="([^"]+)?">/', $form, $match)) {
             html_error('Error[Post Data 2 not found!]');
         }
         $match = array_combine($match[1], $match[2]);
         $data = array_merge($this->DefaultParamArr($link, $cookie), $match);
         $data['step'] = 'Recaptcha';
         if (!preg_match('/\\/api\\/challenge\\?k=([^"]+)"/', $form, $c)) {
             html_error('Error[Captcha Data not found!]');
         }
         $this->Show_reCaptcha($c[1], $data);
         exit;
     }
     is_present($page, cut_str($page, '<div class="err">', '<br>'));
     if (!preg_match('/https?:\\/\\/[a-zA-Z]+\\d+\\.4savefile\\.com\\/[^\\r\\n\'"]+/', $page, $dl)) {
         html_error('Error[Download link FREE not found!]');
     }
     $dlink = trim($dl[0]);
     $filename = basename(parse_url($dlink, PHP_URL_PATH));
     $this->RedirectDownload($dlink, $filename, $cookie, 0, $link);
     exit;
 }
Beispiel #9
0
 public function Download($link)
 {
     $page = $this->GetPage($link);
     if (preg_match('/(\\d+)<\\/span> seconds/', $page, $wait)) {
         $this->CountDown($wait[1]);
     }
     $free = 'http://yunfile.com' . cut_str($page, '<a id="downpage_link" href="', '"');
     $page = $this->GetPage($free, 0, 0, $link);
     $cookie = GetCookies($page);
     if (!preg_match('/setCookie\\("(v\\w+)", "(\\w+)"/', $page, $ca)) {
         html_error('Additional Cookie not found!');
     }
     $cookie = $cookie . "; {$ca['1']}={$ca['2']}";
     $form = cut_str($page, '<form class="tform" ', '</form>');
     $dlink = cut_str($form, 'action="', '" method="post"');
     $filename = basename(parse_url($dlink, PHP_URL_PATH));
     if (!preg_match_all('/<input type="hidden" name="([^"]+)" value="([^"]+)" \\/>/', $form, $match)) {
         html_error('Error : Post Data not found!');
     }
     $match = array_combine($match[1], $match[2]);
     $post = array();
     foreach ($match as $key => $value) {
         $post[$key] = $value;
     }
     $this->RedirectDownload($dlink, $filename, $cookie, $post, $link);
     exit;
 }
Beispiel #10
0
 private function Retrieve($link)
 {
     $page = $this->GetPage($link);
     is_present($page, "The file you are looking for is not available");
     is_present($page, "has been removed because we have received", "The file you are looking was removed");
     is_present($page, "<strong>DOWNLOAD LIMIT</strong>", "Download limit reached... Please try again 8-10 hours later.");
     $cookie = GetCookies($page);
     if (!($fname = cut_str($page, '<strong title="', '"'))) {
         html_error("Filename not found.", 0);
     }
     if (!preg_match('/name="fileId" value="([^"]+)"/i', $page, $fileid)) {
         html_error("Link fileId not found.", 0);
     }
     $link = 'http://www.gigasize.com/get/' . $fileid[1];
     if (!($k = cut_str($page, "adscaptcha.com/Get.aspx?", "'"))) {
         html_error("Error getting CAPTCHA data.", 0);
     }
     $page = $this->GetPage("http://api.adscaptcha.com/Get.aspx?{$k}");
     if (!($ch = cut_str($page, "challenge: '", "'"))) {
         html_error("Error getting CAPTCHA image.", 0);
     }
     $data = $this->DefaultParamArr($link, $cookie);
     $data['step'] = '1';
     $data['fileId'] = urlencode($fileid[1]);
     $data['fname'] = urlencode($fname);
     $data['adscaptcha_challenge_field'] = urlencode($ch);
     $this->EnterCaptcha("http://api.adscaptcha.com/Challenge.aspx?cid={$ch}&w=180", $data, 25);
     exit;
 }
Beispiel #11
0
 public function Download($link)
 {
     if (stristr($link, '/video/')) {
         $link = str_replace('/video/', '/download/', $link);
     } elseif (stristr($link, '/audio/')) {
         $link = str_replace('/audio/', '/download/', $link);
     }
     $page = $this->GetPage($link);
     //textarea($page, $cols, $rows, true);
     is_present($page, '/file-404.html', 'File not found!');
     $cookie = GetCookies($page);
     $post = array('referer2' => cut_str($page, 'id="referer2" value="', '"'), 'download' => '1', 'imageField.x' => rand(0, 153), 'imageField.y' => rand(0, 25));
     $page = $this->GetPage($link, $cookie, $post, $link);
     $cookie = $cookie . "; " . GetCookies($page);
     if (!preg_match('#here[|](\\d+)[|]class#', $page, $wait)) {
         html_error('Error: Timer not found!');
     }
     $this->CountDown($wait[1]);
     $dlink = cut_str($page, 'var link_enc=new Array(', ');');
     $dlink = preg_replace('@[,\']@i', '', $dlink);
     if (!isset($dlink)) {
         html_error('Error: Download link not found!');
     }
     $filename = parse_url($dlink);
     $FileName = basename($filename['path']);
     $this->RedirectDownload($dlink, $FileName, $cookie, 0, $link);
 }
Beispiel #12
0
 private function Retrieve($link)
 {
     $page = $this->GetPage($link);
     if (preg_match("#Location: (.+)#", $page, $temp)) {
         $link = "http://www.share-online.biz" . $temp[1];
         $page = $this->GetPage($link);
     }
     $Cookies = GetCookies($page);
     $post = array();
     $post['dl_free'] = "1";
     $post['choice'] = "free";
     $page = $this->GetPage(trim($link) . "/free/", $Cookies, $post, $link);
     //$nfo = getinfo(cut_str($page, 'var nfo="', '"'));
     is_present($page, "failure/full/", "No free slots for free users");
     if (!preg_match("#var wait=(\\d+)#", $page, $count)) {
         html_error("Error 0x01: Plugin is out of date");
     }
     $dl = cut_str($page, 'dl="', '"');
     insert_timer($count[1]);
     $data = array();
     $data['dl'] = $dl;
     $data['captchaid'] = str_replace("chk||", "", base64_decode($dl));
     $data['Cookies'] = $Cookies;
     $data['checkcaptchaurl'] = str_replace("///", "/free/captcha/", cut_str($page, ";var url='", "'"));
     $data['step'] = 'captcha';
     //overwrite step=1
     $this->Recaptcha($link, "6LdatrsSAAAAAHZrB70txiV5p-8Iv8BtVxlTtjKX", "share-online", $data);
     exit;
 }
 private function DownloadPremium($link)
 {
     global $premium_acc, $pauth, $Referer;
     // Getting file name
     $page = $this->GetPage($link, 0, 0, 0, $pauth);
     is_present($page, 'File was deleted');
     is_present($page, 'File not found');
     $FileName = trim(cut_str($page, "<title>Download ", ","));
     // Getting file name end
     // login
     $login = "******";
     $post["login"] = $_REQUEST["premium_user"] ? $_REQUEST["premium_user"] : $premium_acc["easyshare"]["user"];
     $post["password"] = $_REQUEST["premium_pass"] ? $_REQUEST["premium_pass"] : $premium_acc["easyshare"]["pass"];
     $post["remember"] = "1";
     $page = $this->GetPage($login, 0, $post, "http://www.easy-share.com/", $pauth);
     $cook = GetCookies($page);
     // end login
     is_notpresent($cook, "PREMIUM", "Login failed<br>Wrong login/password?");
     $page = $this->GetPage($link, $cook, 0, 0, $pauth);
     is_present($page, 'File was deleted');
     is_present($page, 'File not found');
     if (!isset($FileName) || $FileName == "") {
         $Url = parse_url($link);
         $FileName = !$FileName ? basename($Url["path"]) : $FileName;
     }
     preg_match('/Location:.+?\\r/i', $page, $loca);
     $redir = rtrim($loca[0]);
     preg_match('/http:.+/i', $redir, $loca);
     $Href = trim($loca[0]);
     $cookie = $cook . "; " . $this->BiscottiDiKaox($page);
     $this->RedirectDownload($Href, $FileName, $cookie, 0, $Referer, 0, $pauth);
     exit;
 }
Beispiel #14
0
 private function DownloadPremium($link)
 {
     global $premium_acc;
     $page = $this->GetPage("https://id.megaplus.vn/login?service=http%3A%2F%2Fshare.vnn.vn%2Fmegavnnplus.php%3Fservice%3Dlogin");
     $Cookies = GetCookies($page);
     $lt = cut_str($page, 'name="lt" value="', '"');
     $post = array();
     $post["username"] = $_REQUEST["premium_user"] ? trim($_REQUEST["premium_user"]) : $premium_acc["megashare_vn"]["user"];
     $post["password"] = $_REQUEST["premium_pass"] ? trim($_REQUEST["premium_pass"]) : $premium_acc["megashare_vn"]["pass"];
     $post["lt"] = $lt;
     $post["_eventId"] = "submit";
     $post["submit"] = "%C3%90%C4%82NG+NH%E1%BA%ACP+";
     $page = $this->GetPage("https://id.megaplus.vn/login?service=http%3A%2F%2Fshare.vnn.vn%2Fmegavnnplus.php%3Fservice%3Dlogin", $Cookies, $post);
     $Cookies .= "; " . GetCookies($page);
     if (!preg_match("#Location: (.*)#i", $page, $tlink)) {
         html_error("Error 1x01: Plugin is out of date");
     }
     $page = $this->GetPage(trim($tlink[1]), $Cookies);
     $tmp = explode(";", GetCookies($page));
     $Cookies .= "; " . $tmp[1];
     $page = $this->GetPage($link, $Cookies, 0, $link);
     if (!preg_match("#location: (.*)#i", $page, $tlink)) {
         html_error("Error 1x02: Plugin is out of date");
     }
     $page = $this->GetPage(trim($tlink[1]), $Cookies, 0, $link);
     if (!preg_match('#http://.+8080[^"]+#', $page, $dlink)) {
         html_error("Error 1x03: Plugin is out of date");
     }
     $Url = parse_url($dlink[0]);
     $FileName = basename($Url['path']);
     $this->RedirectDownload($dlink[0], $FileName, $Cookies);
     exit;
 }
Beispiel #15
0
 public function Download($link)
 {
     global $options;
     if ($_REQUEST['captcha'] != '') {
         $post['op'] = $_POST['op'];
         $post['id'] = $_POST['id'];
         $post['rand'] = $_POST['rand'];
         $post['referer'] = $_POST['referer'];
         $post['method_free'] = 'Free Download';
         $post['method_premium'] = '';
         $post['down_direct'] = '1';
         $post['recaptcha_challenge_field'] = $_POST['recaptcha_challenge_field'];
         $post['recaptcha_response_field'] = $_POST['captcha'];
         $link = urldecode($_POST['link']);
         $cookies = urldecode($_POST['cookies']);
         $page = $this->GetPage($link, $cookies, $post);
     } else {
         $page = $this->GetPage($link);
         is_present($page, 'http://www.hugefiles.net/404.html', 'File Not Found');
         $cookies = GetCookies($page);
     }
     if (strpos($page, 'Type the two words:') || strpos($page, 'Wrong captcha')) {
         if (preg_match('#(\\d+)<\\/span> seconds#', $page, $wait)) {
             $this->CountDown($wait[1]);
         }
         if (strpos($page, 'Wrong captcha')) {
             echo '<br><div style="color:#F00; font-size:16px; font-weight:bold;">Wrong Captcha</div>';
         }
         $form = cut_str($page, '<Form name="F1" method="POST"', '</Form>');
         if (!preg_match('#api\\/challenge\\?k=([^"]+)"#', $page, $cp)) {
             html_error("Error get Data Captcha");
         }
         if (!preg_match_all('#<input type="hidden" name="([^"]+)" value="([^"]+)?">#', $form, $dt)) {
             html_error("Error get Data Form Download");
         }
         $data = array_combine($dt[1], $dt[2]);
         $page = $this->GetPage("http://www.google.com/recaptcha/api/challenge?k=" . $cp[1]);
         $sr = cut_str($page, "challenge : '", "'");
         $img = "http://www.google.com/recaptcha/api/image?c=" . $sr;
         $page = $this->GetPage($img);
         $head = strpos($page, "\r\n\r\n");
         $img = substr($page, $head + 4);
         write_file($options['download_dir'] . "upafile_captcha.jpg", $img);
         $data['recaptcha_challenge_field'] = $sr;
         $data['link'] = urlencode($link);
         $data['cookies'] = urlencode($cookies);
         $this->EnterCaptcha($options['download_dir'] . "upafile_captcha.jpg", $data, 20);
         exit;
     }
     is_present($page, cut_str($page, '<div class="err">', '</div>'));
     if (!preg_match('#http://(\\w+).upafile.com:([^\'|"]+)#', $page, $dl)) {
         html_error("Cannot find Download Link");
     }
     $dlink = trim($dl[0]);
     $filename = basename(parse_url($dlink, PHP_URL_PATH));
     $this->RedirectDownload($dlink, $filename, 0, 0, $link);
     exit;
 }
Beispiel #16
0
 public function Download($link)
 {
     if ($_REQUEST['step'] == 'captcha') {
         $link = urldecode($_POST['link']);
         $cookie = urldecode($_POST['cookie']);
         $id = $_POST['id'];
         $post = array();
         $post['__VIEWSTATE'] = $_POST['__VIEWSTATE'];
         $post[$id] = "";
         $post['e_enc'] = $_POST['e_enc'];
         $post['recaptcha_challenge_field'] = $_POST['challenge'];
         $post['recaptcha_response_field'] = $_POST['captcha'];
         $page = $this->GetPage($link, $cookie, $post, $Referer);
     } else {
         $page = $this->GetPage($link);
         is_present($page, "This file is set to Private.");
         is_present($page, "Download File Not Found");
         is_present($page, "Please Enter File Password:"******"This file is password protected.");
         $cookie = GetCookies($page);
     }
     if (strstr($page, "Recaptcha")) {
         $k = cut_str($page, 'api/challenge?k=', '"');
         $ch = cut_str($this->GetPage("http://www.google.com/recaptcha/api/challenge?k={$k}", $cookie), "challenge : '", "'");
         $cap = $this->GetPage("http://www.google.com/recaptcha/api/image?c=" . $ch);
         $capt_img = substr($cap, strpos($cap, "\r\n\r\n") + 4);
         $imgfile = DOWNLOAD_DIR . "refile_captcha.jpg";
         if (file_exists($imgfile)) {
             unlink($imgfile);
         }
         if (empty($capt_img) || !write_file($imgfile, $capt_img)) {
             html_error("Error getting CAPTCHA image.");
         }
         $data = $this->DefaultParamArr($link, $cookie);
         $data['challenge'] = urlencode($ch);
         $data['__VIEWSTATE'] = urlencode(cut_str($page, 'id="__VIEWSTATE" value="', '"'));
         $data['id'] = urlencode(cut_str($page, '<input type="hidden" id="', '"'));
         $data['e_enc'] = urlencode(cut_str($page, 'name="e_enc" value="', '"'));
         $data['step'] = 'captcha';
         $this->EnterCaptcha($imgfile, $data, 20);
         exit;
     }
     if (preg_match('@Location: (\\/d\\/[^\\r\\n]+)@i', $page, $check)) {
         $cookie = $cookie . "; " . GetCookies($page);
         $page = $this->GetPage('http://refile.net' . $check[1], $cookie, 0, $link);
         if (!preg_match("@(http(s)?:\\/\\/\\w+\\.refile\\.net\\/file\\/[^\"]+)\">@", $page, $dl)) {
             html_error('Error: Download link not found!');
         }
         $dlink = trim($dl[1]);
         $filename = basename(parse_url($dlink, PHP_URL_PATH));
         $this->RedirectDownload($dlink, $filename, $cookie, 0, $link);
         exit;
     }
 }
Beispiel #17
0
 public function Download($link)
 {
     $page = $this->GetPage($link);
     $Cookies = GetCookies($page);
     if (!preg_match('#flashvars.file="(.*)"#', $page, $dlink)) {
         html_error("Error - Download link not found");
     }
     $Url = parse_url($dlink[1]);
     $FileName = basename($Url["path"]);
     $this->RedirectDownload($dlink[1], $FileName, $Cookies);
     exit;
 }
Beispiel #18
0
 public function Download($link)
 {
     $page = $this->GetPage($link);
     is_present($page, 'The file you are trying to access is no longer available publicly.');
     $cookie = GetCookies($page);
     if (!preg_match('%<a href="(http:\\/\\/[^\\r\\n"]+)">here</a>%', $page, $dl)) {
         html_error('Error [Download Link not found!]');
     }
     $dlink = trim($dl[1]);
     $filename = basename(parse_url($dlink, PHP_URL_PATH));
     $this->RedirectDownload($dlink, $filename, $cookie);
     exit;
 }
 public function Download($link)
 {
     $page = $this->GetPage($link);
     is_present($page, 'HTTP/1.1 410 Gone', 'This video has been removed by the user.');
     is_present($page, 'HTTP/1.1 403 Forbidden', 'This video is forbidden to download!');
     is_present($page, '(private)', 'This video is set to be PRIVATE!');
     $Cookies = GetCookies($page);
     if (preg_match('#ocation: (.*)#', $page, $loc)) {
         $page = $this->GetPage('http://www.dailymotion.com' . $loc[1]);
         is_page($page);
         is_present($page, 'HTTP/1.1 404', 'Page Not Found! [0*01]');
         if (!preg_match('#trackPageview\\("([^"]+)"#', $page, $family)) {
             html_error('Error in process Download [0*01]');
         }
         $page = $this->GetPage('http://www.dailymotion.com' . $family[1] . '&enable=false');
         is_page($page);
         is_present($page, 'HTTP/1.1 404', 'Page Not Found! [0*02]');
         if (!preg_match('#ocation: (.*)#', $page, $loc2)) {
             html_error('Error in process Download [0*02]');
         }
         $page = $this->GetPage($loc2[1]);
         is_page($page);
         is_present($page, 'HTTP/1.1 404', 'Page Not Found! [0*03]');
         $Cookies = $Cookies . '; ' . GetCookies($page);
         if (!preg_match('#ocation: (.*)#', $page, $loc3)) {
             html_error('Error in process Download [0*03]');
         }
         $page = $this->GetPage($loc3[1], $Cookies);
         is_page($page);
         is_present($page, 'HTTP/1.1 404', 'Page Not Found! [0*04]');
     }
     $FileName = trim(cut_str($page, '<title>', '</title>'));
     $FileName = str_replace(" ", "_", $FileName) . ".mp4";
     try {
         if (!preg_match('@"hqURL":"([^|\\r|\\n|"]+)@i', urldecode($page), $temp)) {
             preg_match('@"(?:sd)?URL":"([^|\\r|\\n|"]+)@i', urldecode($page), $temp);
         }
         if (!isset($temp[1])) {
             throw new Exception("Error : Video link not found!");
         }
         $temp = str_replace("\\/", "/", $temp[1]) . "&redirect=0";
         $page = $this->GetPage($temp, $Cookies);
         if (!preg_match('#http://.+dailymotion.com/video/[^\\r\\n]+#', $page, $dlink)) {
             throw new Exception("Error : Direct link not found!");
         }
         $this->RedirectDownload($dlink[0], $FileName, $Cookies, 0, $temp);
         exit;
     } catch (Exception $e) {
         html_error($e->getMessage());
     }
 }
Beispiel #20
0
 public function Download($link)
 {
     $page = $this->GetPage($link);
     $cookie = GetCookies($page);
     if (!($dlink = cut_str($page, 'name="FlashVars" value="flv=', '&seekparam'))) {
         html_error('Error[Download link not found!]');
     }
     if (!($filename = cut_str($page, '<title>', '</title>'))) {
         html_error('Error[Filename not found!]');
     }
     $dlink = urldecode($dlink);
     $filename = str_replace(' ', '_', $filename);
     $this->RedirectDownload($dlink, $filename, $cookie, $link, $filename);
 }
 public function Download($link)
 {
     $page = $this->GetPage($link);
     is_present($page, "/?404", 'File not found.');
     $cookie = GetCookies($page);
     //if (!preg_match('@<h1>([^<|\r|\n]+)<strong>@i', $page, $fname)) html_error('Error: Title not found.');
     is_present($page, "You have exceeded the daily stream limit", "Error: You have exceeded the daily stream limit for your country. Please try again tomorrow.");
     if (!preg_match("@countdownNum = (\\d+);@i", $page, $cW) && !preg_match("@get_file\\.php\\?stream=(\\w+)@i", $page, $getv) && !preg_match("@get_file\\.php\\?download=(\\w+&key=\\w+)@i", $page, $getf)) {
         html_error("Error: Countdown/File info not found.");
     }
     if ($cW) {
         $post = array();
         if (!($post['hash'] = cut_str($page, 'value="', '" name="hash"'))) {
             html_error('Error: Post data not found.');
         }
         $post['confirm'] = 'Continue as Free User';
         $this->CountDown($cW[1] + 2);
         $this->GetPage($link, $cookie, $post);
         $page = $this->GetPage($link, $cookie);
         is_present($page, "You have exceeded the daily stream limit", "Error: You have exceeded the daily stream limit for your country. Please try again tomorrow.");
         if (!preg_match("@get_file\\.php\\?stream=(\\w+)@i", $page, $getv) && !preg_match("@get_file\\.php\\?download=(\\w+&key=\\w+)@i", $page, $getf)) {
             html_error('Error: File info not found.');
         }
     }
     if ($getv) {
         $page = $this->GetPage("http://www.sockshare.com/get_file.php?stream=" . $getv[1], $cookie);
         is_present($page, "/images/expired_link.gif", 'Error: The stream link has expired.');
         if (!preg_match('@"(http://[^\\.|"]+\\.sockshare.com/\\w+/\\w+/([^/|"]+)/[^"]+)"@i', $page, $downl)) {
             html_error('Error: Stream link not found.');
         }
         if (!preg_match('@\\.[^\\.]+$@i', basename($downl[2]), $ext)) {
             $ext = array('.flv');
         }
         $fname = str_replace(array("\\", "/", ":", "*", "?", "\"", "<", ">", "|"), "_", urldecode(trim($downl[2]))) . " [{$getv[1]}]" . $ext[0];
         $this->RedirectDownload($downl[1], $fname, $cookie, 0, 0, $fname);
     } else {
         $page = $this->GetPage("http://www.sockshare.com/get_file.php?download=" . $getf[1], $cookie);
         is_present($page, "/images/expired_link.gif", 'Error: The download link has expired.');
         if (!preg_match('@Location: (http://[^\\.|"]+\\.sockshare.com/\\w+/\\w+/([^/|\\r|\\n]+)/[^\\r|\\n]+)@i', $page, $downl)) {
             $page = $this->GetPage($link, $cookie);
             is_present($page, "This content server is down for maintenance", "Error: This content server is down for maintenance. Please try again a bit later.");
             html_error('Error: Download link not found.');
         }
         if (!($fname = cut_str($page, 'attachment; filename="', '"'))) {
             $fname = $downl[2];
         }
         $this->RedirectDownload($downl[1], $fname, $cookie, 0, 0, $fname);
     }
 }
 public function Download($link)
 {
     $page = $this->GetPage($link);
     is_present($page, 'DL_FileNotFound', 'File not found!');
     $cookie = GetCookies($page);
     if (preg_match('/var odl = (\\d+);/', $page, $w)) {
         $this->CountDown($w[1]);
     }
     if (!preg_match("@var downloadlink = '([^\r\n']+)'@", $page, $dl)) {
         html_error('Error [Download Link not found!]');
     }
     $filename = urldecode(cut_str($dl[1], "name=", "\r\n"));
     $this->RedirectDownload($dl[1], $filename, $cookie, 0, $link);
     exit;
 }
 public function Download($link)
 {
     $page = $this->GetPage($link);
     $cookie = GetCookies($page);
     if (!preg_match('%<a href="(.*)" class="direct-download">%', $page, $tmp)) {
         html_error('Can\'t find sourceforge redirect link!');
     }
     $temp = html_entity_decode(urldecode(trim($tmp[1])), ENT_QUOTES, 'UTF-8');
     $t1 = cut_str($temp, 'http://downloads.', '?r');
     $t2 = cut_str($temp, 'use_mirror=', '\\n');
     $dlink = "http://{$t2}.dl.{$t1}";
     $filename = parse_url($dlink);
     $FileName = basename($filename['path']);
     $this->RedirectDownload($dlink, $FileName, $cookie, 0, $link);
 }
 public function Download($link)
 {
     $page = $this->GetPage($link);
     is_present($page, "file link that you requested is not valid", "The file link that you requested is not valid. Please contact link publisher or try to make a search", "0");
     $cookie = GetCookies($page);
     if ($_GET["step"] == "1") {
         $post = array();
         $post["userPass2"] = $_POST['userPass2'];
         $cookie = $_POST['cookie'];
         $page = $this->GetPage($link, $cookie, $post, $link);
         is_present($page, "enter password to access this file", "The password you have entered is not valid.");
     } elseif (stristr($page, 'enter password to access this file')) {
         echo "\n" . '<form name="dl_password" action="' . $PHP_SELF . '" method="post" >' . "\n";
         echo '<input type="hidden" name="link" value="' . urlencode($link) . '" />' . "\n";
         echo '<input type="hidden" name="referer" value="' . urlencode($Referer) . '" />' . "\n";
         echo '<input type="hidden" name="cookie" value="' . urlencode($cookie) . '" />' . "\n";
         echo '<input type="hidden" name="step" value="1" />' . "\n";
         echo '<input type="hidden" name="comment" id="comment" value="' . $_GET["comment"] . '" />' . "\n";
         echo '<input type="hidden" name="email" id="email" value="' . $_GET["email"] . '" />' . "\n";
         echo '<input type="hidden" name="partSize" id="partSize" value="' . $_GET["partSize"] . '" />' . "\n";
         echo '<input type="hidden" name="method" id="method" value="' . $_GET["method"] . '" />' . "\n";
         echo '<input type="hidden" name="proxy" id="proxy" value="' . $_GET["proxy"] . '" />' . "\n";
         echo '<input type="hidden" name="proxyuser" id="proxyuser" value="' . $_GET["proxyuser"] . '" />' . "\n";
         echo '<input type="hidden" name="proxypass" id="proxypass" value="' . $_GET["proxypass"] . '" />' . "\n";
         echo '<input type="hidden" name="path" id="path" value="' . $_GET["path"] . '" />' . "\n";
         echo '<h4>Enter password here: <input type="text" name="userPass2" id="filepass" size="13" />&nbsp;&nbsp;<input type="submit" onclick="return check()" value="Download File" /></h4>' . "\n";
         echo "<script language='JavaScript'>\nfunction check() {\nvar pass=document.getElementById('filepass');\nif (pass.value == '') { window.alert('You didn\\'t enter the password'); return false; }\nelse { return true; }\n}\n</script>\n";
         echo "</form>\n</body>\n</html>";
         exit;
     }
     $this->getCountDown($page);
     $FileName = trim(cut_str($page, 'name="Description" content="', ' download free at 2shared.'));
     // Get data
     preg_match("/var em='(.*)';/", $page, $c);
     $em = $c[1];
     preg_match("/var key='(.*)';/", $page, $c);
     $key = $c[1];
     if (!stristr($page, "retrieveLink.jsp?id='+key") && stripos($page, 'decode(key)') !== false) {
         // Decode 'key'
         $key = $this->decode_key($key, $em);
         //I'm starting to believe they are changing the key only to make crash this plugin.
     }
     // Retrieve download link
     $page = $this->GetPage("http://www.2shared.com/pageDownload1/retrieveLink.jsp?id=" . $key, $cookie);
     preg_match('/dc(\\d+)\\.2shared\\.com\\/download(\\d)\\/(.*)/', $page, $L);
     $dllink = "http://dc" . $L[1] . ".2shared.com/download" . $L[2] . "/" . $L[3];
     $this->RedirectDownload($dllink, $FileName, $cookie);
 }
 private function Premium($link)
 {
     global $premium_acc;
     $username = $_REQUEST["premium_user"] ? trim($_REQUEST["premium_user"]) : $premium_acc["necroupload_com"]["user"];
     $password = $_REQUEST["premium_pass"] ? trim($_REQUEST["premium_pass"]) : $premium_acc["necroupload_com"]["pass"];
     if (empty($username) or empty($password)) {
         html_error('Usuer and/or Password this empty.');
     }
     $post = array();
     $post["login"] = $username;
     $post["password"] = $password;
     $post["redirect"] = "http://necroupload.com/";
     $post["op"] = 'login';
     $url = 'http://necroupload.com/';
     $page = $this->GetPage($url, 0, $post);
     is_page($page);
     is_present($page, "Incorrect Login or Password");
     $cookies = GetCookies($page);
     $page = $this->GetPage($url . '?op=my_account', $cookies);
     is_present($page, 'Upgrade to premium', 'Account Expired or NOT PREMIUM');
     $page = $this->GetPage($link, $cookies);
     is_present($page, cut_str($page, '<div class="err">', '</div>'));
     is_present($page, '<b>File Not Found</b>');
     if (preg_match("#ocation: (.*)#", $page, $dl)) {
         $name = basename(parse_url(trim($dl[1]), PHP_URL_PATH));
         if (empty($name)) {
             html_error('Cannot Get Filename [0x01]');
         }
         $this->RedirectDownload(trim($dl[1]), $name, $cookies, 0, $link);
         exit;
     }
     $form = cut_str($page, '<Form name="F1" method="POST"', '</form>');
     if (!preg_match_all('#input type="hidden" name="([^"]+)" value="([^"]+)"#', $form, $preg)) {
         html_error('Cannot get data in post');
     }
     $post = array_combine($preg[1], $preg[2]);
     $page = $this->GetPage($link, $cookies, $post, $link);
     is_present($page, cut_str($page, '<div class="err">', '</div>'));
     if (!preg_match('#http\\:\\/\\/necroupload.com\\/files\\/([^"]+)#', $page, $dl)) {
         html_error('Failed to recover download link premium.');
     }
     $name = basename(parse_url(trim($dl[0]), PHP_URL_PATH));
     if (empty($name)) {
         html_error('Cannot Get Filename [0x02]');
     }
     $this->RedirectDownload(trim($dl[0]), $name, $cookies, 0, $link);
     exit;
 }
 public function Download($link)
 {
     $page = $this->GetPage($link);
     $cookie = GetCookies($page);
     is_notpresent($cookie, 'PHPSESSID', 'File not found!');
     if (!preg_match('/(\\d+)<\\/span> Seconds/', $page, $w)) {
         html_error('Error[Timer not found!]');
     }
     $this->CountDown($w[1]);
     $page = $this->GetPage($link, $cookie, array('Submit.x' => rand(0, 51), 'Submit.y' => rand(0, 13)), $link);
     if (!preg_match('/location: (http:\\/\\/[^\\r\\n]+)/i', $page, $dl)) {
         html_error('Error[Download link not found!]');
     }
     $dlink = trim($dl[1]);
     $this->RedirectDownload($dlink, "sharenow", $cookie, $link);
 }
 private function DownloadPremium($link)
 {
     global $premium_acc, $Referer;
     $loginUrl = "http://storage.to/login";
     $usrEmail = "";
     $post = array();
     $usrEmail = $_REQUEST["premium_user"] ? $_REQUEST["premium_user"] : $premium_acc["storage"]["user"];
     $post["email"] = $usrEmail;
     $post["password"] = $_REQUEST["premium_pass"] ? $_REQUEST["premium_pass"] : $premium_acc["storage"]["pass"];
     $post[""] = "Login";
     $page = $this->GetPage($loginUrl, 0, $post, $loginUrl);
     $cookie = GetCookies($page);
     if (!strpos($page, "Login successful")) {
         html_error("Login Failed , Bad username/password combination.", 0);
     }
     $this->DownloadLink($link, $cookie);
 }
Beispiel #28
0
 public function Download($link)
 {
     $page = $this->GetPage($link);
     $cookie = GetCookies($page);
     if (!preg_match('/<a href="(http:\\/\\/[^\\r\\n"]+)" class="downloadNow" id="downloadLink">/', $page, $tl)) {
         html_error('Error[Redirect Link not found!]');
     }
     $tlink = trim($tl[1]);
     $page = $this->GetPage($tlink, $cookie, 0, $link);
     if (!preg_match("/var downloadUrl = '(https?:\\/\\/[^\r\n']+)';/", $page, $dl)) {
         html_error('Error[Download Link not found!]');
     }
     $dlink = trim($dl[1]);
     $filename = basename(parse_url($dlink, PHP_URL_PATH));
     $this->RedirectDownload($dlink, $filename, $cookie, 0, $link);
     exit;
 }
 private function DownloadFree($link)
 {
     $Referer = $link;
     $page = $this->GetPage($link);
     is_present($page, "This file has been deleted");
     is_present($page, "The one-hour limit has been reached");
     is_present($page, "File not found. It has been either deleted, or it never existed at all.");
     $cookie = GetCookies($page);
     $newurl = "http://www.speedyshare.com" . trim(cut_str($page, 'resultlink><a href="', '">'));
     $page = $this->GetPage($newurl, $cookie, 0, $Referer);
     if (preg_match('/ocation: (.+)/', $page, $location)) {
         $Href = trim($location[1]);
         $Url = parse_url($Href);
     }
     $FileName = urldecode(basename($Url['path']));
     $this->RedirectDownload($Href, $FileName, $cookie, 0, $Referer);
     exit;
 }
 private function DownloadPremium($link)
 {
     global $premium_acc;
     $post = array();
     $post['user'] = $_REQUEST["premium_user"] ? trim($_REQUEST["premium_user"]) : $premium_acc["filedude_com"]["user"];
     $post['pass'] = $_REQUEST["premium_pass"] ? trim($_REQUEST["premium_pass"]) : $premium_acc["filedude_com"]["pass"];
     $page = $this->GetPage("http://www.filedude.com/premium_login", 0, $post, $link);
     $Cookies = GetCookies($page);
     $page = $this->GetPage($link, $Cookies, 0, $link);
     is_present($page, "The file you've requested doesn't exist ", "The file you've requested doesn't exist ");
     if (!preg_match("#Location: (.+)#", $page, $dlink)) {
         html_error("Error 1x01: Plugin is out of date");
     }
     $Url = parse_url(trim($dlink[1]));
     $FileName = basename($Url['path']);
     $this->RedirectDownload(trim($dlink[1]), $FileName, $Cookies, 0, $link);
     exit;
 }