RapidLeetch /hosts/download/megaupload_com.php

Language PHP Lines 142
MD5 Hash b9b1db071e79b2f1d40814c196361bc1 Estimated Cost $2,687 (why?)
Repository https://github.com/gartz/RapidLeetch.git View Raw File View Project SPDX
  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
<?php
if (! defined ( 'RAPIDLEECH' )) {
	require_once ("index.html");
	exit ();
}

class megaupload_com extends DownloadClass {
	
	public function Download($link) {
		global $premium_acc, $mu_cookie_user_value;
		//Get link folder
		$matches = "";
		$Url = parse_url(trim($link));
		if (preg_match ( "/f=(\w+)/", $Url ["query"], $matches )) {
			$page = $this->GetPage("http://www.megaupload.com/xml/folderfiles.php?folderid=" . $matches [1]);
			if (! preg_match_all ( "/url=\"(http[^\"]+)\"/", $page, $matches )) html_error ( 'link not found' );
			
			if (! is_file ( "audl.php" )) html_error ( 'audl.php not found' );
			echo "<form action=\"audl.php?GO=GO\" method=post>\n";
			echo "<input type=hidden name=links value='" . implode ( "\r\n", $matches [1] ) . "'>\n";
			foreach ( array ( "useproxy", "proxy", "proxyuser", "proxypass" ) as $v )
				echo "<input type=hidden name=$v value=" . $_GET [$v] . ">\n";
			echo "<script language=\"JavaScript\">void(document.forms[0].submit());</script>\n</form>\n";
			flush ();
			exit ();
		}
		//Redirect
        if ( ($_REQUEST ["premium_acc"] == "on" && $_REQUEST ["premium_user"] && $_REQUEST ["premium_pass"]) ||
			($_REQUEST ["premium_acc"] == "on" && $premium_acc ["megaupload_com"] ["user"] && $premium_acc ["megaupload_com"] ["pass"] ) ||
			($mu_cookie_user_value))        
		{
			$this->DownloadPremium($link);
		} else {
			$this->DownloadFree($link);
		}
	}
	private function DownloadFree($link) {
        global $Referer;
		$post = array();

		//Get password
		$arr = explode("|", $link);
		if (count($arr)>=2) {
			$link = $arr[0];
			$post ["filepassword"] = $arr[1];
		}
		
		$page = $this->GetPage($link, 0, $post, $Referer);
        is_page($page);

		if (stristr($page,'password protected')) {
			html_error("Password is incorrect! Input link with password: Link|Password.");
			exit;
        }
		//$countDown = trim ( cut_str ( $page, "count=",";" ) );
		//insert_timer( $countDown, "<b>Megaupload Free User</b>.","",true );
		$countDown = rand(5, 10);
		sleep($countDown);
		
		is_present ( $page, "The file you are trying to access is temporarily unavailable" );

		preg_match('/http:\/\/(.*)" class="down_butt1"/', $page, $match);
		if (isset($match[1])) {
			$Href = 'http://'.$match[1];
			$Url = parse_url ( html_entity_decode($Href, ENT_QUOTES, 'UTF-8') );
			if (! is_array ( $Url )) {
				html_error ( "Download link not found", 0 );
			}
			$FileName = basename ( $Url ["path"] );
			$this->RedirectDownload($Href,$FileName);
			exit ();
		}
	}
	
	private function DownloadPremium($link) {
		global $Referer, $premium_acc, $mu_cookie_user_value;
		
		$post = array();
		$post ['login'] = 1;
		$post ["username"] = $_GET ["premium_user"] ? $_GET ["premium_user"] : $premium_acc ["megaupload_com"] ["user"];
		$post ["password"] = $_GET ["premium_pass"] ? $_GET ["premium_pass"] : $premium_acc ["megaupload_com"] ["pass"];
		$page = $this->GetPage('http://www.megaupload.com/?c=login',0,$post,'http://www.megaupload.com');
		is_page($page);
		if ($premium_cookie = cut_str($page, 'user=', ';') ) {
			$premium_cookie = 'user=' . $premium_cookie;
		} elseif ($mu_cookie_user_value) {
				$premium_cookie = 'user=' . $mu_cookie_user_value;
		} elseif ($_GET ["mu_acc"] == "on" && $_GET ["mu_cookie"]) {
				$premium_cookie = 'user=' . $_GET ["mu_cookie"];
		} elseif (! stristr ( $premium_cookie, "user" )) {
				html_error ( "Cannot use premium account", 0 );
		}
	
		//Get password
		$post = array();
		$arr = explode("|", $link);
		if (count($arr)>=2) {
			$link = $arr[0];
			$post ["filepassword"] = $arr[1];
		}
		$page = $this->GetPage($link,$premium_cookie,$post,$Referer);
		is_page ( $page );
		if (stristr($page,'password protected')) {
			html_error("Password is incorrect! Input link with password: LINK|PASSWORD.");
			exit;
		}

        if (stristr ( $page, "Location:" )) {
			//Premium with Direct active
			$Href = trim ( cut_str ( $page, "Location: ", "\n" ) );
			$Url = parse_url ( html_entity_decode($Href, ENT_QUOTES, 'UTF-8') );
			$FileName = basename ( $Url ["path"] );                
			$this->RedirectDownload($Href,$FileName,encrypt($premium_cookie));
        } elseif (preg_match('/http:\/\/(.*)" class="down_ad_butt1"/', $page, $match)) {
			//Premium with Direct disable
			$Href = "http://" . $match[1];
			$Referer = $link;
			$Url = parse_url ( html_entity_decode($Href, ENT_QUOTES, 'UTF-8') );
			$FileName = basename ( $Url ["path"] );                
			$this->RedirectDownload($Href,$FileName,encrypt($premium_cookie));
        } elseif (preg_match('/http:\/\/(.*)" class="down_butt1"/', $page, $match)) {
			//Free account - member
			echo "<div>Using free acoount - You're member</div>";
			$Href = "http://" . $match[1];
			$Referer = $link;
			$Url = parse_url ( html_entity_decode($Href, ENT_QUOTES, 'UTF-8') );
			$FileName = basename ( $Url ["path"] );                
			$this->RedirectDownload($Href,$FileName,encrypt($premium_cookie));
		} else {
			html_error ("Download link not found", 0);
        }
	}
}

// Updated by rajmalhotra on 10 Jan 2010 MegaUpload captcha is downloaded on server, then display
// Fixed by rajmalhotra on 20 Jan 2010 Fixed for Download link not found in happy hour
// Fixed by VinhNhaTrang 13.10.2010
// Fixed by VinhNhaTrang 30.11.2010
// Fixed by thangbom40000 on 2010.12.1, Fix for free user and premium download, no wait time, no capcha with free user.
// Fixed by thangbom40000 on 2010.12.4, Fix input link with password: LINK|PASSWORD
 ?>
Back to Top