PageRenderTime 44ms CodeModel.GetById 17ms RepoModel.GetById 1ms 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
  2. if (!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. preg_match('/Set-Cookie: (.*)/i', $page, $cook);
  18. $cookie = $cook[1];
  19. preg_match('/cu\((.*?)\);/', $page, $values);
  20. $value = preg_split('/\',?\'?/', $values[1], -1, PREG_SPLIT_NO_EMPTY);
  21. $qk = $value[0];
  22. $pk = $value[1];
  23. $r = $value[2];
  24. $Href = "http://www.mediafire.com/dynamic/download.php?qk=$value[0]&pk=$value[1]&r=$value[2]";
  25. $Url = parse_url($Href);
  26. $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), $Referer, $cookie, 0, 0, $_GET["proxy"],$pauth);
  27. preg_match('%arting.*href=.*http://" \+ ?(.*) ?\+\'/\' ?(.*) \'g/\'\ + ?(.*) ?\+ \'/\' \+ ?(.*) ?\+ \'">%', $page, $parts);
  28. if (stristr($parts[2],"+")) {
  29. $temps = explode("+",$parts[2]);
  30. foreach ($temps as $temp) {
  31. if (empty($temp)) continue;
  32. preg_match('/'.trim($temp).' ?= ?\'(.*?)\';/', $page, $temp2);
  33. $mpath1.= $temp2[1];
  34. }
  35. }
  36. preg_match('/'.trim($parts[1]).' ?= ?\'(.*?)\';/', $page, $mhost);
  37. $get = $_GET['link'];
  38. $put = str_replace('http://www.mediafire.com/download.php?', '', $get);
  39. preg_match('/'.trim($parts[4]).' ?= ?\'(.*?)\';/', $page, $mname);
  40. $Href = 'http://'.$mhost[1].'/'.$mpath1.'g/'.$put.'/'.$mname[1];
  41. $Url = parse_url($Href);
  42. $FileName = !$FileName ? basename($Url["path"]) : $FileName;
  43. 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" : ""));
  44. // edited by mrbrownee70
  45. ?>