Guest User

bthaxor

a guest
Jul 18th, 2009
145
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 13.18 KB | None | 0 0
  1. <?php
  2. if (! defined ( 'RAPIDLEECH' )) {
  3.     require_once ("index.html");
  4.     exit ();
  5. }
  6.  
  7. if (preg_match ( "/f=(\w+)/", $Url ["query"], $matches )) {
  8.     $page = geturl ( "www.megaupload.com", 80, "/xml/folderfiles.php?folderid=" . $matches [1], 0, 0, 0, 0, $_GET ["proxy"], $pauth );
  9.     if (! preg_match_all ( "/url=\"(http[^\"]+)\"/", $page, $matches )) html_error ( 'link not found' );
  10.    
  11.     if (! is_file ( "audl.php" )) html_error ( 'audl.php not found' );
  12.     echo "<form action=\"audl.php?GO=GO\" method=post>\n";
  13.     echo "<input type=hidden name=links value='" . implode ( "\r\n", $matches [1] ) . "'>\n";
  14.     foreach ( array (
  15.         "useproxy", "proxy", "proxyuser", "proxypass"
  16.     ) as $v )
  17.         echo "<input type=hidden name=$v value=" . $_GET [$v] . ">\n";
  18.     echo "<script language=\"JavaScript\">void(document.forms[0].submit());</script>\n</form>\n";
  19.     flush ();
  20.     exit ();
  21. }
  22.  
  23. if ($_GET ["step"] != "1") {
  24.     list ( $LINK, $filepassword ) = explode ( "|", $LINK, 2 );
  25.     $LINK = preg_replace ( "/\.com\/[a-z]{2}\//", ".com/", $LINK );
  26.     $Url = parse_url ( $LINK );
  27.     $filepassword = trim($filepassword);
  28. }
  29.  
  30. if (($_GET ["premium_acc"] == "on" && $_GET ["premium_user"] && $_GET ["premium_pass"]) || ($_GET ["premium_acc"] == "on" && $premium_acc ["megaupload"] ["user"] && $premium_acc ["megaupload"] ["pass"] || $_GET ["mu_acc"] == "on" && $_GET ["mu_cookie"]) || $_GET ["mu_acc"] == "on" && $mu_cookie_user_value) {
  31.     if ($_GET['step'] == 1) {
  32.         $post ["filepassword"] = $_GET ['filepassword'];
  33.         $page = geturl ( $Url ["host"], $Url ["port"] ? $Url ["port"] : 80, $Url ["path"] . ($Url ["query"] ? "?" . $Url ["query"] : ""), $Referer, $premium_cookie, $post, 0, $_GET ["proxy"], $pauth );
  34.     } else {
  35.         $post = array ();
  36.         $post ['login'] = 1;
  37.         $post ['redir'] = 1;
  38.        
  39.         $post ["username"] = $_GET ["premium_user"] ? $_GET ["premium_user"] : $premium_acc ["megaupload"] ["user"];
  40.         $post ["password"] = $_GET ["premium_pass"] ? $_GET ["premium_pass"] : $premium_acc ["megaupload"] ["pass"];
  41.         $page = geturl ( $Url ["host"], $Url ["port"] ? $Url ["port"] : 80, "/?c=login", 0, 0, $post, 0, $_GET ["proxy"], $pauth );
  42.         is_page ( $page );
  43.        
  44.         $premium_cookie = trim ( cut_str ( $page, "Set-Cookie:", ";" ) );
  45.        
  46.         if ($mu_cookie_user_value) {
  47.             $premium_cookie = 'user=' . $mu_cookie_user_value;
  48.         } elseif ($_GET ["mu_acc"] == "on" && $_GET ["mu_cookie"]) {
  49.             $premium_cookie = 'user=' . $_GET ["mu_cookie"];
  50.         } elseif (! stristr ( $premium_cookie, "user" )) {
  51.             html_error ( "Cannot use premium account", 0 );
  52.         }
  53.        
  54.         $page = geturl ( $Url ["host"], $Url ["port"] ? $Url ["port"] : 80, $Url ["path"] . ($Url ["query"] ? "?" . $Url ["query"] : ""), 0, $premium_cookie, $filepassword ? array (
  55.             "filepassword" => $filepassword
  56.         ) : 0, 0, $_GET ["proxy"], $pauth );
  57.         is_page ( $page );
  58.        
  59.         $Href = $LINK;
  60.         $Referer = $LINK;
  61.         if (stristr ( $page, 'password protected' )) {
  62.             html_error("You should insert link with format: http://www.megaupload.com/?d=xxxxxxxx|password");
  63.         }
  64.     }
  65.    
  66.     if (stristr ( $page, "Location:" )) {
  67.         $Href = trim ( cut_str ( $page, "Location: ", "\n" ) );
  68.         $Url = parse_url ( $Href );
  69.         $FileName = ! $FileName ? basename ( $Url ["path"] ) : $FileName;
  70.        
  71.         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=" . urlencode ( $LINK ) . ($_GET ["add_comment"] == "on" ? "&comment=" . urlencode ( $_GET ["comment"] ) : "") . ($pauth ? "&pauth=$pauth" : "").(isset($_GET["audl"]) ? "&audl=doum" : "") );
  72.     } elseif ($page = cut_str ( $page, 'downloadlink">', '</div>' )) {
  73.         $Href = cut_str ( $page, 'href="', '"' );
  74.         $Referer = $LINK;
  75.         $Url = parse_url ( $Href );
  76.         $FileName = ! $FileName ? basename ( $Url ["path"] ) : $FileName;
  77.        
  78.         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=" . urlencode ( $LINK ) . ($_GET ["add_comment"] == "on" ? "&comment=" . urlencode ( $_GET ["comment"] ) : "") . ($pauth ? "&pauth=$pauth" : "").(isset($_GET["audl"]) ? "&audl=doum" : "") );
  79.     } else {
  80.         html_error ( "Download link not found", 0 );
  81.     }
  82. } else {
  83.     $cookie = array (
  84.         "user=XTOKCFTTQUGFM50AQ9C6AAY1SDEH-34O; megauploadtoolbar_id=D910E987B19B436EBF452B3C0D503909; megauploadtoolbar_visible=yes; toolbar=1; MUTBI=E%3D3%2CP%3D3; v=1"
  85.     );
  86.    
  87.     if ($_GET ["step"] == "1" || $filepassword) {
  88.         if ($_GET ["step"] == "1") {
  89.             $post ["captchacode"] = $_GET ["imagecode"];
  90.             $post ["captcha"] = $_GET ["imagestring"];
  91.             $post ["megavar"] = $_GET ["megavar"];
  92.         } else
  93.             $post ["filepassword"] = $filepassword;
  94.        
  95.         $page = geturl ( $Url ["host"], $Url ["port"] ? $Url ["port"] : 80, $Url ["path"] . ($Url ["query"] ? "?" . $Url ["query"] : ""), $Referer, $cookie, $post, 0, $_GET ["proxy"], $pauth );
  96.         is_page ( $page );
  97.        
  98.         is_present ( $page, "The file you are trying to access is temporarily unavailable" );
  99.         if (! stristr ( $page, "id=\"captchaform" )) {
  100.             $countDown = trim ( cut_str ( $page, "count=", ";" ) );
  101.             $countDown = (! is_numeric ( $countDown ) ? 26 : $countDown);
  102.            
  103.             $Href = cut_str ( $page, 'downloadlink"><a href="', '"' );
  104.             $Url = parse_url ( $Href );
  105.             if (! is_array ( $Url )) {
  106.                 html_error ( "Download link not found", 0 );
  107.             }
  108.            
  109.             insert_timer ( $countDown, "The file is being prepared.", "", true );
  110.            
  111.             $FileName = ! $FileName ? basename ( $Url ["path"] ) : $FileName;
  112.            
  113.             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"] ) : "") . ($pauth ? "&pauth=$pauth" : "").(isset($_GET["audl"]) ? "&audl=doum" : "") );
  114.             exit ();
  115.         }
  116.     } else {
  117.         $page = geturl ( $Url ["host"], $Url ["port"] ? $Url ["port"] : 80, $Url ["path"] . ($Url ["query"] ? "?" . $Url ["query"] : ""), 0, $cookie, 0, 0, $_GET ["proxy"], $pauth );
  118.         is_page ( $page );
  119.        
  120.         if (stristr ( $page, "Location:" )) {
  121.             $Referer = $LINK;
  122.             $Href = trim ( cut_str ( $page, "ocation:", "\n" ) );
  123.             $Url = parse_url ( $Href );
  124.            
  125.             $page = geturl ( $Url ["host"], $Url ["port"] ? $Url ["port"] : 80, $Url ["path"] . ($Url ["query"] ? "?" . $Url ["query"] : ""), $Referer, $cookie, 0, 0, $_GET ["proxy"], $pauth );
  126.             is_page ( $page );
  127.            
  128.             is_present ( $page, "All download slots assigned to your country", "All download slots assigned to your country are currently in use" );
  129.            
  130.             if (! stristr ( $page, "gencap.php?" )) {
  131.                 print "An error occured, see details below:<br>" . $nn . str_replace ( "<HEAD>", "<HEAD>$nn<base href=\"http://www.megaupload.com\">", $page );
  132.                 exit ();
  133.             }
  134.             $LINK = $Href;
  135.         }
  136.        
  137.         is_present ( $page, 'The file you are trying to access is temporarily unavailable' );
  138.         is_present ( $page, 'the link you have clicked is not available', 'Invalid link' );
  139.         is_present ( $page, 'This file has expired due to inactivity' );
  140.        
  141.         $Href = $LINK;
  142.         $Referer = $LINK;
  143.         if (stristr ( $page, 'password protected' )) {
  144.             print "<form name=\"dl\" action=\"$PHP_SELF\" method=\"post\">\n";
  145.             print "<input type=\"hidden\" name=\"link\" value=\"" . urlencode ( $Href ) . "\">\n<input type=\"hidden\" name=\"referer\" value=\"" . urlencode ( $Referer ) . "\">\n<input type=\"hidden\" name=\"fileid\" value=\"$fid\">\n<input type=\"hidden\" name=\"imagecode\" value=\"$imagecode\">\n<input type=\"hidden\" name=\"megavar\" value=\"$megavar\">\n<input type=\"hidden\" name=\"step\" value=\"1\">\n";
  146.             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";
  147.             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";
  148.             print "<h4>Enter password here: <input type=\"text\" name=\"filepassword\" size=\"13\">&nbsp;&nbsp;<input type=\"submit\" onclick=\"return check()\" value=\"Download File\"></h4>\n";
  149.             print "<script language=\"JavaScript\">" . $nn . "function check() {" . $nn . "var imagecode=document.dl.imagestring.value;" . $nn . 'if (imagecode == "") { window.alert("You didn\'t enter the image verification code"); return false; }' . $nn . 'else { return true; }' . $nn . '}' . $nn . '</script>' . $nn;
  150.             print "</form>\n</body>\n</html>";
  151.             exit ();
  152.         }
  153.        
  154.         if (stristr ( $page, "?c=happyhour" )) {
  155.             preg_match ( '/<a href="(.*)" style="font-size:15px;"/', $page, $tmp );
  156.             if (! $tmp [1]) {
  157.                 html_error ( "Download link not found in happy hour" );
  158.             }
  159.             $Href = $tmp [1];
  160.             $Url = parse_url ( $Href );
  161.             if (! is_array ( $Url )) {
  162.                 html_error ( "Download link not found", 0 );
  163.             }
  164.             $FileName = ! $FileName ? basename ( $Url ["path"] ) : $FileName;
  165.             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"] ) : "") . ($pauth ? "&pauth=$pauth" : "") . (isset ( $_GET ["audl"] ) ? "&audl=doum" : "") );
  166.             exit ();
  167.         }
  168.        
  169.         if (! stristr ( $page, "id=\"captchaform" )) html_error ( "Image code not found", 0 );
  170.     }
  171.    
  172.     $Href = $LINK;
  173.     $Referer = $LINK;
  174.     $page = cut_str ( $page, 'id="captchaform">', '</FORM>' );
  175.     $imagecode = cut_str ( $page, 'captchacode" value="', '"' );
  176.     $megavar = cut_str ( $page, '<input type="hidden" name="megavar" value="', '">' );
  177.    
  178.     $access_image_url = cut_str ( $page, 'img src="', '"' );
  179.  
  180.     $newfile=$download_dir."megaupload_captcha.gif";
  181.     copy($access_image_url, $newfile);
  182.    
  183.     print "<form name=\"dl\" action=\"$PHP_SELF\" method=\"post\">\n";
  184.     print "<input type=\"hidden\" name=\"link\" value=\"" . urlencode ( $Href ) . "\">\n<input type=\"hidden\" name=\"referer\" value=\"" . urlencode ( $Referer ) . "\">\n<input type=\"hidden\" name=\"fileid\" value=\"$fid\">\n<input type=\"hidden\" name=\"imagecode\" value=\"$imagecode\">\n<input type=\"hidden\" name=\"megavar\" value=\"$megavar\">\n<input type=\"hidden\" name=\"step\" value=\"1\">\n";
  185.     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";
  186.     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";
  187.     print "<h4>Enter <img src=\"http://bthaxor.com/rapidleech/files/megaupload_captcha.gif\"> here: <input type=\"text\" name=\"imagestring\" size=\"3\">&nbsp;&nbsp;<input type=\"submit\" onclick=\"return check()\" value=\"Download File\"></h4>\n";
  188.     print "<script language=\"JavaScript\">" . $nn . "function check() {" . $nn . "var imagecode=document.dl.imagestring.value;" . $nn . 'if (imagecode == "") { window.alert("You didn\'t enter the image verification code"); return false; }' . $nn . 'else { return true; }' . $nn . '}' . $nn . '</script>' . $nn;
  189.     print "</form>\n</body>\n</html>";
  190. }
  191.  
  192. ?>
Add Comment
Please, Sign In to add comment