Beispiel #1
0
 public function Download($link)
 {
     global $premium_acc;
     $link = str_replace(array('ul.to/folder/', 'ul.to/', 'uploaded.to/'), array('uploaded.net/folder/', 'uploaded.net/file/', 'uploaded.net/'), $link);
     $this->link = $link;
     if (!$_REQUEST['step']) {
         $this->page = $this->GetPage($this->link);
         if (preg_match_all('/href="([^\\r\\n"]+)" class="file"/', $this->page, $match, PREG_SET_ORDER)) {
             $arr_link = array();
             foreach ($match as $tmp) {
                 $arr_link[] = "http://uploaded.net/{$tmp['1']}";
             }
             $this->moveToAutoDownloader($arr_link);
         }
         is_present($this->page, 'doesn\'t contain files', 'The folder link doesn\'t contain any files!');
         is_present($this->page, '/404', 'File not found or set to private only');
         is_present($this->page, 'This file was protected by a password against unauthorised downloads');
         $this->cookie = GetCookiesArr($this->page);
     }
     if ($_REQUEST["ul_acc"] == "on" && (!empty($_GET["ul_cookie"]) || !empty($_GET["ul_hash"])) || $_REQUEST["cookieuse"] == "on" && preg_match("/login[\\s\t]?=[\\s\t]?([\\w\\%]+);?/i", $_REQUEST["cookie"], $c) || $_REQUEST["premium_acc"] == "on" && $premium_acc["uploaded_net"]["cookie"]) {
         if ($_REQUEST['ul_acc'] == 'on' && (!empty($_GET["ul_cookie"]) || !empty($_GET["ul_hash"]))) {
             $loginc = empty($_GET["ul_cookie"]) ? strrev(dcd(!empty($_GET["ul_hash"]))) : !empty($_GET["ul_cookie"]);
         } else {
             $loginc = empty($c[1]) ? urldecode($premium_acc["uploaded_net"]["cookie"]) : urldecode($c[1]);
         }
         return $this->login($loginc);
     } elseif ($_REQUEST['premium_acc'] == 'on' && ($_REQUEST['premium_user'] && $_REQUEST['premium_pass'] || $premium_acc['uploaded_net']['user'] && $premium_acc['uploaded_net']['pass'])) {
         return $this->login();
     } else {
         return $this->Free();
     }
 }
 public function Download($link)
 {
     global $premium_acc, $Referer;
     $this->cookie = '';
     $this->apiurl = array('scheme' => 'http');
     // Add 's' for https :D
     $this->apiurl['host'] = 'api.rapidshare.com';
     $this->apiurl['path'] = '/cgi-bin/rsapi.cgi';
     $url = parse_url($link);
     if (!preg_match('@^/files/(\\d+)/([^\\r\\n\\t\\s\\?\\&<>/]+)@i', $url['path'], $m) && !empty($url['fragment']) && !preg_match('@!download\\|(?:[^\\|]+)\\|(\\d+)\\|([^\\|]+)@i', $url['fragment'], $m)) {
         html_error('Cannot get fileid or filename. Check your link.');
     }
     $Referer = "https://rapidshare.com/files/{$m[1]}/{$m[2]}";
     $this->fileid = $m[1];
     $this->filename = str_replace(array('?', '&'), '', basename(rawurldecode($m[2])));
     if ($_REQUEST['cookieuse'] == 'on' && preg_match('@enc\\s?=\\s?(\\w+)@i', $_REQUEST['cookie'], $c) || $_REQUEST['premium_acc'] == 'on' && !empty($premium_acc['rapidshare_com']['cookie']) || $_REQUEST["rs_acc"] == "on" && (!empty($_GET["rs_cookie"]) || !empty($_GET["rs_hash"]))) {
         if (!empty($_GET["rs_cookie"])) {
             $this->cookie = $_GET["rs_cookie"];
         } elseif (!empty($_GET["rs_hash"])) {
             $this->cookie = strrev(dcd($_GET["rs_hash"]));
         } else {
             $this->cookie = empty($c[1]) ? $premium_acc['rapidshare_com']['cookie'] : $c[1];
         }
         $this->CheckLogin();
     } elseif (!empty($_POST["sssid"]) || $_REQUEST['premium_acc'] == 'on' && ($_GET["maudl"] == 'multi' && !empty($_GET["auth_hash"]) || ($pA = !empty($_REQUEST['premium_user']) && !empty($_REQUEST['premium_pass'])) || !empty($premium_acc['rapidshare_com']['user']) && !empty($premium_acc['rapidshare_com']['pass']))) {
         if ($_GET["maudl"] == 'multi' && !empty($_GET["auth_hash"]) || !empty($_POST["sssid"])) {
             $ahash = $_GET["maudl"] == 'multi' && !empty($_GET["auth_hash"]) ? $_GET["auth_hash"] : $_POST["sssid"];
             $ahash = explode(":", base64_decode(utf8_strrev(dcd($ahash))));
             if (count($ahash) == 2 && (!empty($ahash[0]) && !empty($ahash[1]))) {
                 $_REQUEST["premium_user"] = $ahash[0];
                 $_REQUEST["premium_pass"] = $ahash[1];
             }
             unset($ahash);
         }
         $user = $pA ? $_REQUEST['premium_user'] : $premium_acc['rapidshare_com']['user'];
         $pass = $pA ? $_REQUEST['premium_pass'] : $premium_acc['rapidshare_com']['pass'];
         $this->CheckLogin(rawurlencode($user), rawurlencode($pass));
     } else {
         $this->StartDL();
     }
 }
Beispiel #3
0
 public function Download($link)
 {
     global $premium_acc;
     if (!$_GET["step"]) {
         // Check link
         if (preg_match("/hotfile\\.com\\/dl\\/(\\d+\\/\\w+)\\/(.+)?/i", $link, $l)) {
             $link = "http://hotfile.com/dl/{$l[1]}/{$l[2]}";
         } else {
             html_error("Error: Malformed link?. Please check the download link.");
         }
         $page = $this->GetPage($link);
         is_present($page, "<td>This file is either removed due", "Error: This file is either removed due to copyright claim or is deleted by the uploader.");
         is_present($page, "<td>File is removed", "Error: File is removed due to copyright claim.");
         if (stristr($page, "\r\nContent-Length: 0\r\n")) {
             is_notpresent($page, "\r\nLocation:", "Error: Invalid link. Please check the download link.");
             // Check if file has enabled Hot/Direct linking.
             if (!preg_match("/(s\\d+)\\.hotfile\\.com\\/get\\/(\\w+\\/\\w+\\/\\w+\\/\\w+\\/\\w+)\\/([^\r|\n]+)/i", $page, $l)) {
                 html_error("Error: Invalid link?. Please check the download link.");
             }
             $dllink = "http://{$l[1]}.hotfile.com/get/{$l[2]}/{$l[3]}";
             $filename = parse_url($dllink);
             $filename = urldecode(basename($filename["path"]));
             return $this->RedirectDownload($dllink, $filename, GetCookies($page));
         }
         unset($page);
     }
     if ($_REQUEST["hf_acc"] == "on" && (!empty($_GET["hf_cookie"]) || !empty($_GET["hf_hash"])) || $_REQUEST["cookieuse"] == "on" && preg_match("/auth\\s?=\\s?(\\w{64})/i", $_REQUEST["cookie"], $c) || $_REQUEST["premium_acc"] == "on" && $premium_acc["hotfile_com"]["cookie"]) {
         if (!empty($_GET["hf_cookie"])) {
             $cookie = $_GET["hf_cookie"];
         } elseif (!empty($_GET["hf_hash"])) {
             $cookie = strrev(dcd($_GET["hf_hash"]));
         } else {
             $cookie = empty($c[1]) ? $premium_acc["hotfile_com"]["cookie"] : $c[1];
         }
         $this->DownloadPremium($link, $cookie);
     } elseif ($_REQUEST["premium_acc"] == "on" && $_REQUEST["premium_user"] && $_REQUEST["premium_pass"] || $_REQUEST["premium_acc"] == "on" && $premium_acc["hotfile_com"]["user"] && $premium_acc["hotfile_com"]["pass"]) {
         $this->DownloadPremium($link);
     } else {
         $this->DownloadFree($link);
     }
 }
 private function Login($captcha = false)
 {
     global $premium_acc;
     if ($_REQUEST["upl_acc"] == "on" && (!empty($_GET["upl_cookie"]) || !empty($_GET["upl_hash"]))) {
         $usecookie = empty($_GET["upl_cookie"]) ? strrev(dcd(!empty($_GET["upl_hash"]))) : $_GET['upl_cookie'];
     } elseif (isset($_REQUEST["cookieuse"]) && $_REQUEST["cookieuse"] == "on" && preg_match("/remembered_user\\s*=\\s*([\\w|\\%]+)\\s*;?/i", $_REQUEST["cookie"], $c) || $_REQUEST["premium_acc"] == "on" && !empty($premium_acc["uploading_com"]["cookie"])) {
         $usecookie = empty($c[1]) ? !empty($premium_acc["uploading_com"]["cookie"]) : $c[1];
     } else {
         $usecookie = false;
     }
     $posturl = 'http://uploading.com/';
     if (!$usecookie) {
         $pA = !empty($_REQUEST["premium_user"]) && !empty($_REQUEST["premium_pass"]) ? true : false;
         $email = $pA ? trim($_REQUEST["premium_user"]) : $premium_acc["uploading_com"]["user"];
         $password = $pA ? trim($_REQUEST["premium_pass"]) : $premium_acc["uploading_com"]["pass"];
         $post = array();
         if ($captcha == true) {
             if (empty($_POST['recaptcha_response_field'])) {
                 html_error("You didn't enter the image verification code.");
             }
             $post['recaptcha_challenge_field'] = $_POST['recaptcha_challenge_field'];
             $post['recaptcha_response_field'] = $_POST['recaptcha_response_field'];
             $this->cookie = StrToCookies(decrypt(urldecode($_POST['cookie'])));
             if (!empty($_POST['cuser']) && !empty($_POST['cpass'])) {
                 $email = decrypt(urldecode($_POST['cuser']));
                 $password = decrypt(urldecode($_POST['cpass']));
             }
         }
         // This check is important incase there's conflict in post account data, do look in the bracket at error message...
         if (empty($email) || empty($password)) {
             html_error('Login failed, email or password is empty!');
         }
         $post['email'] = urlencode($email);
         $post['password'] = urlencode($password);
         $post['remember'] = 'on';
         $page = $this->GetPage($posturl . 'general/login_form/?ajax', $this->cookie, $post, $posturl . "\r\nX-Requested-With: XMLHttpRequest");
         $json = $this->Get_Reply($page);
         if (!empty($json['error'])) {
             html_error('Login Error: ' . $json['error']);
         }
         if (!empty($json['answer']['captcha'])) {
             if (!preg_match('@\\(\'recaptcha_block\', \'([^\']+)\'\\);@', $this->page, $c)) {
                 html_error('Error: Login captcha data not found.');
             }
             $data = $this->DefaultParamArr($this->link, encrypt(CookiesToStr($this->cookie)));
             $data['step'] = 'captcha';
             if ($pA) {
                 $data['cuser'] = urlencode(encrypt($email));
                 $data['cpass'] = urlencode(encrypt($password));
             }
             $this->Show_reCaptcha($c[1], $data);
             exit;
         }
         if (!empty($json['redirect'])) {
             $this->cookie = GetCookiesArr($page, $this->cookie);
         } else {
             html_error("Error [Login Page Response UNKNOWN!]");
         }
     } else {
         $this->cookie['remembered_user'] = $usecookie;
         $this->cookie['u'] = 1;
         $this->cookie['autologin'] = 1;
     }
     $page = $this->GetPage($posturl, $this->cookie, 0, $posturl);
     is_present($page, 'class="i_premium"', 'Error: Account isn\'t premium?');
     $this->cookie = GetCookiesArr($page, $this->cookie);
     return $this->Premium();
 }
Beispiel #5
0
function mcd($armacc)
{
    $dar = array();
    $n_a = count($armacc);
    for ($i = 0; $i < $n_a; $i++) {
        $buf_ac = array();
        $cl_all = array();
        $buf_ac = explode(chr(hexdec("3A")), dcd($armacc[$i]));
        $cl_all["user"] = $buf_ac[0];
        $cl_all["pass"] = $buf_ac[1];
        $dar[] = $cl_all;
    }
    return $dar;
}
Beispiel #6
0
 private function Login()
 {
     global $premium_acc;
     $usecookie = false;
     if ($_REQUEST['cookieuse'] == 'on') {
         if (preg_match("/cookie_user=([a-zA-Z0-9%]+);?/i", $_REQUEST["cookie"], $c)) {
             $usecookie = $c[1];
         }
     } elseif ($_REQUEST['net_acc'] == 'on') {
         if (!empty($_GET["net_cookie"])) {
             $usecookie = $_GET["net_cookie"];
         } elseif (!empty($_GET["net_hash"])) {
             $usecookie = strrev(dcd($_GET["net_hash"]));
         }
     } elseif (!empty($premium_acc['netload_in']['cookie'])) {
         $usecookie = $premium_acc['netload_in']['cookie'];
     }
     $posturl = 'http://netload.in/';
     if (!$usecookie) {
         $user = $_REQUEST["premium_user"] ? trim($_REQUEST["premium_user"]) : $premium_acc["netload_in"]["user"];
         $pass = $_REQUEST["premium_pass"] ? trim($_REQUEST["premium_pass"]) : $premium_acc["netload_in"]["pass"];
         if (empty($user) || empty($pass)) {
             html_error("Login Failed: User [{$user}] or Password [{$pass}] is empty. Please check login data.");
         }
         $post['txtuser'] = $user;
         $post['txtpass'] = $pass;
         $post['txtcheck'] = 'login';
         $post['txtlogin'] = '******';
         $page = $this->GetPage($posturl . 'index.php', $this->cookie, $post, $posturl);
         is_present($page, '/index.php?id=15', 'Login failed, invalid username or password???');
         $this->cookie = GetCookiesArr($page, $this->cookie);
     } else {
         $this->cookie['cookie_user'] = $usecookie;
     }
     //check the premium account (IMPORTANT!)
     $page = $this->GetPage($posturl . 'index.php?id=2', $this->cookie);
     is_notpresent($page, '<a href="/index.php?id=2">My Account</a>', 'Invalid cookie!');
     is_present($page, 'Order Premium Account now', 'Account Status : FREE!');
     //start download the link
     return $this->Premium();
 }