PageRenderTime 112ms CodeModel.GetById 72ms app.highlight 5ms RepoModel.GetById 34ms app.codeStats 0ms

/hosts/mediafire_com.php

https://github.com/gartz/RapidLeetch
PHP | 52 lines | 44 code | 7 blank | 1 comment | 5 complexity | ad5521d47b7f08d8a99c8acaac2a844c MD5 | raw file
 1<?php
 2if (!defined('RAPIDLEECH'))
 3  {
 4  require_once("index.html");
 5  exit;
 6  }
 7	$page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), $Referer, 0, 0, 0, $_GET["proxy"],$pauth);
 8	is_page($page);
 9	preg_match('/Location:.*error/i', $page) ? html_error("Invalid File", 0) : '';
10	if(preg_match('/Location: (.*)/i', $page, $redir))
11	  {
12		$Href = trim($redir[1]);
13		$Url = parse_url($Href);
14		$page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), $Referer, 0, 0, 0, $_GET["proxy"],$pauth);
15		is_page($page);
16	  }
17	
18	preg_match('/Set-Cookie: (.*)/i', $page, $cook);
19	$cookie = $cook[1];
20	
21	preg_match('/cu\((.*?)\);/', $page, $values);
22	$value = preg_split('/\',?\'?/', $values[1], -1, PREG_SPLIT_NO_EMPTY);
23	$qk = $value[0];
24	$pk = $value[1];
25	$r = $value[2];
26	
27	$Href = "http://www.mediafire.com/dynamic/download.php?qk=$value[0]&pk=$value[1]&r=$value[2]";
28	$Url = parse_url($Href);
29	$page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), $Referer, $cookie, 0, 0, $_GET["proxy"],$pauth);
30
31	preg_match('%arting.*href=.*http://" \+ ?(.*) ?\+\'/\' ?(.*) \'g/\'\ + ?(.*) ?\+ \'/\' \+ ?(.*) ?\+ \'">%', $page, $parts);
32	if (stristr($parts[2],"+")) {
33		$temps = explode("+",$parts[2]);
34		foreach ($temps as $temp) {
35			if (empty($temp)) continue;
36			preg_match('/'.trim($temp).' ?= ?\'(.*?)\';/', $page, $temp2);
37			$mpath1.= $temp2[1];
38		}
39	}
40	preg_match('/'.trim($parts[1]).' ?= ?\'(.*?)\';/', $page, $mhost);
41        $get = $_GET['link'];
42        $put = str_replace('http://www.mediafire.com/download.php?', '', $get);
43	preg_match('/'.trim($parts[4]).' ?= ?\'(.*?)\';/', $page, $mname);
44	
45	$Href = 'http://'.$mhost[1].'/'.$mpath1.'g/'.$put.'/'.$mname[1];
46	$Url = parse_url($Href);
47	$FileName = !$FileName ? basename($Url["path"]) : $FileName;
48	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" : ""));
49	
50// edited by mrbrownee70
51
52?>