private function DownloadFree($link)
 {
     global $pauth;
     $Referer = $link;
     $page = $this->GetPage($link, 0, 0, 0, $pauth);
     $cookies = $this->biscottiDiKaox($page);
     is_present($page, 'File was deleted');
     is_present($page, 'File not found');
     is_present($page, 'You have downloaded over 150MB during last hour.');
     $FileName = trim(cut_str($page, "<title>Download ", ","));
     $div = trim(cut_str($page, '<div id="block-captcha">', "</div>"));
     $count = trim(cut_str($div, "w='", "'"));
     insert_timer($count, "Waiting link timelock");
     if ($src = trim(cut_str($page, "u='", "'"))) {
         $Url = parse_url($link);
         $Href = "http://" . $Url["host"] . $src;
         $page = $this->GetPage($Href, $cookies, 0, $Referer, $pauth);
     }
     $Href = trim(cut_str($page, 'post" action="', '"'));
     $id = trim(cut_str($page, '"id" value="', '"'));
     $post = array();
     $post["captcha"] = "";
     $post["id"] = $id;
     $this->RedirectDownload($Href, $FileName, $cookies, $post, $Referer, 0, $pauth);
     exit;
 }
Beispiel #2
0
 public function Download($link)
 {
     $page = $this->GetPage($link);
     is_present($page, "This file couldn't be found!", "This file doesn't exit or has been deleted.");
     $post = array();
     $post['free_download'] = "1";
     $post['free_download1.x'] = rand(0, 83);
     $post['free_download1.y'] = rand(0, 20);
     $post['free_download1'] = "1";
     $page = $this->GetPage($link, 0, $post, $link);
     preg_match('/<div id="time2wait" style="display:inline;">(\\d+)<\\/div>/', $page, $wait);
     $countdown = $wait[1];
     insert_timer($countdown, "Download is being prepared.", "", true);
     $ticket = cut_str($page, 'id="ticket" value="', '"');
     unset($post);
     $post['ticket'] = $ticket;
     $post['x'] = rand(0, 78);
     $post['y'] = rand(0, 19);
     if (!preg_match('/form method="post" action="(.*)"/', $page, $dl)) {
         html_error("Error, Download link not found bla...bla...bla...he3x");
     }
     $dlink = trim($dl[1]);
     $Url = parse_url($dlink);
     $FileName = basename($Url['path']);
     $this->RedirectDownload($dlink, $FileName, 0, $post, $link);
     exit;
 }
Beispiel #3
0
 private function Free($link)
 {
     $page = $this->GetPage($link);
     $cookie = 'lang=english';
     is_present($page, '<b>File Not Found</b>');
     is_present($page, 'This file downloading are located on server maintenance. Please try again after few hours.');
     $form = cut_str($page, "<Form method=\"POST\" action='", '</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]);
     $post['method_free'] = 'Free Download';
     $page = $this->GetPage($link, $cookie, $post, $link);
     if (preg_match('#You have to wait (\\d+) minutes#', $page, $minutes)) {
         $wait1 = $minutes[1] * 60;
     }
     if (preg_match('#(\\d+) seconds till next download#', $page, $seconds)) {
         $wait = $wait1 + $seconds[1];
         unset($post);
         $post['link'] = urlencode($link);
         $post['stop'] = '1';
         $this->JSCountDown($wait, $post, 'You did more than a download in a short time');
         exit;
     }
     if (preg_match('#<p class="err">([^<>]+)</p>#', $page, $error)) {
         html_error($error[1]);
     }
     if (!preg_match('#">(\\d+)</span> seconds</span>#', $page, $time)) {
         html_error('Cannot get wait time');
     }
     insert_timer($time[1]);
     $form = cut_str($page, '<Form name="F1" method="POST"', "</form>");
     unset($post);
     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]);
     $cap = cut_str($page, 'Enter code below:</b></td></tr>', '</table>');
     if (!preg_match_all("@padding-left:(\\d+)px;padding-top:(\\d+)px;'>([^<>]+)@", $cap, $parametro)) {
         html_error('Cannot get data of Captcha');
     }
     $code = array_combine($parametro[1], $parametro[3]);
     ksort($code);
     foreach ($code as $valor) {
         $captcha .= $this->decode_utf8_number($valor);
     }
     $post['code'] = $captcha;
     $page = $this->GetPage($link, $cookie, $post, $link);
     if (!preg_match("#(.*)http*s*://.+/files/[^\r|\n|\\s|'|\"]+#", $page, $dl)) {
         html_error('Cannot get Download Link');
     }
     $dlink = trim(str_replace($dl[1], '', $dl[0]));
     $filename = basename(parse_url($dlink, PHP_URL_PATH));
     $this->RedirectDownload($dlink, $filename);
     exit;
 }
 private function DownloadFree($link)
 {
     global $Referer;
     $Referer = $link;
     $page = $this->GetPage($link);
     $fileID = trim(cut_str($page, 'file_id" value="', '"'));
     $code = trim(cut_str($page, 'code" value="', '"'));
     $action = trim(cut_str($page, 'action" value="', '"'));
     $Href_1 = trim(cut_str($page, 'form action="http://uploading.com/files', '"'));
     $Href_1 = "http://uploading.com/files" . $Href_1;
     $cookie = GetCookies($page);
     $temp = cut_str($page, '<div class="c_1', '</div>');
     $FileName = trim(cut_str($temp, '<h2>', '</h2>'));
     is_present($page, "Sorry, the file requested by you does not exist on our servers.");
     is_present($page, "We are sorry, the file was removed either by its owner or due to the complaint received");
     if (stristr($page, "Sorry, you can download only one file per")) {
         $minutes = trim(cut_str($page, "Sorry, you can download only one file per ", " minutes."));
         if ($minutes) {
             html_error("Download limit exceeded. Sorry, you can download only one file per <font color=black><span id='waitTime'>{$minutes}</span></font> minutes.Please try again later or acquire a premium membership.", 0);
         } else {
             html_error("Download limit exceeded. Please try again later or acquire a premium membership.", 0);
         }
     }
     $post = array();
     $post["action"] = $action;
     $post["file_id"] = $fileID;
     $post["code"] = $code;
     $page = $this->GetPage($Href_1, $cookie, $post, $Referer);
     is_present($page, "Requested file not found");
     preg_match_all('/start_timer\\((\\d+)\\)/i', $page, $tm);
     $count = trim($tm[1][0]);
     insert_timer($count, "Waiting link timelock", "", true);
     $tid = str_replace(".", "12", microtime(true));
     $sUrl = "http://uploading.com/files/get/?JsHttpRequest=" . $tid . "-xml";
     $code = trim(cut_str($page, 'code: "', '",'));
     unset($post);
     $post["file_id"] = $fileID;
     $post["code"] = $code;
     $post["action"] = "get_link";
     $post["pass"] = "";
     $page = $this->GetPage($sUrl, $cookie, $post, $Referer);
     //$dUrl=str_replace("\\","",cut_str($page,'answer": { "link": "','"'));
     $dUrl = str_replace("\\", "", cut_str($page, 'link": "', '"'));
     if ($dUrl == "") {
         html_error("Download url error , Please wait for some minute and reattempt", 0);
     }
     $this->RedirectDownload($dUrl, $FileName, $cookie, 0, $Referer);
     exit;
 }
 private function Retrieve($link)
 {
     global $options;
     $page = $this->GetPage($link);
     is_present($page, "Error - File not available", "Error - File not available");
     if (preg_match('#<span id="blocktimecounter">(\\d+) seconds#', $page, $wait)) {
         //html_error("Please wait " . $wait[1] . " seconds to start the download");
         insert_timer($wait[1]);
     }
     $Cookies = GetCookies($page);
     if (!preg_match('#var ajaxdl = "(.*)"#', $page, $temp)) {
         html_error("Error 0x01- Plugin is out of date", 0);
     }
     if (!preg_match('#(http.*files-ajax.*)"#', $page, $UrlPost)) {
         html_error("Error 0x02- Plugin is out of date", 0);
     }
     $ajaxdl = $temp[1];
     $post = array();
     $post["request"] = "generateID";
     $post["ajaxid"] = $ajaxdl;
     $page = $this->GetPage(trim($UrlPost[1]), $Cookies, $post, $link);
     if (preg_match("#(\\d+)</span> seconds#", $page, $wait)) {
         insert_timer($wait[1]);
     } else {
         insert_timer(60);
     }
     $page = $this->GetPage("http://www.google.com/recaptcha/api/challenge?k=6LdtjrwSAAAAACepq37DE6GDMp1TxvdbW5ui0rdE");
     $ch = cut_str($page, "challenge : '", "'");
     $img = "http://www.google.com/recaptcha/api/image?c=" . $ch;
     $page = $this->GetPage($img);
     $headerend = strpos($page, "\r\n\r\n");
     $pass_img = substr($page, $headerend + 4);
     write_file($options['download_dir'] . "bitshare_captcha.jpg", $pass_img);
     $randnum = rand(10000, 100000);
     $img_data = explode("\r\n\r\n", $page);
     $header_img = $img_data[0];
     $data = array();
     $data["request"] = "validateCaptcha";
     $data["ajaxid"] = $ajaxdl;
     $data["recaptcha_challenge_field"] = $ch;
     $data['link'] = urlencode($link);
     $data['step'] = '1';
     $data['cookie'] = urlencode($Cookies);
     $data['urlpost'] = urlencode(trim($UrlPost[1]));
     $this->EnterCaptcha($options['download_dir'] . "bitshare_captcha.jpg", $data, 20);
     exit;
 }
 private function EnterCaptchaCode($link)
 {
     global $nn, $PHP_SELF, $pauth;
     $page = $this->GetPage($link);
     //is_present ( $page, "Due to a violation of our terms of use, the file has been removed from the server." );
     $cookie = "";
     preg_match_all("/Set-Cookie: ([^;]+;)/", $page, $cook);
     $arraySize = count($cook);
     for ($i = 0; $i < $arraySize; $i++) {
         $cookie = $cookie . array_shift($cook[1]);
     }
     $count = trim(cut_str($page, '<span id="countdown">', '</span>'));
     $op = trim(cut_str($page, '<input type="hidden" name="op" value="', '"'));
     $id = trim(cut_str($page, '<input type="hidden" name="id" value="', '"'));
     $rand = trim(cut_str($page, '<input type="hidden" name="rand" value="', '"'));
     $referer = trim(cut_str($page, '<input type="hidden" name="referer" value="', '"'));
     $method_free = trim(cut_str($page, '<input type="hidden" name="method_free" value="', '"'));
     $method_premium = trim(cut_str($page, '<input type="hidden" name="method_premium" value="', '"'));
     $down_script = trim(cut_str($page, '<input type="hidden" name="down_script" value="', '"'));
     $captchaImage = trim(cut_str($page, '<img src="http://evilshare.com/captchas/', '">'));
     $captcha_access_url = "http://evilshare.com/captchas/" . $captchaImage;
     insert_timer($count, "Waiting link timelock");
     print "<form name=\"dl\" action=\"{$PHP_SELF}\" method=\"post\">\n";
     print "<input type=\"hidden\" name=\"link\" value=\"" . urlencode($link) . "\">\n";
     print "<input type=\"hidden\" name=\"op\" value=\"" . urlencode($op) . "\">\n";
     print "<input type=\"hidden\" name=\"id\" value=\"" . urlencode($id) . "\">\n";
     print "<input type=\"hidden\" name=\"rand\" value=\"" . urlencode($rand) . "\">\n";
     print "<input type=\"hidden\" name=\"referer\" value=\"" . urlencode($referer) . "\">\n";
     print "<input type=\"hidden\" name=\"method_free\" value=\"" . urlencode($method_free) . "\">\n";
     print "<input type=\"hidden\" name=\"method_premium\" value=\"" . urlencode($method_premium) . "\">\n";
     print "<input type=\"hidden\" name=\"down_script\" value=\"" . urlencode($down_script) . "\">\n";
     print "<input type=\"hidden\" name=\"step\" value=\"1\">\n";
     print "<input type=\"hidden\" name=\"comment\" id=\"comment\" value=\"" . $_GET["comment"] . "\">\n";
     print "<input type=\"hidden\" name=\"email\" id=\"email\" value=\"" . $_GET["email"] . "\">\n";
     print "<input type=\"hidden\" name=\"partSize\" id=\"partSize\" value=\"" . $_GET["partSize"] . "\">\n";
     print "<input type=\"hidden\" name=\"method\" id=\"method\" value=\"" . $_GET["method"] . "\">\n";
     print "<input type=\"hidden\" name=\"proxy\" id=\"proxy\" value=\"" . $_GET["proxy"] . "\">\n";
     print "<input type=\"hidden\" name=\"proxyuser\" id=\"proxyuser\" value=\"" . $_GET["proxyuser"] . "\">\n";
     print "<input type=\"hidden\" name=\"proxypass\" id=\"proxypass\" value=\"" . $_GET["proxypass"] . "\">\n";
     print "<input type=\"hidden\" name=\"path\" id=\"path\" value=\"" . $_GET["path"] . "\">\n";
     print "<h4>" . lang(301) . " <img src=\"{$captcha_access_url}\" > " . lang(302) . ": ";
     print "<input type=\"text\" name=\"code\" size=\"4\">&nbsp;&nbsp;";
     print "<input type=\"submit\" onclick=\"return check()\" value=\"" . lang(303) . "\"></h4>\n";
     print "<script language=\"JavaScript\">" . $nn . "function check() {" . $nn . "var imagecode=document.dl.code.value;" . $nn . 'if (imagecode == "") { window.alert("You didn\'t enter the image verification code"); return false; }' . $nn . 'else { return true; }' . $nn . '}' . $nn . '</script>' . $nn;
     print "</form>\n</body>\n</html>";
 }
 private function DownloadFree($link)
 {
     global $nn, $PHP_SELF, $pauth;
     $LINK = str_replace("https", "http", $LINK);
     $page = $this->GetPage($link);
     is_page($page);
     preg_match('/action="([^\\"]*)"/i', $page, $redir);
     $Href = trim($redir[1]);
     $random_furk = cut_str($page, '<input type="hidden" name="rand" value="', '" />');
     $countd = cut_str($page, '<input class="button-large" type="submit" value="Free Download (wait ', 's)"');
     insert_timer($countd, "Waiting link timelock");
     $post = array();
     $post["rand"] = $random_furk;
     $Url = parse_url($Href);
     $FileName = !$FileName ? basename($Url["path"]) : $FileName;
     $this->RedirectDownload($Href, $FileName, 0, $post);
     exit;
 }
 private function DownloadLink($link, $cookie = 0)
 {
     global $Referer;
     $id = substr($link, 13, 6);
     $getlink = "http://x7.to/james/ticket/dl/{$id}";
     $post = array();
     $page = $this->GetPage($getlink, $cookie, $post, $Referer);
     if (!$cookie) {
         $cookie = GetCookies($page);
     }
     $badJson = trim(cut_str($page, '{', '}'));
     $badJson = "{" . $badJson . "}";
     $raj = $this->convertToJson($badJson);
     $json = str_replace("'", "\"", $raj);
     $jsarray = json_decode($json, true);
     if (!$jsarray) {
         html_error("Cannot decode Json string!", 0);
     }
     if ($jsarray['err'] == "limit-dl" || $jsarray['err'] == "limit-parallel") {
         //html_error("Download limit exceeded.",0 );
         html_error(lang(111), 0);
     } else {
         if ($jsarray['err']) {
             html_error($jsarray['err'], 0);
         } else {
             if ($jsarray['type'] == "download") {
                 $Url = parse_url($jsarray['url']);
                 $downloadId = basename($Url['path']);
                 if ($jsarray['url'] == "" || $downloadId == "dl") {
                     html_error("File not found. Kindly check the link", 0);
                 } else {
                     $count = $jsarray['wait'];
                     if ($count > 0) {
                         insert_timer($count, "Waiting link timelock", "", true);
                     }
                 }
             }
         }
     }
     $Href = trim($jsarray['url']);
     $FileName = $id;
     $this->RedirectDownload($Href, $FileName, $cookie);
     exit;
 }
 private function DownloadFree($link)
 {
     $post = array();
     $post['dl_free'] = "1";
     $post['captcha'] = $_POST['captchaid'];
     $post['recaptcha_challenge_field'] = $_POST['recaptcha_challenge_field'];
     $post['recaptcha_response_field'] = $_POST['captcha'];
     //$dl=$_POST['dl'];
     $Cookies = $_POST['Cookies'];
     $page = $this->GetPage($_POST['checkcaptchaurl'], $Cookies, $post, $referer);
     preg_match("#[\r\n](\\w{5,})[\r\n]#", $page, $tmp);
     if ($tmp[1] == "0") {
         html_error("Wrong captcha");
     }
     $dl = base64_decode($tmp[1]);
     insert_timer(30);
     $this->RedirectDownload($dl, "share-online", $Cookies, 0, $link);
     exit;
 }
 private function DownloadFree($link)
 {
     $page = $this->GetPage($link);
     is_present($page, "El archivo que que buscas no existe o ha sido eliminado.", "El archivo que que buscas no existe o ha sido eliminado.");
     $Cookies = GetCookies($page);
     insert_timer(18);
     if (!preg_match('#http:\\/\\/.*\\/get\\/[^\'"]+#', $page, $getlink)) {
         html_error("Error 0x01: Plugin is out of date");
     }
     $page = $this->GetPage($getlink[0], $Cookies, 0, $link);
     $post = array();
     $post['task'] = "download";
     $post['submit.x'] = "114";
     $post['submit.y'] = "33";
     $Url = parse_url($getlink[0]);
     $FileName = basename($Url['path']);
     $this->RedirectDownload($getlink[0], $FileName, $Cookies, $post, $getlink[0]);
     exit;
 }
Beispiel #11
0
 private function DownloadFree($link)
 {
     global $options;
     $page = $this->GetPage($link);
     $file_id = cut_str($page, 'name="file_id" value="', '"');
     is_present($page, "Vui lòng chờ lượt download kế tiếp ", "Vui lòng chờ lượt download kế tiếp ");
     $Cookies = GetCookies($page);
     $post = array();
     $post['link_file_pwd_dl'] = "";
     $post['action'] = "download_file";
     $post['file_id'] = $file_id;
     $page = $this->GetPage($link, $Cookies, $post, $link);
     is_notpresent($page, "var count = 30;", "Error 0x01: Plugin is out of date");
     insert_timer(30);
     if (!preg_match("#http://\\w+.\\w+.\\w+/download/[^/]+/[^']+#", $page, $dlink)) {
         html_error("Error 0x10: Plugin is out of date");
     }
     $this->RedirectDownload($dlink[0], "fshare_vn", $Cookies, 0, $link);
     exit;
 }
Beispiel #12
0
 private function DownloadFree($link)
 {
     $post = array();
     $post['op'] = "login";
     $post['redirect'] = $link;
     $post['login'] = "******";
     $post['password'] = "******";
     $page = $this->GetPage("http://muchshare.net/login.html", 0, $post, $link);
     $Cookies = GetCookies($page);
     $page = $this->GetPage($link, $Cookies, 0, $link);
     if (preg_match("#You have to wait \\d+ seconds till next download#", $page, $message)) {
         html_error($message, 0);
     }
     if (!preg_match("#.*>(\\d+)<#", $page, $count)) {
         html_error("Error: Get Count Time Error");
     }
     insert_timer($count[1]);
     $id = cut_str($page, 'name="id" value="', '"');
     $rand = cut_str($page, 'name="rand" value="', '"');
     $textfield = cut_str($page, 'name="textfield" onclick="this.select()" value="', '"');
     unset($post);
     $post["op"] = "download2";
     $post["id"] = $id;
     $post["rand"] = $rand;
     $post["referer"] = $link;
     $post["method_free"] = "";
     $post["method_premium"] = "";
     $post["down_script"] = "1";
     $post["textfield"] = $link;
     $post["textfield"] = $textfield;
     $page = $this->GetPage($link, $Cookies, $post, $link);
     if (!preg_match("#Location: (.*)#", $page, $temp)) {
         html_error("Error: Download link not found");
     }
     $dlink = trim($temp[1]);
     $Url = parse_url($dlink);
     $FileName = basename($Url["path"]);
     $this->RedirectDownload($dlink, $FileName, $Cookies, 0, $link);
     exit;
 }
 private function DownloadLink($link, $cookie = 0)
 {
     global $Referer;
     preg_match('%/get/(.+?)/%', $link, $id);
     $id = $id[1];
     $getlink = "http://www.storage.to/getlink/{$id}/";
     $page = $this->GetPage($getlink, $cookie);
     preg_match('/Object\\((.+?)\\)/', $page, $json);
     if (!$json[1]) {
         html_error("No Json string returned! Seems downloading system has changed. This plugin need to update.", 0);
     }
     $json = str_replace("'", "\"", $json[1]);
     $jsarray = json_decode($json, true);
     if (!$jsarray) {
         html_error("Cannot decode Json string!", 0);
     }
     if ($jsarray['state'] == "failed" && $jsarray['linkid'] == "") {
         html_error("File not found. Kindly check the link", 0);
     } else {
         if ($jsarray['state'] == "failed") {
             html_error("The download failed. Please try again later", 0);
         } else {
             if ($jsarray['state'] == "wait") {
                 html_error("Please wait. Free users may only download a few files per hour.");
             } else {
                 if ($jsarray['state'] == "ok") {
                     $count = $jsarray['countdown'];
                     if ($count > 0) {
                         insert_timer($count, "Waiting link timelock", "", true);
                     }
                 }
             }
         }
     }
     $Href = $jsarray['link'];
     $FileName = basename($Href);
     $this->RedirectDownload($Href, $FileName, $cookie, 0, $Referer);
     exit;
 }
Beispiel #14
0
 public function Download($link)
 {
     $page = $this->GetPage($link);
     is_present($page, "The file you are requesting to download is not available", "The file you are requesting to download is not available");
     $Cookies = GetCookies($page);
     insert_timer(6);
     $phpsessid = explode('=', $Cookies);
     $id = explode('=', $link);
     $post = array();
     $post["PHPSESSID"] = $phpsessid[1];
     $post["turingno"] = "0";
     $post["id"] = $id[1];
     $post["DownloadNow"] = "Download File";
     $page = $this->GetPage($link, $Cookies, $post, $link);
     if (!preg_match("#href='(/file.php.*)'>#", $page, $temp)) {
         html_error("Error: Download Link Not Found");
     }
     preg_match("#addthis_title  = '(.*)'#", $page, $FileName);
     $dlink = "http://www.uploadmb.com" . $temp[1];
     $this->RedirectDownload($dlink, $FileName[1], $Cookies, 0, $link, $FileName[1]);
     exit;
 }
    private function DownloadFree($link)
    {
        global $Referer;
        if ($_GET["password"]) {
        } else {
            $post = array();
        }
        $post["filepassword"] = $_POST['password'];
        $page = $this->GetPage($link, $this->cookie, $post, $Referer);
        if (stristr($page, 'password protected')) {
            ?>
	                <form method="post">
                        <div>The file Megaupload you're trying to download is password protected. Please enter the password to proceed.</div> 
		        <input type="hidden" name="link" value="<?php 
            echo $link;
            ?>
" />
		        <input type="text" name="password" id="password"/><input type="submit" value="Proceed" />
	                </form>
                        <?php 
            exit;
        }
        is_present($page, "The file you are trying to access is temporarily unavailable");
        if (!stristr($page, "id=\"captchaform")) {
            $countDown = trim(cut_str($page, "count=", ";"));
            $countDown = !is_numeric($countDown) ? 26 : $countDown;
            $Href = cut_str($page, 'downloadlink"><a href="', '"');
            $Url = parse_url(html_entity_decode($Href, ENT_QUOTES, 'UTF-8'));
            if (!is_array($Url)) {
                html_error("Download link not found", 0);
            }
            insert_timer($countDown, "The file is being prepared.", "", true);
            $FileName = basename($Url["path"]);
            $this->RedirectDownload($Href, $FileName, $this->cookie);
            exit;
        }
    }
Beispiel #16
0
 private function DownloadFree($link)
 {
     $page = $this->GetPage($link);
     is_present($page, "Fehler 404 - Dieses Datei wurde leider nicht gefunden", "Message: File Not Found");
     $Cookies = "flanguage=en";
     $uid = cut_str($page, 'id="uid" value="', '"');
     $post['uid'] = $uid;
     $post['dl_free3'] = "Normal Download";
     $page = $this->GetPage($link, $Cookies, $post, $link);
     insert_timer(30);
     unset($post);
     $post['submit'] = "Download";
     $post['captcha'] = "ok";
     $post['uid'] = $uid;
     $post['filetype'] = "file";
     $page = $this->GetPage($link, $Cookies, $post, $link);
     if (!preg_match('#(http://\\d+.\\d+.*)" #', $page, $dlink)) {
         html_error("Error 0x01: Plugin is out of date");
     }
     $Url = parse_url(trim($dlink[1]));
     $FileName = basename($Url['path']);
     $this->RedirectDownload(trim($dlink[1]), $FileName, $Cookies);
     exit;
 }
 private function FreeDL()
 {
     $purl = 'http://' . $this->domain . '/';
     if (!empty($_POST['step']) && $_POST['step'] == 1) {
         if (empty($_POST['recaptcha_response_field'])) {
             html_error('You didn\'t enter the image verification code.');
         }
         $this->cookie = StrToCookies(decrypt(urldecode($_POST['cookie'])));
         if (empty($_POST['fid'])) {
             html_error('FileID not found after POST.');
         }
         $query = array('fid' => $_POST['fid'], 'challenge' => $_POST['recaptcha_challenge_field'], 'response' => $_POST['recaptcha_response_field']);
         $page = $this->GetPage($purl . 'get_file.php?' . http_build_query($query), $this->cookie);
         is_present($page, 'load_recaptcha()', 'Error: Wrong CAPTCHA entered.');
         if (!preg_match($this->DLregexp, $page, $dlink)) {
             html_error('Download link Not Found.');
         }
         $this->RedirectDownload($dlink[0], basename(urldecode(parse_url($dlink[0], PHP_URL_PATH))));
     } else {
         $page = $this->GetPage($this->link, $this->cookie, array('gateway_result' => '1'));
         is_present($page, 'This file does not exist', 'The requested file is not found');
         $this->cookie = GetCookiesArr($this->page, $this->cookie);
         if ($this->TryFreeDLTricks) {
             $this->Mesg = lang(300);
         }
         if (stripos($page, 'Connection limit has been exhausted for your IP address!') !== false) {
             if (preg_match('@<span class="html_download_api-limit_interval">[\\s\\t\\r\\n]*(\\d+)[\\s\\t\\r\\n]*</span>@i', $page, $limit)) {
                 $x = 0;
                 if ($this->TryFreeDLTricks && $limit[1] > 45) {
                     while ($x < 3) {
                         $page = $this->GetPage($purl . 'get_file.php?fd=clearlimit', $this->cookie);
                         if (($fd2 = cut_str($page, 'name="fd2" value="', '"')) == false) {
                             break;
                         }
                         insert_timer(30, 'Trying to reduce ip-limit waiting time.');
                         $page = $this->GetPage($purl . 'get_file.php?fd2=' . urlencode($fd2), $this->cookie);
                         $page = $this->GetPage($this->link, $this->cookie, array('gateway_result' => '1'));
                         if (!preg_match('@<span class="html_download_api-limit_interval">[\\s\\t\\r\\n]*(\\d+)[\\s\\t\\r\\n]*</span>@i', $page, $_limit)) {
                             $this->Mesg .= '<br /><br />Skipped the remaining ' . ($limit[1] - 30) . ' secs of ip-limit wait time.';
                             $this->changeMesg($this->Mesg);
                             $limit[1] = 0;
                             break;
                         }
                         $diff = $limit[1] - 30 - $_limit[1];
                         $limit[1] = $_limit[1];
                         $this->Mesg .= "<br /><br />Skipped {$diff} secs of ip-limit wait time.";
                         $this->changeMesg($this->Mesg);
                         if ($diff < 1) {
                             break;
                         }
                         // Error?
                         $x++;
                     }
                 }
                 if ($limit[1] > 0) {
                     return $this->JSCountdown($limit[1], $this->DefaultParamArr($this->link), 'Connection limit has been exhausted for your IP address');
                 }
             } else {
                 html_error('Connection limit has been exhausted for your IP address. Please try again later.');
             }
         }
         if (!preg_match('@var[\\s\\t]+fid[\\s\\t]*=[\\s\\t]*\'(\\w+)\'@i', $page, $fid)) {
             html_error('FileID not found.');
         }
         if (!preg_match('@Recaptcha\\.create[\\s\\t]*\\([\\s\\t]*[\'\\"]([\\w\\-]+)[\'\\"]@i', $page, $cpid)) {
             html_error('reCAPTCHA Not Found.');
         }
         if (!preg_match('@setTimeout\\(\'load_form\\(fid, msg\\)\',[\\s\\t]*(\\d+)([\\s\\t]*\\*[\\s\\t]*1000)?[\\s\\t]*\\);@i', $page, $cd)) {
             html_error('Countdown not found.');
         }
         $cd = empty($cd[2]) ? $cd[1] / 1000 : $cd[1];
         if ($cd > 0) {
             $this->CountDown($cd);
         }
         if ($this->TryFreeDLTricks) {
             $page = $this->GetPage($purl . 'get_file.php?fd2=' . urlencode($fid[1]), $this->cookie);
             if (preg_match($this->DLregexp, $page, $dlink)) {
                 return $this->RedirectDownload($dlink[0], basename(urldecode(parse_url($dlink[0], PHP_URL_PATH))));
             }
             $this->Mesg .= '<br /><br /><b>Cannot skip captcha.</b>';
             $this->changeMesg($this->Mesg);
         }
         $page = $this->GetPage($purl . 'get_file.php?fid=' . urlencode($fid[1]), $this->cookie);
         is_notpresent($page, 'load_recaptcha()', 'Error: Countdown skipped?.');
         $data = $this->DefaultParamArr($this->link, encrypt(CookiesToStr($this->cookie)));
         $data['step'] = '1';
         $data['fid'] = urlencode($fid[1]);
         $this->Show_reCaptcha($cpid[1], $data);
     }
 }
 } else {
     $page = geturl("turbobit.net", 80, "/", 0, 0, 0, 0, $_GET["proxy"], $pauth);
     preg_match_all('/Set-Cookie: (.*);/U', $page, $temp);
     $cookie = $temp[1][2] . "; " . $temp[1][1];
     $lang = parse_url("http://turbobit.net/en");
     $page = geturl($lang["host"], $lang["port"] ? $lang["port"] : 80, $lang["path"] . ($lang["query"] ? "?" . $lang["query"] : ""), 0, $cookie, 0, 0, $_GET["proxy"], $pauth);
     $temp = str_replace("/", "/download/free/", $Url["path"]);
     $tmp = explode(".", $temp);
     $Url["path"] = $tmp[0];
     $link = "http://" . $Url["host"] . $Url["path"];
     $referer = "http://" . $Url["host"] . $temp;
     $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"] . ($Url["query"] ? "?" . $Url["query"] : ""), $Referer, $cookie, 0, 0, $_GET["proxy"], $pauth);
     is_page($page);
     if (strpos($page, "The limit of connection was succeeded for your IP")) {
         $wtime = cut_str($page, 'limit: ', ',');
         insert_timer($wtime, "<b>The limit of connection was succeeded for your IP Wait:</b>");
     }
     $img_link = cut_str($page, 'Captcha" src="', '"');
     if ($img_link) {
         // $capimg = $PHP_SELF."?image=".urlencode($img_link)."&referer=".urlencode($referer)."&cookie=".urlencode($cookie);
         $Url = parse_url($img_link);
         $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"] . ($Url["query"] ? "?" . $Url["query"] : ""), $referer, $cookie, 0, 0, $_GET["proxy"], $pauth);
         $headerend = strpos($page, "PNG");
         $imgfile = substr($page, $headerend - 1);
         $capimg = $options['download_dir'] . "turbobit_captcha.png";
         if (file_exists($capimg)) {
             unlink($capimg);
         }
         write_file($capimg, $imgfile);
         $capimg .= "?id=" . rand(10000, 100000);
     } else {
$cookie = GetCookies($page);
$post = array();
$post["referer2"] = "";
$post["download"] = 1;
$post["imageField.x"] = rand(1, 140);
$post["imageField.y"] = rand(1, 20);
$page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"] . ($Url["query"] ? "?" . $Url["query"] : ""), $Referer, 0, $post, 0, $_GET["proxy"], $pauth);
is_page($page);
$enclink = cut_str($page, "link_enc=new Array('", "')");
$linkdown = preg_replace('/[,\']/i', '', $enclink);
if ($linkdown) {
    $Url = parse_url($linkdown);
} else {
    html_error("Link not found", 0);
}
insert_timer("60");
/*
		$page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), $Referer, 0, $post, 0, $_GET["proxy"],$pauth);
		is_page($page);

		if (preg_match('/Array\((.+)\);link/', $page, $jsaray)) {
			$linkenc = $jsaray[1];
			$zsharelink = preg_replace('/\'[, ]?[ ,]?/six', '', $linkenc);
			$Url = parse_url($zsharelink);
		}elseif(preg_match('/<param name="URL" value="(.+)?">/', $page, $audio)){
			$zsharelink =$audio[1]
			$Url = parse_url($zsharelink);
		}
*/
$FileName = basename($Url["path"]);
insert_location("{$PHP_SELF}?filename=" . urlencode($FileName) . "&host=" . $Url["host"] . "&path=" . urlencode($Url["path"] . ($Url["query"] ? "?" . $Url["query"] : "")) . "&referer=" . urlencode($Referer) . "&cookie=" . urlencode($cookie) . "&email=" . ($_GET["domail"] ? $_GET["email"] : "") . "&partSize=" . ($_GET["split"] ? $_GET["partSize"] : "") . "&method=" . $_GET["method"] . "&proxy=" . ($_GET["useproxy"] ? $_GET["proxy"] : "") . "&saveto=" . $_GET["path"] . "&link=" . urlencode($LINK) . ($_GET["add_comment"] == "on" ? "&comment=" . urlencode($_GET["comment"]) : "") . ($pauth ? "&pauth={$pauth}" : "") . (isset($_GET["audl"]) ? "&audl=doum" : ""));
     $post = unserialize(urldecode($_POST["post"]));
     $post['uid2'] = $post['uid'];
     $post['cap'] = $_POST["captcha"];
     $cookie = urldecode($_POST['cookie']);
     $Url = parse_url($UrlAct);
     $Referer = "http://letitbit.net/download4.php";
     $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"] . ($Url["query"] ? "?" . $Url["query"] : ""), $Referer, $cookie, $post, 0, $_GET["proxy"], $pauth);
     is_page($page);
     if (preg_match('/http:\\/\\/\\w{2}\\.[^"\']+/', $page, $nextPageArray)) {
         $nextPage = $nextPageArray[0];
         $Url = parse_url($nextPage);
         $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"] . ($Url["query"] ? "?" . $Url["query"] : ""), $UrlAct, $cookie, 0, 0, $_GET["proxy"], $pauth);
         $wait = cut_str($page, 'y = ', ';');
         $act2 = cut_str($page, 'window.location.href="', '"');
         $Url = parse_url($act2);
         insert_timer($wait);
         $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"] . ($Url["query"] ? "?" . $Url["query"] : ""), $act, $cookie, 0, 0, $_GET["proxy"], $pauth);
     } else {
         html_error("Could not find frame.", 0);
     }
     $snap = cut_str($page, 'id="links', '</div>');
     $dwn = cut_str($snap, 'href="', '"');
     $Url = parse_url($dwn);
     $FileName = basename($Url["path"]);
     insert_location("index.php?filename=" . urlencode($FileName) . "&force_name=" . urlencode($FileName) . "&host=" . $Url["host"] . "&port=" . $Url["port"] . "&path=" . urlencode($Url["path"] . ($Url["query"] ? "?" . $Url["query"] : "")) . "&referer=" . urlencode($Referer) . "&cookie=" . urlencode($cookie) . "&email=" . ($_GET["domail"] ? $_GET["email"] : "") . "&partSize=" . ($_GET["split"] ? $_GET["partSize"] : "") . "&method=" . $_GET["method"] . "&proxy=" . ($_GET["useproxy"] ? $_GET["proxy"] : "") . "&saveto=" . $_GET["path"] . "&link=" . urlencode($LINK) . ($_GET["add_comment"] == "on" ? "&comment=" . urlencode($_GET["comment"]) : "") . ($pauth ? "&pauth={$pauth}" : "") . (isset($_GET["audl"]) ? "&audl=doum" : ""));
 } else {
     $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"] . ($Url["query"] ? "?" . $Url["query"] : ""), 0, 0, 0, 0, $_GET["proxy"], $pauth);
     is_page($page);
     $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"] . ($Url["query"] ? "?" . $Url["query"] : ""), $LINK, 0, 0, 0, $_GET["proxy"], $pauth);
     is_page($page);
     is_present($page, "The requested file was not found");
<?php

if (!defined('RAPIDLEECH')) {
    require_once "index.html";
    exit;
}
$page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"] . ($Url["query"] ? "?" . $Url["query"] : ""), $Referer, 0, 0, 0, $_GET["proxy"], $pauth);
is_page($page);
$cookie = GetCookies($page);
$wait = cut_str($page, 'var waitTime=', ';');
$dwn = cut_str($page, "var dlLink=unescape('", "'");
insert_timer(10);
$Url = parse_url(urldecode($dwn));
$page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"] . ($Url["query"] ? "?" . $Url["query"] : ""), $Referer, $cookie, 0, 0, $_GET["proxy"], $pauth);
is_page($page);
$locat = cut_str($page, "Location: ", "\r");
$FileName = basename($locat);
$Url = parse_url($locat);
$loc = "{$PHP_SELF}?filename=" . urlencode($FileName) . "&force_name=" . urlencode($FileName) . "&host=" . $Url["host"] . "&port=" . $Url["port"] . "&path=" . urlencode($Url["path"] . ($Url["query"] ? "?" . $Url["query"] : "")) . "&referer=" . urlencode($Referer) . "&email=" . ($_GET["domail"] ? $_GET["email"] : "") . "&partSize=" . ($_GET["split"] ? $_GET["partSize"] : "") . "&method=" . $_GET["method"] . "&proxy=" . ($_GET["useproxy"] ? $_GET["proxy"] : "") . "&saveto=" . $_GET["path"] . "&link=" . urlencode($LINK) . ($_GET["add_comment"] == "on" ? "&comment=" . urlencode($_GET["comment"]) : "") . $auth . ($pauth ? "&pauth={$pauth}" : "") . "&cookie=" . urlencode($cookie);
insert_location($loc);
/*************************\
 WRITTEN BY KAOX 06-oct-09
\*************************/
    $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"] . ($Url["query"] ? "?" . $Url["query"] : ""), $Referer, $cookie, $post, 0, $_GET["proxy"], $pauth);
    preg_match('/<code>.+<a *href="(.+?)">/', $page, $flink);
    $Href = $flink[1];
    $Url = parse_url($Href);
    $FileName = basename($Url["path"]);
    insert_location("{$PHP_SELF}?filename=" . urlencode($FileName) . "&host=" . $Url["host"] . "&path=" . urlencode($Url["path"]) . "&referer=" . urlencode($Referer) . "&email=" . ($_GET["domail"] ? $_GET["email"] : "") . "&partSize=" . ($_GET["split"] ? $_GET["partSize"] : "") . "&method=" . $_GET["method"] . "&proxy=" . ($_GET["useproxy"] ? $_GET["proxy"] : "") . "&saveto=" . $_GET["path"] . "&link=" . urlencode($LINK) . ($_GET["add_comment"] == "on" ? "&comment=" . urlencode($_GET["comment"]) : "") . "&auth=" . $auth . ($pauth ? "&pauth={$pauth}" : "") . (isset($_GET["audl"]) ? "&audl=doum" : ""));
} else {
    $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"] . ($Url["query"] ? "?" . $Url["query"] : ""), $Referer, 0, $post, 0, $_GET["proxy"], $pauth);
    is_page($page);
    is_present($page, "This file has been password protected by the uploader.", "This file is password protected");
    if (preg_match('/Set-Cookie: *(PHP.+?);/', $page, $cook)) {
        $cookie = $cook[1];
    } else {
        html_error("Cookie not found.", 0);
    }
    insert_timer(30, "Waiting link timelock");
    preg_match('/name="waited".+value="(.+?)">/', $page, $wait);
    preg_match('/name="pass_test".+value="(.+?)">/', $page, $test);
    preg_match('/name="pass1".+value="(.+?)">/', $page, $pass);
    preg_match('/name="hncaptcha".+value="(.+?)">/', $page, $hn);
    preg_match('/name="public_key".+value="(.+?)">/', $page, $public);
    preg_match('/<img *class="captchapict" *src="(.+?)"/', $page, $imagecode);
    $mlink = "http://" . $Url["host"] . $Url["path"];
    print "<form method=\"post\" action=\"" . $PHP_SELF . (isset($_GET["audl"]) ? "?audl=doum" : "") . "\" enctype=\"multipart/form-data\">{$nn}";
    print "Enter <img src=\"{$imagecode['1']}\"> here{$nn}";
    print "<input name=\"private_key\" type=\"text\">{$nn}";
    print "<input name=\"waited\" value=\"{$wait['1']}\" type=\"hidden\">{$nn}";
    print "<input name=\"pass_test\" value=\"{$test['1']}\" type=\"hidden\">{$nn}";
    print "<input name=\"pass1\" value=\"{$pass['1']}\" type=\"hidden\">{$nn}";
    print "<input name=\"hncaptcha\" value=\"{$hn['1']}\" type=\"hidden\">{$nn}";
    print "<input name=\"public_key\" value=\"{$public['1']}\" type=\"hidden\">{$nn}";
 public function CountDown($countDown)
 {
     if ($countDown <= 0) {
         return;
     }
     insert_timer($countDown, "Waiting link timelock");
 }
     $cookie = implode(';', $cook[1]);
 } else {
     html_error("Cookie not found.", 0);
 }
 if (preg_match('/href="(index\\.php\\?.+captcha.+?)"/', $page, $freedl)) {
     $flink = str_replace("amp;", "", $freedl[1]);
     $free_link = "http://netload.in/" . $flink;
 } else {
     html_error("Error[getFreeLink]", 0);
 }
 $Url = parse_url($free_link);
 $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"] . ($Url["query"] ? "?" . $Url["query"] : ""), $free_link, $cookie, 0, 0, $_GET["proxy"], $pauth);
 is_page($page);
 if (preg_match('/countdown\\(([0-9]+),\'change\\(\\)\'\\)/', $page, $count)) {
     $countnum = $count[1] / 100;
     insert_timer($countnum, "<b>Timer 1:</b>");
 } else {
     html_error("Error[getCountNum]", 0);
 }
 preg_match('/file_id.+value="(.+?)"/', $page, $fileid);
 $file_id = $fileid[1];
 preg_match('/action="(index\\.php\\?id.+?)"/', $page, $linkid);
 $link = "http://netload.in/" . $linkid[1];
 if (preg_match('%(share/includes/captcha\\.php\\?.+?)"%', $page, $img)) {
     $img_link = "http://netload.in/" . $img[1];
     $capimg = $PHP_SELF . "?image=" . urlencode($img_link) . "&referer=" . urlencode($free_link) . "&cookie=" . urlencode($cookie);
     /*
     $Url = parse_url($img_link);
     $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), $free_link, $cookie, 0, 0, $_GET["proxy"],$pauth);
     
     $headerend = strpos($page,"\r\n\r\n");
Beispiel #25
0
 public function CountDown($countDown)
 {
     if ($countDown <= 0) {
         return;
     }
     insert_timer($countDown, 'Waiting link timelock', '', true);
 }
 public function CountDown($countDown)
 {
     insert_timer($countDown, "Waiting link timelock");
 }
<?php

if (!defined('RAPIDLEECH')) {
    require_once "index.html";
    exit;
}
$page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"] . ($Url["query"] ? "?" . $Url["query"] : ""), 0, 0, 0, 0, $_GET["proxy"], $pauth);
is_page($page);
//is_present($page, "Location: /errortracking.php?msg=File not found", "File not found");
$cookie = "";
preg_match_all("/Set-Cookie: ([^;]+;)/", $page, $cook);
$arraySize = count($cook);
for ($i = 0; $i < $arraySize; $i++) {
    $cookie = $cookie . array_shift($cook[1]);
}
$timeLock = trim(cut_str($page, "var wait = ", ";"));
$downloadLink = trim(cut_str($page, "form name=\"download\" method=\"post\" action=\"", "\""));
$downloadId = trim(cut_str($page, "input type=\"hidden\" name=\"download\" value=\"", "\""));
$submitValue = trim(cut_str($page, "input type=\"submit\" name=\"Submit\" value=\"", "\""));
$countDown = $timeLock;
insert_timer($countDown, "Waiting link timelock");
$post = array();
$post["download"] = $downloadId;
$post["Submit"] = $submitValue;
$Url = parse_url($downloadLink);
$FileName = "fileName";
insert_location("{$PHP_SELF}?filename=" . urlencode($FileName) . "&host=" . $Url["host"] . "&path=" . urlencode($Url["path"] . ($Url["query"] ? "?" . $Url["query"] : "")) . "&referer=" . urlencode($LINK) . "&cookie=" . urlencode($cookie) . "&post=" . urlencode(serialize($post)) . "&email=" . ($_GET["domail"] ? $_GET["email"] : "") . "&partSize=" . ($_GET["split"] ? $_GET["partSize"] : "") . "&method=" . $_GET["method"] . "&proxy=" . ($_GET["useproxy"] ? $_GET["proxy"] : "") . "&saveto=" . $_GET["path"] . "&link=" . urlencode($LINK) . ($_GET["add_comment"] == "on" ? "&comment=" . urlencode($_GET["comment"]) : "") . ($pauth ? "&pauth={$pauth}" : "") . (isset($_GET["audl"]) ? "&audl=doum" : ""));
// Created by rajmalhotra 06 Dec 2009
<?php

if (!defined('RAPIDLEECH')) {
    require_once "index.html";
    exit;
}
$post = array();
$post["free"] = "";
$post["x"] = rand(10, 150);
$post["y"] = rand(10, 150);
$page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"], $Referer, 0, $post, 0, $_GET["proxy"], $pauth);
is_page($page);
is_present($page, "File not found");
preg_match('/http:\\/\\/.+get[^"\']+/i', $page, $loca);
$Url = parse_url($loca[0]);
insert_timer(60, "Wait your turn");
$FileName = !$FileName ? basename($Url["path"]) : $FileName;
insert_location("{$PHP_SELF}?filename=" . urlencode($FileName) . "&host=" . $Url["host"] . "&path=" . urlencode($Url["path"] . ($Url["query"] ? "?" . $Url["query"] : "")) . "&referer=" . urlencode($Referer) . "&email=" . ($_GET["domail"] ? $_GET["email"] : "") . "&partSize=" . ($_GET["split"] ? $_GET["partSize"] : "") . "&method=" . $_GET["method"] . "&proxy=" . ($_GET["useproxy"] ? $_GET["proxy"] : "") . "&saveto=" . $_GET["path"] . "&link=" . urlencode($LINK) . ($_GET["add_comment"] == "on" ? "&comment=" . urlencode($_GET["comment"]) : "") . "&auth=" . $auth . ($pauth ? "&pauth={$pauth}" : "") . (isset($_GET["audl"]) ? "&audl=doum" : ""));
// written by kaox 24/05/09
is_page($page);
is_present($page, "deleted or not found", "Sorry, the file you requested is either deleted or not found in our database.", 0);
$cookie = GetCookies($page);
$nL = cut_str($page, 'nL" value="', '"');
$cL = cut_str($page, 'cL" value="', '"');
$post = array();
$post["nL"] = $nL;
$post["cL"] = $cL;
$post["selection"] = "Free";
$post['x'] = rand(1, 140);
$post['y'] = rand(1, 20);
$page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"], $Referer, $cookie, $post, 0, $_GET["proxy"], $pauth);
is_page($page);
is_present($page, "increase your limit", "Your Current Download Limit Per 1 hour is over. Please Upgrade your account to increase your limit. Thank You", 0);
unset($post);
insert_timer(15, "<b>Timer :</b>");
$nL = cut_str($page, 'nL" value="', '"');
if (!$nL) {
    preg_match('/Location:.+?\\r/i', $page, $loca);
    $redir = rtrim($loca[0]);
    preg_match('/http:.+/i', $redir, $loca);
    if (!$loca[0]) {
        html_error("download data is not found");
    } else {
        $Url = parse_url($loca[0]);
        $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"], $Referer, $cookie, 0, 0, $_GET["proxy"], $pauth);
        is_page($page);
        preg_match('/We had a request[^<]+/i', $page, $errmsg);
        if ($errmsg[0]) {
            html_error($errmsg[0]);
        } else {
    } elseif (preg_match('%^/files/%', $Url["path"]) != 0) {
        $Url["path"] = preg_replace('%^/files/%', '/en/files/', $Url["path"]);
    }
    $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"] . ($Url["query"] ? "?" . $Url["query"] : ""), 0, 0, 0, 0, $_GET["proxy"], $pauth);
    //file_put_contents("depositfiles_1.txt", $page);
    is_page($page);
    is_present($page, "Such file does not exist or it has been removed for infringement of copyrights.");
    is_present($page, "Your IP is already downloading a file from our system.");
    if (stristr($page, 'You used up your limit for file downloading!')) {
        preg_match('/([0-9]+) minute\\(s\\)/', $page, $minutes);
        html_error("Download limit exceeded. Try again in " . trim($minutes[1]) . " minute(s)", 0);
    }
    if (preg_match('/<input type="submit" class="button" value="FREE downloading"/', $page)) {
        $post = array();
        $post["gateway_result"] = 1;
        $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"] . ($Url["query"] ? "?" . $Url["query"] : ""), $LINK, 0, $post, 0, $_GET["proxy"], $pauth);
        //file_put_contents("depositfiles_2.txt", $page);
        is_page($page);
    }
    preg_match('/<span id="download_waiter_remain">(.*)<\\/span>/', $page, $countDown);
    $countDown = (int) $countDown[1];
    insert_timer($countDown, "The file is being prepared.", "", true);
    if (preg_match('/<form action="(.*)" method="get" onSubmit="download_started()/U', $page, $dlink)) {
        $Url = parse_url(trim($dlink[1]));
        $FileName = basename($Url["path"]);
    } else {
        html_error("Error getting download link", 0);
    }
    insert_location("{$PHP_SELF}?filename=" . urlencode($FileName) . "&host=" . $Url["host"] . "&path=" . urlencode($Url["path"] . ($Url["query"] ? "?" . $Url["query"] : "")) . "&referer=" . urlencode($LINK) . "&email=" . ($_GET["domail"] ? $_GET["email"] : "") . "&partSize=" . ($_GET["split"] ? $_GET["partSize"] : "") . "&method=" . $_GET["method"] . "&proxy=" . ($_GET["useproxy"] ? $_GET["proxy"] : "") . "&saveto=" . $_GET["path"] . "&link=" . urlencode($LINK) . ($_GET["add_comment"] == "on" ? "&comment=" . urlencode($_GET["comment"]) : "") . ($pauth ? "&pauth={$pauth}" : "") . (isset($_GET["audl"]) ? "&audl=doum" : ""));
}
// FIXED by kaox 29/09/2009