RapidLeetch /hosts/filefactory_com.php

Language PHP Lines 101
MD5 Hash de70b04ca5bbf9b103a63ced6784c9de
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
<?php
if (!defined('RAPIDLEECH'))
  {
  require_once("index.html");
  exit;
  }


//Use PREMIUM?
if (($_GET["premium_acc"] == "on" && $_GET["premium_user"] && $_GET["premium_pass"]) || ($_GET["premium_acc"] == "on" && $premium_acc["filefactory"]["user"] && $premium_acc["filefactory"]["pass"]))
{
	$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, 'File Not Found', 'Error - File was not found!');
	$post = array();
	$post['email'] = $_GET["premium_user"] ? trim($_GET["premium_user"]) : $premium_acc["filefactory"]["user"]  ;
	$post['password'] = $_GET["premium_pass"] ? trim($_GET["premium_pass"]) : $premium_acc["filefactory"]["pass"];
	$post['redirect'] = $LINK;
	$page = geturl("www.filefactory.com", 80, "/", 0, 0, $post, 0, $_GET["proxy"], $pauth);
	is_page($page);
	if (!preg_match('%(ff_membership=.+); expires%', $page, $lcook)) html_error('Error getting login-cookie', 0);
	if (!preg_match('%ocation: (.+)\r\n%', $page, $redir)) html_error('Error getting redirect', 0);
	$Url = parse_url($redir[1]);
	$page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), 0, $lcook[1], 0, 0, $_GET["proxy"],$pauth);
	if (!preg_match('%ocation: (.+)\r\n%', $page, $redir2)) html_error('Error getting redirect 2', 0);
	$Url = parse_url($redir2[1]);
	$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($lcook[1])."&email=".($_GET["domail"] ? $_GET["email"] : "")."&partSize=".($_GET["split"] ? $_GET["partSize"] : "")."&method=".$_GET["method"]."&proxy=".($_GET["useproxy"] ? $_GET["proxy"] : "")."&saveto=".$_GET["path"]."&link=".$redir2[1].($_GET["add_comment"] == "on" ? "&comment=".urlencode($_GET["comment"]) : "").($pauth ? "&pauth=$pauth" : "").(isset($_GET["audl"]) ? "&audl=doum" : ""));
}
else
//Use FREE instead?
{
if ($_GET["step"] == "1")
  {
 $cook = $_POST['cookie'];
  
  
  $post["captchaText"] = $_POST["captcha"];
  $post['captchaID'] = $_POST['captchaID'];
  
  $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), $Referer, $cook, $post, 0, $_GET["proxy"],$pauth);
  is_page($page);
  //var_dump(nl2br(htmlentities($page)));exit;
  
	preg_match('/<a href="(.+?)" class="download">/', $page, $dllink);
	$Href = trim($dllink[1]);
	$Url = parse_url($Href);
  
  if (!is_array($Url))
    {
    html_error("Download link not found", 0);
    }
  
  $FileName = "attachment";
  
  insert_location("$PHP_SELF?filename=".urlencode($FileName)."&host=".$Url["host"]."&path=".urlencode($Url["path"].($Url["query"] ? "?".$Url["query"] : ""))."&referer=".urlencode($Referer)."&cookie=".urlencode($premium_cookie)."&email=".($_GET["domail"] ? $_GET["email"] : "")."&partSize=".($_GET["split"] ? $_GET["partSize"] : "")."&method=".$_GET["method"]."&proxy=".($_GET["useproxy"] ? $_GET["proxy"] : "")."&saveto=".$_GET["path"]."&link=".$_POST["link2"].($_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);
  if (stristr($page,'ocation:')) {
	preg_match('/ocation: (.*)/',$page,$loc);
	$loc = "http://".$Url['host'].$loc[1];
	$Url = parse_url(trim($loc));
	$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);
	$LINK = trim($loc);
  }
  is_present($page, "This file is no longer available");
  is_notpresent($page, "Download for free", "Download link not found");
  // Get first download link (download with free)
  preg_match('/<a class="download" href="(.*)">Download for free/',$page,$href);
  $Href = "http://".$Url['host'].$href[1];
  $Url = parse_url(trim($Href));
  $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);
  preg_match_all('/Set-Cookie: (.*);/U',$page,$temp);
	$cookie = $temp[1];
	$cook = implode(';',$cookie);
  // Find captcha image
  preg_match('/<img class="captchaImage" src="(.*)"/',$page,$capimg);
  if (!$capimg) html_error("Cannot find captcha image",0);
  $access_image_url = "http://".$Url['host'].$capimg[1];
  // Captcha ID
  preg_match('/<input id="captchaID" name="captchaID" type="hidden" value="(.*)"/',$page,$cID);
  $cID = $cID[1];
    
  print "<form name=\"dl\" action=\"".$PHP_SELF.(isset($_GET["audl"]) ? "?audl=doum" : "")."\" method=\"post\">\n";
  print "<input type=\"hidden\" name=\"link\" value=\"".urlencode($Href)."\">\n<input type=\"hidden\" name=\"link2\" value=\"".urlencode($LINK)."\">\n<input type=\"hidden\" name=\"referer\" value=\"".urlencode($Href)."\">\n<input type=\"hidden\" name=\"f\" value=\"$f\">\n<input type=\"hidden\" name=\"h\" value=\"$h\">\n<input type=\"hidden\" name=\"b\" value=\"$b\">\n<input type=\"hidden\" name=\"step\" value=\"1\">\n";
  print "<input type=\"hidden\" name=\"comment\" id=\"comment\" value=\"".$_GET["comment"]."\">\n<input type=\"hidden\" name=\"email\" id=\"email\" value=\"".$_GET["email"]."\">\n<input type=\"hidden\" name=\"partSize\" id=\"partSize\" value=\"".$_GET["partSize"]."\">\n<input type=\"hidden\" name=\"method\" id=\"method\" value=\"".$_GET["method"]."\">\n";
  print "<input type=\"hidden\" name=\"proxy\" id=\"proxy\" value=\"".$_GET["proxy"]."\">\n<input type=\"hidden\" name=\"proxyuser\" id=\"proxyuser\" value=\"".$_GET["proxyuser"]."\">\n<input type=\"hidden\" name=\"proxypass\" id=\"proxypass\" value=\"".$_GET["proxypass"]."\">\n<input type=\"hidden\" name=\"path\" id=\"path\" value=\"".$_GET["path"]."\">\n";
  print "<input type='hidden' name='cookie' value='$cook' /><input type='hidden' name='captchaID' value='$cID' />";
  print "<h4>Enter <img src=\"$access_image_url\"> here: <input type=\"text\" name=\"captcha\" size=\"4\">&nbsp;&nbsp;<input type=\"submit\" onclick=\"return check()\" value=\"Download File\"></h4>\n";
  print "<script language=\"JavaScript\">".$nn."function check() {".$nn."var imagecode=document.dl.captcha.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>";
  
  }
}
?>
Back to Top