PageRenderTime 29ms CodeModel.GetById 18ms app.highlight 8ms RepoModel.GetById 1ms app.codeStats 0ms

/hosts/uploadbox_com.php

https://github.com/gartz/RapidLeetch
PHP | 57 lines | 52 code | 5 blank | 0 comment | 4 complexity | 9c616ba8c5b6e2c5ed4eb063d38702c0 MD5 | raw file
 1<?php
 2if (!defined('RAPIDLEECH'))
 3{
 4	require_once("index.html");
 5	exit;
 6}
 7
 8if ($_POST['ub'] == 'ok') {
 9	$post = array();
10	$post['enter'] = $_POST['enter'];
11	$post['code'] = $_POST['code'];
12	$post['go'] = 'yes';
13	$page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), 0, 0, $post, 0, $_GET["proxy"],$pauth);
14	$cookie = GetCookies($page);
15	if (!stristr($page,"If downloading hasn't started automatically within 2 seconds, please")) html_error("Download link not found");
16	preg_match('/<a href="(.*)">click here/',$page,$Href);
17	if (!$Href) html_error("Captcha wrong or download link not found");
18	$Referer = $LINK;
19	$Url = parse_url($Href[1]);
20	$FileName = !$FileName ? basename($Url["path"]) : $FileName;
21	
22	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($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" : "").(isset($_GET["audl"]) ? "&audl=doum" : ""));
23} else {
24	$post['free'] = 'yes';
25	$page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), 0, 0, $post, 0, $_GET["proxy"],$pauth);
26	is_page($page);
27	is_present($page, "The limit of traffic for your country is exceeded.");
28	$cookies = GetCookies($page);
29	preg_match('/ type it in:<img src="(.+?)"/', $page, $imglink);
30	preg_match('/<input type="hidden" name="code" value="(.*)"/',$page,$code);
31	$code = $code[1];
32	$img ='http://'.$Url["host"].$imglink[1];
33	$Url = parse_url($img);
34	$page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), $LINK, $cookie, 0, 0, $_GET["proxy"],$pauth);
35	$headerend = strpos($page,"\r\n\r\n");
36	$pass_img = substr($page,$headerend+4);
37	$pngstart = strpos($pass_img,"PNG");
38	$pass_img = substr($pass_img,$pngstart-1);
39	write_file($download_dir."uploadbox_captcha.png", $pass_img);
40	$randnum = rand(10000, 100000);
41	
42	$img_data = explode("\r\n\r\n", $page);
43	$header_img = $img_data[0];
44	
45	
46
47	print 	"<form method=\"post\" action=\"".$PHP_SELF.(isset($_GET["audl"]) ? "?audl=doum" : "")."\">$nn";
48	print	"<b>Please enter code:</b><br>$nn";
49	print	"<img src=\"{$download_dir}uploadbox_captcha.png?id=".$randnum."\" >$nn";
50	print	"<input name=\"link\" value=\"$LINK\" type=\"hidden\">$nn";
51	print	"<input type='hidden' name='code' value=$code>$nn";
52	print	"<input name=\"ub\" value=\"ok\" type=\"hidden\">$nn";
53	print	"<input name=\"cookie\" value=\"$cookie\" type=\"hidden\">$nn";
54	print	"<input name=\"name\" value=\"$name[1]\" type=\"hidden\">$nn";
55	print	"<input name=\"enter\" type=\"text\" >";
56	print	"<input name=\"Submit\" value=\"Submit\" type=\"submit\"></form>";
57}