PageRenderTime 38ms CodeModel.GetById 18ms app.highlight 3ms RepoModel.GetById 16ms app.codeStats 0ms

/hosts/download/zippyshare_com.php

https://github.com/gartz/RapidLeetch
PHP | 68 lines | 50 code | 11 blank | 7 comment | 5 complexity | 4666c8a8eebbe146627263a7aec0431c MD5 | raw file
 1<?php
 2
 3if (!defined('RAPIDLEECH'))
 4{
 5  require_once("index.html");
 6  exit;
 7  }
 8if ($_POST["step"]==1){
 9    
10$LINK=$_POST["link"];
11$cookie = $_POST['cookie'];
12$FileName = $_POST['filename'];
13$Url=parse_url($LINK);
14
15//$page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), 0, $cookie, 0, 0, $_GET["proxy"],$pauth);
16//is_page($page);
17
18//insert_timer("10");
19
20insert_location("$PHP_SELF?filename=".urlencode($FileName)."&force_name=".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($cookie)."&proxy=".($_GET["useproxy"] ? $_GET["proxy"] : "")."&saveto=".$_GET["path"]."&link=".urlencode($LINK).($_GET["add_comment"] == "on" ? "&comment=".urlencode($_GET["comment"]) : "")."&auth=".$auth.($pauth ? "&pauth=$pauth" : ""));
21    
22}else{			
23$page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"], $Referer, 0, 0, 0, $_GET["proxy"],$pauth);
24is_page($page);
25if (cutter($page,"Location: ","\r")) html_error( "Probably the link is typed incorrect or old , verify it in your browser." , 0 );
26is_present($page,"file does not exist", "The requsted file does not exist on this server.", 0);
27$cookie=GetCookies($page);
28$FileName=cut_str($page,"Name: </strong>","</font>");
29$ss = <<<HTML
30<html>
31<head>
32<title>FormLogin</title>
33</head>
34<body bgcolor="#FFFFFF" text="#000000">
35<form method="post" name="plink" action="$PHP_SELF">
36<input id="link" name="link" type="hidden">
37<input type="hidden" name="cookie" value="$cookie" >
38<input type="hidden" name="step" value="1" > 
39<input type="hidden" name="filename" value="$FileName">
40</form>
41HTML;
42
43preg_match('/(var pong[\s\S]+?)function/i',$page,$scr)  ;
44//$script1=cutter($page,'var','function',3);
45$script1=$scr[1];
46$var=trim(cutter($script1,'var','=',2));
47$script1=str_replace($var,"encoded",$script1);
48$script=$ss.'<script language="Javascript">'.$script1.'document.getElementById("link").value=encoded; document.plink.submit();</script>' ;
49
50echo ($script);
51}
52
53function cutter($str, $left, $right,$cont=1)
54	{
55    for($iii=1;$iii<=$cont;$iii++){
56	$str = substr ( stristr ( $str, $left ), strlen ( $left ) );
57	}
58    $leftLen = strlen ( stristr ( $str, $right ) );
59    $leftLen = $leftLen ? - ($leftLen) : strlen ( $str );
60    $str = substr ( $str, 0, $leftLen );
61    return $str;
62}
63
64/*************************\
65 WRITTEN BY KAOX 27-dec-09
66\*************************/
67
68?>