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