PageRenderTime 41ms CodeModel.GetById 14ms RepoModel.GetById 1ms app.codeStats 0ms

/hosts/download/egoshare_com.php

http://rapidleech.googlecode.com/
PHP | 90 lines | 73 code | 13 blank | 4 comment | 7 complexity | 5d19225e98366b2a8949f3c8c759d31d 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. $cookie = trim($_POST['cookie']);
  12. $Referer = trim($_POST["referer"]);
  13. $Href = $_POST["act_url"];
  14. $Url = parse_url(trim($Href));
  15. //$DebugRequest = true;
  16. $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), $Referer, $cookie, $post, 0, $_GET["proxy"],$pauth);
  17. is_page($page);
  18. is_present($page,'Captcha number error or expired return to main and reattempt');
  19. $click = 'king_last_click='.cut_str ( $page ,'king_last_click=' ,';' );
  20. $cookie= preg_replace("/king_last_click=\w+/i",$click,$cookie) ;
  21. $wait = cut_str ( $page ,"var timeout='" ,"'" );
  22. insert_timer($wait, "<b>Timer :</b>");
  23. $snap = cut_str ( $page ,'loadfilelink.decode("' ,'"' );
  24. if ($dlink=base64_decode($snap)){
  25. $Url=parse_url($dlink);
  26. }else{html_error( "Error decoding link" , 0 ); }
  27. $FileName = cut_str ( $dlink ,'name=' ,' ' );
  28. $loc = "{$_SERVER['PHP_SELF']}?filename=" . urlencode ( $FileName ) .
  29. "&host=" . $Url ["host"] .
  30. "&port=" . $Url ["port"] .
  31. "&path=" . urlencode ( $Url ["path"] . ($Url ["query"] ? "?" . $Url ["query"] : "") ) .
  32. "&referer=" . urlencode ( $Referer ) .
  33. "&email=" . ($_GET ["domail"] ? $_GET ["email"] : "") .
  34. "&partSize=" . ($_GET ["split"] ? $_GET ["partSize"] : "") .
  35. "&method=" . $_GET ["method"] .
  36. "&proxy=" . ($_GET ["useproxy"] ? $_GET ["proxy"] : "") .
  37. "&saveto=" . $_GET ["path"] .
  38. "&link=" . urlencode ( $link ) .
  39. ($_GET ["add_comment"] == "on" ? "&comment=" . urlencode ( $_GET ["comment"] ) : "") .
  40. $auth .
  41. ($pauth ? "&pauth=$pauth" : "") .
  42. "&cookie=" . urlencode($cookie) .
  43. "&post=" . urlencode ( serialize ( $post ) );
  44. insert_location ( $loc );
  45. } else {
  46. $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), $Referer, 0, 0, 0, $_GET["proxy"],$pauth);
  47. is_page($page);
  48. if (stristr($page,'DL_FileNotFound')) {
  49. html_error("File not found",0);
  50. }
  51. $cookie = GetCookies($page);
  52. preg_match('/<form name=myform action="(.*)"/',$page,$act_url);
  53. $act_url = $act_url[1];
  54. $img = 'http://www.egoshare.com/captcha.php';
  55. $Url = parse_url($img);
  56. $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), $LINK, $cookie, 0, 0, $_GET["proxy"],$pauth);
  57. $headerend = strpos($page,"\r\n\r\n");
  58. $pass_img = substr($page,$headerend+4);
  59. write_file($options['download_dir']."egoshare_captcha.jpg", $pass_img);
  60. $randnum = rand(10000, 100000);
  61. $img_data = explode("\r\n\r\n", $page);
  62. $header_img = $img_data[0];
  63. print "<form method=\"post\" action=\"$PHP_SELF\">$nn";
  64. print "<b>Please enter code:</b><br>$nn";
  65. print "<img src=\"{$options['download_dir']}egoshare_captcha.jpg?id=".$randnum."\" >$nn";
  66. print "<input name=\"link\" value=\"$LINK\" type=\"hidden\">$nn";
  67. print "<input name=\"referer\" value=\"$LINK\" type=\"hidden\">$nn";
  68. print "<input name=\"act_url\" value=\"$act_url\" type=\"hidden\">$nn";
  69. print "<input name=\"eg\" value=\"ok\" type=\"hidden\">$nn";
  70. print "<input name=\"cookie\" value=\"$cookie\" type=\"hidden\">$nn";
  71. print "<input name=\"captchacode\" type=\"text\" >";
  72. print "<input name=\"submit\" value=\"Download\" type=\"submit\"></form>";
  73. }
  74. /*
  75. WRITTEN by kaox 24/09/2009
  76. */
  77. ?>