PageRenderTime 63ms CodeModel.GetById 29ms RepoModel.GetById 1ms app.codeStats 0ms

/hosts/download/letitbit_net.php

https://github.com/gartz/RapidLeetch
PHP | 197 lines | 164 code | 26 blank | 7 comment | 19 complexity | 55152f76600a18a461712f10253aefc6 MD5 | raw file
  1. <?php
  2. if (!defined('RAPIDLEECH'))
  3. {
  4. require_once("index.html");
  5. exit;
  6. }
  7. if (($_GET ["premium_acc"] == "on" && $_GET ["premium_pass"]) || ($_GET ["premium_acc"] == "on" && $premium_acc ["letitbit"] ["pass"])) {
  8. $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), $LINK, 0, 0, 0, $_GET["proxy"],$pauth);
  9. is_page($page);
  10. is_present($page, "The requested file was not found");
  11. is_present($page, "Gesuchte Datei wurde nicht gefunden", "The requested file was not found");
  12. is_present($page, "Запрашиваемый файл не найден", "The requested file was not found");
  13. $cookie=biscottiDiKaox($page);
  14. $PreForm = cut_str ( $page ,'password here:' ,'</form>' );
  15. $uid5 = cut_str($PreForm,'uid5" value="','"');
  16. $uid = cut_str($PreForm,'uid" value="','"');
  17. $name = cut_str($PreForm,'name="name" value="','"');
  18. $pin = cut_str($PreForm,'pin" value="','"');
  19. $realuid = cut_str($PreForm,'realuid" value="','"');
  20. $realname = cut_str($PreForm,'realname" value="','"');
  21. $host = cut_str($PreForm,'host" value="','"');
  22. $ssserver = cut_str($PreForm,'ssserver" value="','"');
  23. $sssize = cut_str($PreForm,'sssize" value="','"');
  24. $UrlAct="http://letitbit.net/sms/check2.php";
  25. $post['pass']=$_GET ["premium_pass"] ? $_GET ["premium_pass"] : $premium_acc ["letitbit"] ["pass"];
  26. $post['uid5']=$uid5;
  27. $post['uid']=$uid;
  28. $post['name']=$name;
  29. $post['pin']=$pin;
  30. $post['realuid']=$realuid;
  31. $post['realname']=$realname;
  32. $post['host']=$host;
  33. $post['ssserver']=$ssserver;
  34. $post['sssize']=$sssize;
  35. $post['optiondir']='';
  36. $Url=parse_url($UrlAct);
  37. $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), $Referer, $cookie, $post, 0, $_GET["proxy"],$pauth);
  38. is_page($page);
  39. $dlink=slice($page,"Download Master","</table>",3);
  40. $dwnl=slice($dlink,"<a href='","'",1);
  41. $Url = parse_url($dwnl);
  42. $FileName = basename($dwnl);
  43. insert_location("index.php?filename=".urlencode($FileName)."&force_name=".urlencode($FileName)."&host=".$Url["host"]."&port=".$Url["port"]."&path=".urlencode($Url["path"].($Url["query"] ? "?".$Url["query"] : ""))."&referer=".urlencode($Referer)."&cookie=".urlencode($cookie)."&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"]) : "").($pauth ? "&pauth=$pauth" : "").(isset($_GET["audl"]) ? "&audl=doum" : ""));
  44. }else{
  45. if ($_POST['step'] == 1) {
  46. $UrlAct="http://letitbit.net/download3.php";
  47. $post = unserialize(urldecode($_POST["post"]));
  48. $post['uid2']=$post['uid'];
  49. $post['cap']=$_POST["captcha"];
  50. $cookie = urldecode($_POST['cookie']);
  51. $Url = parse_url($UrlAct);
  52. $Referer = "http://letitbit.net/download4.php";
  53. $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), $Referer, $cookie, $post, 0, $_GET["proxy"],$pauth);
  54. is_page($page);
  55. if(preg_match('/http:\/\/\w{2}\.[^"\']+/', $page, $nextPageArray))
  56. {
  57. $nextPage = $nextPageArray[0];
  58. $Url=parse_url($nextPage);
  59. $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), $UrlAct, $cookie, 0, 0, $_GET["proxy"],$pauth);
  60. $wait = cut_str ( $page ,'y = ' ,';' );
  61. $act2 = cut_str ( $page ,'window.location.href="' ,'"' );
  62. $Url=parse_url($act2);
  63. insert_timer($wait);
  64. $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), $act, $cookie, 0, 0, $_GET["proxy"],$pauth);
  65. }
  66. else
  67. {
  68. html_error("Could not find frame.", 0);
  69. }
  70. $snap = cut_str ( $page ,'id="links' ,'</div>' );
  71. $dwn= cut_str ( $snap ,'href="' ,'"' );
  72. $Url = parse_url($dwn);
  73. $FileName = basename($Url["path"]);
  74. insert_location("index.php?filename=".urlencode($FileName)."&force_name=".urlencode($FileName)."&host=".$Url["host"]."&port=".$Url["port"]."&path=".urlencode($Url["path"].($Url["query"] ? "?".$Url["query"] : ""))."&referer=".urlencode($Referer)."&cookie=".urlencode($cookie)."&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"]) : "").($pauth ? "&pauth=$pauth" : "").(isset($_GET["audl"]) ? "&audl=doum" : ""));
  75. } else {
  76. $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), 0, 0, 0, 0, $_GET["proxy"],$pauth);
  77. is_page($page);
  78. $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), $LINK, 0, 0, 0, $_GET["proxy"],$pauth);
  79. is_page($page);
  80. is_present($page, "The requested file was not found");
  81. is_present($page, "Gesuchte Datei wurde nicht gefunden", "The requested file was not found");
  82. is_present($page, "Запрашиваемый файл не найден", "The requested file was not found");
  83. $cookie=biscottiDiKaox($page);
  84. $FreeForm = cut_str ( $page ,'id="dvifree">' ,'</form>' );
  85. $act = "http://".cut_str ( $page ,'form action="http://' ,'"' );
  86. $uid = slice($FreeForm,'name="uid" value="','"',2);
  87. $md5crypt = cut_str($FreeForm,'="md5crypt" value="','"');
  88. // $uid2 = cut_str($FreeForm,'name="uid2" value="','"');
  89. $uid5 = cut_str($FreeForm,'name="uid5" value="','"');
  90. $name = cut_str($FreeForm,'name="name" value="','"');
  91. $pin = cut_str($FreeForm,' name="pin" value="','"');
  92. $realuid = cut_str($FreeForm,'e="realuid" value="','"');
  93. $realname = cut_str($FreeForm,'="realname" value="','"');
  94. $host = cut_str($FreeForm,'name="host" value="','"');
  95. $ssserver = cut_str($FreeForm,'="ssserver" value="','"');
  96. $sssize = cut_str($FreeForm,'me="sssize" value="','"');
  97. $post['uid']=$uid;
  98. $post['md5crypt']=$md5crypt;
  99. $post['frameset']='Download file';
  100. // $post['uid2']=$uid2;
  101. $post['uid5']=$uid5;
  102. // $post['uid']=$uid2;
  103. $post['name']=$name;
  104. $post['pin']=$pin;
  105. $post['realuid']=$realuid;
  106. $post['realname']=$realname;
  107. $post['host']=$host;
  108. $post['ssserver']=$ssserver;
  109. $post['sssize']=$sssize;
  110. $post['optiondir']='';
  111. $post['fix']='1';
  112. $Url=parse_url($act);
  113. $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), $LINK, $cookie, $post, 0, $_GET["proxy"],$pauth);
  114. $cookie.= " ".GetCookies($page);
  115. if (stristr($page,"cap.php?"))
  116. {
  117. $imagecode = cut_str($page,"<img src='http://letitbit.net/cap.php?jpg=","'");
  118. $img = 'http://letitbit.net/cap.php?jpg='.$imagecode;
  119. $Url = parse_url($img);
  120. $page = geturl($Url["host"], $Url["port"] ? $Url["port"] : 80, $Url["path"].($Url["query"] ? "?".$Url["query"] : ""), $LINK, $cookie, 0, 0, $_GET["proxy"],$pauth);
  121. $headerend = strpos($page,"\r\n\r\n");
  122. $pass_img = substr($page,$headerend+9);
  123. write_file($options['download_dir']."letitbit_captcha.jpg", $pass_img);
  124. $code = '<form method="post" action="'.$PHP_SELF.(isset($_GET["audl"]) ? "?audl=doum" : "").'">'.$nn;
  125. $code .= '<input type="hidden" name="link" value="'.urlencode($LINK).'">'.$nn;
  126. $code .= '<input type="hidden" name="post" value="'.urlencode(serialize($post)).'">'.$nn;
  127. $code .= '<input type="hidden" name="step" value="1">'.$nn;
  128. $code .= '<input type="hidden" name="cookie" value="'.urlencode($cookie).'">'.$nn;
  129. $code .= 'Please enter : <img src="'.$options['download_dir'].'letitbit_captcha.jpg?'.rand(1,10000).'"><br><br>'.$nn;
  130. $code .= '<input type="text" name="captcha"> <input type="submit" value="Download">'.$nn;
  131. $code .= '</form>';
  132. echo $code;
  133. }
  134. else
  135. {
  136. html_error("Image code not found", 0);
  137. }
  138. }
  139. }
  140. function biscottiDiKaox($content)
  141. {
  142. preg_match_all("/Set-Cookie: (.*)\n/",$content,$matches);
  143. foreach ($matches[1] as $coll) {
  144. $bis0=split(";",$coll);
  145. $bis1=$bis0[0]."; ";
  146. $bis2=split("=",$bis1);
  147. $cek=" ".$bis2[0]."=";
  148. if(strpos($bis1,"=deleted") || strpos($bis1,$cek.";")) {
  149. }else{
  150. if (substr_count($bis,$cek)>0)
  151. {$patrn=" ".$bis2[0]."=[^ ]+";
  152. $bis=preg_replace("/$patrn/"," ".$bis1,$bis);
  153. } else {$bis.=$bis1;}}}
  154. $bis=str_replace(" "," ",$bis);
  155. return rtrim($bis);
  156. }
  157. // tweaked cutstr with pluresearch functionality
  158. function slice($str, $left, $right,$cont=1)
  159. {
  160. for($iii=1;$iii<=$cont;$iii++){
  161. $str = substr ( stristr ( $str, $left ), strlen ( $left ) );
  162. }
  163. $leftLen = strlen ( stristr ( $str, $right ) );
  164. $leftLen = $leftLen ? - ($leftLen) : strlen ( $str );
  165. $str = substr ( $str, 0, $leftLen );
  166. return $str;
  167. }
  168. /*************************\
  169. WRITTEN BY KAOX 05-dec-09
  170. \*************************/
  171. ?>