PageRenderTime 173ms CodeModel.GetById 162ms app.highlight 7ms RepoModel.GetById 1ms app.codeStats 0ms

/hosts/egoshare_com.php

https://github.com/gartz/RapidLeetch
PHP | 67 lines | 59 code | 7 blank | 1 comment | 6 complexity | 48f5db86e16c1787884a8dc253fad1bb MD5 | raw file
 1<?php
 2if (!defined('RAPIDLEECH'))
 3{
 4	require_once("index.html");
 5	exit;
 6}
 7
 8$eg = $_POST['eg'];
 9if ($eg == 'ok') {
10	$post = array();
11	$post['captchacode'] = $_POST['captchacode'];
12	$post['2ndpage'] = 1;
13	$cook = trim($_POST['cookie']);
14	$Referer = trim($_POST["referer"]);
15	$Href = $_POST["act_url"];
16	$Url = parse_url(trim($Href));
17	//$DebugRequest = true;
18	$page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), $Referer, $cook, $post, 0, $_GET["proxy"],$pauth);
19	is_page($page);
20	is_present($page,'Captcha number error or expired');
21	preg_match_all('/Set-Cookie: (.*);/U',$page,$temp);
22	$cookie = $temp[1];
23	$cook .= implode(';',$cookie);
24	
25	var_dump(nl2br(htmlentities($page)));exit;
26} else {
27	$page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), $Referer, 0, 0, 0, $_GET["proxy"],$pauth);
28	is_page($page);
29	if (stristr($page,'DL_FileNotFound')) {
30		html_error("File not found",0);
31	}
32	preg_match_all('/Set-Cookie: (.*);/U',$page,$temp);
33	$cookie = $temp[1];
34	$cook = implode(';',$cookie);
35	preg_match('/<form name=myform action="(.*)"/',$page,$act_url);
36	$act_url = $act_url[1];
37	$img = 'http://www.egoshare.com/captcha.php';
38	$Url = parse_url($img);
39	$page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), $LINK, $cook, 0, 0, $_GET["proxy"],$pauth);
40
41	$headerend = strpos($page,"\r\n\r\n");
42	$pass_img = substr($page,$headerend+4);
43	write_file($download_dir."egoshare_captcha.jpg", $pass_img);
44	$randnum = rand(10000, 100000);
45
46	$img_data = explode("\r\n\r\n", $page);
47	$header_img = $img_data[0];
48
49	preg_match_all('/Set-Cookie: (.*);/U',$page,$temp);
50	$cookie = $temp[1];
51	if ($cookie) {
52		$cook .= ';'.implode(';',$cookie);
53	}
54	
55	print 	"<form method=\"post\" action=\"$PHP_SELF\">$nn";
56	print	"<b>Please enter code:</b><br>$nn";
57	print	"<img src=\"{$download_dir}egoshare_captcha.jpg?id=".$randnum."\" >$nn";
58	print	"<input name=\"link\" value=\"$LINK\" type=\"hidden\">$nn";
59	print	"<input name=\"referer\" value=\"$LINK\" type=\"hidden\">$nn";
60	print	"<input name=\"act_url\" value=\"$act_url\" type=\"hidden\">$nn";
61	print	"<input name=\"eg\" value=\"ok\" type=\"hidden\">$nn";
62	print	"<input name=\"cookie\" value=\"$cook\" type=\"hidden\">$nn";
63	print	"<input name=\"captchacode\" type=\"text\" >";
64	print	"<input name=\"submit\" value=\"Download\" type=\"submit\"></form>";
65}
66
67?>