PageRenderTime 1033ms CodeModel.GetById 28ms RepoModel.GetById 1ms app.codeStats 0ms

/hosts/rapidshare_com.php

https://github.com/gartz/RapidLeetch
PHP | 136 lines | 120 code | 15 blank | 1 comment | 10 complexity | c1d119e1218bd546b3531dcd8a447e15 MD5 | raw file
  1. <?php
  2. if (!defined('RAPIDLEECH'))
  3. {
  4. require_once("index.html");
  5. exit;
  6. }
  7. if (($_REQUEST["premium_acc"] == "on" && $_REQUEST["premium_user"] && $_REQUEST["premium_pass"]) || ($_GET["premium_acc"] == "on" && $premium_acc["rs_com"]["user"] && $premium_acc["rs_com"]["pass"]))
  8. {
  9. $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), 0, 0, 0, 0, $_GET["proxy"],$pauth);
  10. is_page($page);
  11. is_present($page,"The file could not be found.", "The file could not be found. Please check the download link.");
  12. is_present($page,"This limit is reached", "This file is neither allocated to a Premium Account, or a Collector's Account, and can therefore only be downloaded 10 times. This limit is reached.");
  13. is_present($page,"Due to a violation of our terms of use, the file has been removed from the server.");
  14. is_present($page,"This file is suspected to contain illegal content and has been blocked.");
  15. is_present($page,"The uploader has removed this file from the server.");
  16. is_present($page,"This file has been removed from the server, because the file has not been accessed in a long time.");
  17. is_present($page,"is momentarily not available", "This server is momentarily not available. We are aware of this and are working to get this resolved.");
  18. is_present($page,"unavailable due to hardware-problems", "Server unavailable due to hardware-problems");
  19. $FileName = basename(trim(cut_str($page, '<form action="', '"')));
  20. !$FileName ? $FileName = basename($Url["path"]) : "";
  21. $auth = $_REQUEST["premium_user"] ? base64_encode($_REQUEST["premium_user"].":".$_REQUEST["premium_pass"]) : base64_encode($premium_acc["rs_com"]["user"].":".$premium_acc["rs_com"]["pass"]);
  22. $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), 0, 0, 0, 0, $_GET["proxy"],$pauth, $auth);
  23. is_page($page);
  24. is_present($page,"Account found, but password is incorrect");
  25. is_present($page,"Account not found");
  26. if (stristr($page, "Location:"))
  27. {
  28. $Href = trim(cut_str($page, "Location:","\n"));
  29. $Url = parse_url($Href);
  30. 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"]."&proxy=".($_GET["useproxy"] ? $_GET["proxy"] : "")."&saveto=".$_GET["path"]."&link=".urlencode($LINK).($_GET["add_comment"] == "on" ? "&comment=".urlencode($_GET["comment"]) : "")."&auth=".$auth.($pauth ? "&pauth=$pauth" : ""));
  31. }
  32. else
  33. {
  34. html_error("Cannot use premium account", 0);
  35. }
  36. }
  37. else
  38. {
  39. $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), 0, 0, 0, 0, $_GET["proxy"],$pauth);
  40. is_page($page);
  41. is_present($page,"Due to a violation of our terms of use, the file has been removed from the server.");
  42. is_present($page,"This limit is reached", "This file is neither allocated to a Premium Account, or a Collector's Account, and can therefore only be downloaded 10 times. This limit is reached.");
  43. is_present($page,"This file is suspected to contain illegal content and has been blocked.");
  44. is_present($page,"The file could not be found.", "The file could not be found. Please check the download link.");
  45. is_present($page,"The uploader has removed this file from the server.");
  46. is_present($page,"This file has been removed from the server, because the file has not been accessed in a long time.");
  47. is_present($page,"is momentarily not available", "This server is momentarily not available. We are aware of this and are working to get this resolved.");
  48. is_present($page,"unavailable due to hardware-problems", "Server unavailable due to hardware-problems");
  49. is_present($page, "is already downloading a file","Your IP-address is already downloading a file, Please wait until the download is completed.");
  50. $post = array();
  51. $post["dl.start"] = "Free";
  52. $Href = trim(cut_str($page, '<form action="', '"'));
  53. $refimg = $Href;
  54. $Url = parse_url($Href);
  55. $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : "") ,$LINK , 0, $post, 0, $_GET["proxy"],$pauth);
  56. is_page($page);
  57. is_present($page, "is not allowed to use the free-service anymore today","No more free downloads from this IP today");
  58. is_present($page,"This limit is reached", "This file is neither allocated to a Premium Account, or a Collector's Account, and can therefore only be downloaded 10 times. This limit is reached.");
  59. is_present($page, "This file exceeds your download-limit","Download limit exceeded");
  60. is_present($page, "is already downloading a file","Your IP-address is already downloading a file, Please wait until the download is completed.");
  61. if (stristr($page, "Would you like more?"))
  62. {
  63. $minutes = trim(cut_str($page, "Or try again in about ", "minutes"));
  64. if ($minutes)
  65. {
  66. $countdown2= $minutes*60;
  67. }
  68. else
  69. {
  70. html_error("Download limit exceeded.", 0);
  71. }
  72. }
  73. if(stristr($page, "Too many users downloading right now") || stristr($page, "Too many connections"))
  74. {
  75. html_error("Too many users downloading right now", 0);
  76. }
  77. if($countdown2) {
  78. insert_timer($countdown2, "Plus Wait time for free user.");
  79. $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), 0, 0, 0, 0, $_GET["proxy"],$pauth);
  80. is_page($page);
  81. is_present($page,"Due to a violation of our terms of use, the file has been removed from the server.");
  82. is_present($page,"This limit is reached", "This file is neither allocated to a Premium Account, or a Collector's Account, and can therefore only be downloaded 10 times. This limit is reached.");
  83. is_present($page,"This file is suspected to contain illegal content and has been blocked.");
  84. is_present($page,"The file could not be found.", "The file could not be found. Please check the download link.");
  85. is_present($page,"The uploader has removed this file from the server.");
  86. is_present($page,"This file has been removed from the server, because the file has not been accessed in a long time.");
  87. is_present($page,"is momentarily not available", "This server is momentarily not available. We are aware of this and are working to get this resolved.");
  88. is_present($page,"unavailable due to hardware-problems", "Server unavailable due to hardware-problems");
  89. is_present($page, "is already downloading a file","Your IP-address is already downloading a file, Please wait until the download is completed.");
  90. $post = array();
  91. $post["dl.start"] = "Free";
  92. $Href = trim(cut_str($page, '<form action="', '"'));
  93. $refimg = $Href;
  94. $Url = parse_url($Href);
  95. $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : "") ,$LINK , 0, $post, 0, $_GET["proxy"],$pauth);
  96. is_page($page);
  97. }
  98. $countDown = trim(cut_str($page, "var c=", ";"));
  99. preg_match('%<form name="dlf?".*</form>%s', $page, $form_content);
  100. $middle_str = str_replace("\\", "", preg_replace('/(\' *\+.*?(\r\n)*.*?\'|display:none;)/s', '', $form_content[0]));
  101. $code = '<center>'.trim($middle_str);
  102. $FileAddr = trim(cut_str($code, '<form name="dlf" action="', '"'));
  103. $FileName = basename($FileAddr);
  104. $Url = parse_url($FileAddr);
  105. insert_timer($countDown, "Download-Ticket reserved.");
  106. 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"]."&proxy=".($_GET["useproxy"] ? $_GET["proxy"] : "")."&saveto=".$_GET["path"]."&link=".urlencode($Referer).($_GET["add_comment"] == "on" ? "&comment=".urlencode($_GET["comment"]) : "")."&auth=".$auth.($pauth ? "&pauth=$pauth" : "").(isset($_GET["audl"]) ? "&audl=doum" : ""));
  107. }
  108. // edited by kaox
  109. ?>