Jump to content

uploaded.to

- - - - -

Fixed Megashares.com Plugin


10 replies to this topic

#1 dragonpiper

    Newbie

  • Members
  • Pip
  • 6 posts

Posted 21 July 2011 - 09:43 PM

<?php

if (!defined('RAPIDLEECH'))
  {
  require_once("index.html");
  exit;
  }
if (($_GET["premium_acc"] == "on" && $_GET["premium_user"] && $_GET["premium_pass"]) || ($_GET["premium_acc"] == "on" && $premium_acc["megashares"]["user"] && $premium_acc["megashares"]["pass"]))
{
	$post = Array();
	$post["httpref"] = "";
	$post["mymslogin_name"] = (($_GET["premium_user"] && $_GET["premium_pass"]) ? $_GET["premium_user"] : $premium_acc["megashares"]["user"]);
	$post["mymspassword"] = (($_GET["premium_user"] && $_GET["premium_pass"]) ? $_GET["premium_pass"] : $premium_acc["megashares"]["pass"]);
	$post["myms_login"] = "Login";
	$Url = parse_url("http://d01.megashares.com/myms_login.php");
	$page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), 0, 0, $post, 0, $_GET["proxy"], $pauth);
	is_page($page);
	is_present($page, "Failed login message:", "Wrong username or password");
	//is_notpresent($page, "Set-Cookie: linkcard=", "Cannot use premium account");
		
	$cookies = GetCookies( $page );
	
	$Url = parse_url($LINK);
	$page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), 0, $cookies, 0, 0, $_GET["proxy"], $pauth);	
	is_page($page);
	
	preg_match('/Location: *(.+)/i', $page, $newredir );
	$newHref = trim( $newredir[1] );	
	if ( $newHref != "" )
	{
		$Referer = $newHref;
		$Url = parse_url( $newHref );
		$page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), $Referer, $cookies, 0, 0, $_GET["proxy"],$pauth);
		is_page($page);
	}
		
	is_present($page, "This link requires a password to continue:", "This file is password protected");
	is_present($page, "Link was deleted as it was not downloaded", "Deleted due to inactivity");
	is_present($page, "Invalid link", "Invalid link");
	is_present($page, "Link not found", "Link not found");
	is_present($page, "Link was removed", "Link removed");
	$cookies .= "; ".GetCookies($page);		
	if (preg_match('%http://.+megashares\.com/index\.php\?d01=[^"\']+%', $page, $dllink))
	{
		$name = cut_str ( $dllink[0] ,'fln=/' ,'"' );
		$dwn = $dllink[0];
		$Url = parse_url($dwn);
		$FileName = $name;
					
		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"] : "")."&cookie=".urlencode($cookies)."&proxy=".($_GET["useproxy"] ? $_GET["proxy"] : "")."&saveto=".$_GET["path"]."&link=".urlencode($LINK).($_GET["add_comment"] == "on" ? "&comment=".urlencode($_GET["comment"]) : "")."&auth=".$auth.($pauth ? "&pauth=$pauth" : "").(isset($_GET["audl"]) ? "&audl=doum" : ""));
	}
	else
	{
		html_error("Premium - Download link not found", 0);
	}
}
else
{
	$ms = $_POST['ms']; 
	if($ms == "ok"){
		$captcha = $_POST["captcha"];
		$cookies = $_POST["cookies"];
		$fquery = $_POST["fquery"];
		$randnum = $_POST["randnum"];
		$pass = $_POST["pass"];
		$mhost = $_POST["mhost"];
		$dllink = $_POST["dllink"];
		$rndtime = $_POST["rndtime"];
		$name = $_POST["name"];
		
		$final = "http://".$mhost.$fquery."&rs=check_passport_renewal&rsargs[]=".$captcha."&rsargs[]=".$randnum."&rsargs[]=".$pass."&rsargs[]=replace_sec_pprenewal&rsrnd=".$rndtime;

		$Url = parse_url($final);
		$page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), 0, $cookies, 0, 0, $_GET["proxy"],$pauth);

		if(preg_match('/Thank you for reactivating your passport/', $page)){
			$Url = parse_url($dllink);
			$FileName = $name;
			
			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"]."&cookie=".urlencode($cookies)."&proxy=".($_GET["useproxy"] ? $_GET["proxy"] : "")."&saveto=".$_GET["path"]."&link=".urlencode($LINK).($_GET["add_comment"] == "on" ? "&comment=".urlencode($_GET["comment"]) : "")."&auth=".$auth.($pauth ? "&pauth=$pauth" : "").(isset($_GET["audl"]) ? "&audl=doum" : ""));
		}else{
			html_error("An error occured", 0);
		}
	}else{
		$page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), $Referer, 0, 0, 0, $_GET["proxy"],$pauth);
		is_page($page);
		
		preg_match('/Location: *(.+)/i', $page, $newredir );
		$newHref = trim( $newredir[1] );	
		if ( $newHref != "" )
		{
			$Referer = $newHref;
			$Url = parse_url( $newHref );
			$page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), $Referer, 0, 0, 0, $_GET["proxy"],$pauth);
		is_page($page);
		}
		
		$cookies = GetCookies($page);
		
		$page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "index.php?".$Url["query"] : ""), $Referer, $cookies, 0, 0, $_GET["proxy"],$pauth);
		is_page($page);
		is_present($page, "This link requires a password to continue:", "This file is password protected");
		is_present($page, "Link was deleted as it was not downloaded", "File not found");
		is_present($page, "Invalid link", "File not found");
		is_present($page, "Link not found", "File not found");
		is_present($page, "Link was removed", "File not found");
		is_present($page,"This link's <u>filesize is larger</u> than what you have left on your Passport.");
		is_present($page, "You can download again when your download completes", "This IP address is already downloading a file");
		$cookies .= "; ".GetCookies($page);		
		preg_match('%http://.+megashares\.com/index\.php\?d01=[^"\']+%', $page, $dllink);
		$name = cut_str ( $dllink[0] ,'fln=/' ,'"' );
		
		if(preg_match('/Your Passport needs to be reactivated/', $page)){
			preg_match('/var request_uri *= *"(.*)";/', $page, $fquery);
			preg_match('/src="index\.php\?secgfx=gfx&random_num=(.+?)"/', $page, $randnum);
			preg_match('/name="passport_num".*value="(.*?)"/', $page, $pass);
            is_present($page,"All download slots for this link are currently filled", "The server response is: All download slots for this link are currently filled.
Please try again momentarily.", 0);
			
			$img = "http://".$Url["host"]."/index.php?secgfx=gfx&random_num=".$randnum[1];
			$mhost = $Url["host"];
			
			$Url = parse_url($img);
			$page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), $Referer, $cookies, 0, 0, $_GET["proxy"],$pauth);
			$headerend = strpos($page,"\r\n\r\n");
			$pass_img = substr($page,$headerend+4);
			write_file($options['download_dir']."megashare_captcha.png", $pass_img);
			
			print 	"<form method=\"post\" action=\"".$PHP_SELF.(isset($_GET["audl"]) ? "?audl=doum" : "")."\" name=\"msform\">$nn";
			print	"<b>Enter the passport reactivation code in the graphic, then hit the 'Reactivate Passport' button.</b><br><br>$nn";
			print	"<img src=\"{$options['download_dir']}megashare_captcha.png?id=".rand(10000, 100000)."\" >$nn";
			print	"<input name=\"link\" value=\"$LINK\" type=\"hidden\">$nn";
			print	"<input name=\"mhost\" value=\"$mhost\" type=\"hidden\">$nn";
			print	"<input name=\"fquery\" value=\"$fquery[1]\" type=\"hidden\">$nn";
			print	"<input name=\"randnum\" value=\"$randnum[1]\" type=\"hidden\">$nn";
			print	"<input name=\"pass\" value=\"$pass[1]\" type=\"hidden\">$nn";
			print	"<input name=\"cookies\" value=\"$cookies\" type=\"hidden\">$nn";
			print	"<input name=\"dllink\" value=\"$dllink[0]\" type=\"hidden\">$nn";
			print	"<input name=\"name\" value=\"$name\" type=\"hidden\">$nn";
			print	"<input name=\"captcha\" type=\"text\" >$nn";
			print "<input type=\"hidden\" name=\"rndtime\">\n";
			print	"<input name=\"ms\" value=\"ok\" type=\"hidden\">$nn";
			print "<script language=\"JavaScript\">function check() { document.msform.rndtime.value=new Date().getTime(); return true; }</script>$nn";
			print	"<input name=\"Submit\" onclick=\"return check()\" value=\"Reactivate Passport\" type=\"submit\"></form>";
		}else{
			$dwn = $dllink[0];
			$Url = parse_url($dwn);
			$FileName = $name;
					
			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"] : "")."&cookie=".urlencode($cookies)."&proxy=".($_GET["useproxy"] ? $_GET["proxy"] : "")."&saveto=".$_GET["path"]."&link=".urlencode($LINK).($_GET["add_comment"] == "on" ? "&comment=".urlencode($_GET["comment"]) : "")."&auth=".$auth.($pauth ? "&pauth=$pauth" : "").(isset($_GET["audl"]) ? "&audl=doum" : ""));
		}
	}
}
// update by dragonpiper 21-July-2011 (FIX for premium download)
// update by kaox 09-jan-2010 (FIX for free download)
// update by snatch 09-jan-2010 (FIX for premium download with kaox update)
// update by rajmalhotra 10-Jan-2010 ( Added support for this type of Link : http://d01.megashares.com/dl/8644cd8/hotfile_com[DL]_03_nov_2009.rar ) 
// Now can download from any link like 
// a)  http://d01.megashares.com/?d01=8644cd8
// B)  http://d01.megashares.com/dl/8644cd8/hotfile_com[DL]_03_nov_2009.rar
// update by rajmalhotra 23-Jan-2010 Small fix for downloading from premium account
?>


Edited by dragonpiper, 21 July 2011 - 09:45 PM.


#2 Sakib Hossain

    Rapidleecher

  • Banned
  • PipPipPipPip
  • 395 posts
  • Gender:Male
  • Location:fOrest

Posted 15 September 2011 - 05:25 PM

Only saves a 04.00 B File...

#3 Sisangan

    Advanced Member

  • Members
  • PipPipPip
  • 71 posts
  • Gender:Male

Posted 18 September 2011 - 05:07 PM

not working as a free user!!

it always redirect rapidleeech to its index!

my version is : r388

sample link : http://d01.megashare...php?d01=6437a02

error: redirecting page

#4 vdhdevil

    Rapidleecher

  • Members
  • PipPipPipPip
  • 654 posts
  • Gender:Male
  • Location:Viet Nam

Posted 19 September 2011 - 07:29 PM

check this:
Attached File  megashares_com.php (3.59K)
Number of downloads: 149
will add error message later, too late here
have fun :)

#5 Sisangan

    Advanced Member

  • Members
  • PipPipPip
  • 71 posts
  • Gender:Male

Posted 19 September 2011 - 07:37 PM

View Postvdhdevil, on 19 September 2011 - 07:29 PM, said:

check this:
Attachment megashares_com.php
will add error message later, too late here
have fun :)


Hooray!! :D

many many thanks!!

you are rock!

thank you

Edited by Sisangan, 19 September 2011 - 07:38 PM.


#6 bevolten

    Advanced Member

  • Members
  • PipPipPip
  • 76 posts
  • Gender:Not Telling

Posted 20 September 2011 - 01:46 AM

thank you....
Work with well now ;)

#7 OverMask

    Member

  • Members
  • PipPip
  • 14 posts

Posted 07 December 2011 - 12:12 PM

Hello,

This plugin isn't working anymore.

Thanks!

#8 _R_V_T_™

    Rapidleecher

  • Super MOD
  • PipPipPipPip
  • 1,927 posts
  • Gender:Male
  • Location:Indonesia

Awards

Contributer Altruistic

Posted 07 December 2011 - 04:22 PM

View PostOverMask, on 07 December 2011 - 12:12 PM, said:

Hello,

This plugin isn't working anymore.

Thanks!


link? dont make me ask twice, REPORT DOWNLOAD PLUGIN ERROR MUST PROVIDE LINK, SO I OR OTHER MEMBER CAN HELP U!

HOW TO REPORT BROKEN DOWNLOAD PLUGIN, CLICK THIS



USE YOUR EYES, YOUR BRAIN, YOUR HAND, MOVE YOUR FINGER AND TYPE ANYTHING YOU NEED IN SEARCH FUNCTION BEFORE YOU REQUEST SOME FEATURE, FIX OR ANYTHING RELATED TO RAPIDLEECH SCRIPT! IF YOU CAN'T FIND THINGS YOU NEED FOR, THEN YOU CAN POST THE THREAD ABOUT YOUR REQUEST/PROBLEM IN FORUM!


#9 OverMask

    Member

  • Members
  • PipPip
  • 14 posts

Posted 09 December 2011 - 09:56 AM

View Post_R_V_T_™, on 07 December 2011 - 04:22 PM, said:


link? dont make me ask twice, REPORT DOWNLOAD PLUGIN ERROR MUST PROVIDE LINK, SO I OR OTHER MEMBER CAN HELP U!


Link: http://d01.megashares.com/dl/be653b7

Premium donwload give me the error: "Wrong username or password"
The premium info is correct.

accounts.php info:
$premium_acc["megashares"] = array('user' => 'your username', 'pass' => 'your password');

RL Version: RapidLeech v3.43.2 Updated 18-October-2011

Plugin version from: Rapidleech_23_v43_svn383

Thanks and sorry for the other reply!!

Edited by OverMask, 09 December 2011 - 09:57 AM.


#10 vdhdevil

    Rapidleecher

  • Members
  • PipPipPipPip
  • 654 posts
  • Gender:Male
  • Location:Viet Nam

Posted 11 December 2011 - 09:54 AM

View PostOverMask, on 09 December 2011 - 09:56 AM, said:


Link: http://d01.megashares.com/dl/be653b7

Premium donwload give me the error: "Wrong username or password"
The premium info is correct.

accounts.php info:
$premium_acc["megashares"] = array('user' => 'your username', 'pass' => 'your password');

RL Version: RapidLeech v3.43.2 Updated 18-October-2011

Plugin version from: Rapidleech_23_v43_svn383

Thanks and sorry for the other reply!!

which plugin you use ?

#11 Yummy89

    Newbie

  • Members
  • Pip
  • 2 posts

Posted 11 December 2011 - 01:36 PM

use svn397 Plugin
http://rapidleech.go...ashares_com.php


And put this type

accounts.php info
$premium_acc["megashares_com"] = array('user' => 'your username', 'pass' => 'your password');


Already tested. Working for me.