Advertisement
Titeuf

RL Fiberupload [DL] Member Prenium

Mar 19th, 2012
615
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 6.64 KB | None | 0 0
  1. Hi,
  2.  
  3. Instructions :
  4.  
  5. 1 - Upload to your ftp in:
  6. host/download/
  7.  
  8. 2 - Edit and Add this to your account.php:
  9. $premium_acc ["FiberUpload_com"] = array ('user' => 'username', 'pass' => 'yourpass');
  10.  
  11. 3 - Enjoy
  12.  
  13. ----------------------------------------------------------------------------------------
  14.  
  15.  
  16. <?php
  17. if (!defined('RAPIDLEECH')) {
  18. require_once ('index.html');
  19. exit();
  20. }
  21.  
  22. class fiberupload_com extends DownloadClass {
  23.  
  24. public function Download($link) {
  25. global $premium_acc;
  26.  
  27. if (!$_REQUEST['step']) {
  28. $this->page = $this->GetPage($link, "lang=english");
  29. is_present($this->page, "The file you were looking for could not be found, sorry for any inconvenience.");
  30. }
  31. if ($_REQUEST['premium_acc'] == 'on' && (($_REQUEST['premium_user'] && $_REQUEST['premium_pass'])||($premium_acc['fiberupload_com']['user'] && $premium_acc['fiberupload_com']['pass']))) {
  32. return $this->Premium($link);
  33. } else {
  34. return $this->Free($link);
  35. }
  36. }
  37.  
  38. private function Free($link) {
  39. if ($_REQUEST['down_direct'] == '1') {
  40. $link = urldecode($_POST['link']);
  41.  
  42. $post = array();
  43. $post['op'] = $_POST['op'];
  44. $post['id'] = $_POST['id'];
  45. $post['rand'] = $_POST['rand'];
  46. $post['referer'] = $link;
  47. $post['method_free'] = $_POST['method_free'];
  48. $post['method_premium'] = '';
  49. $post['recaptcha_challenge_field'] = $_POST['challenge'];
  50. $post['recaptcha_response_field'] = $_POST['captcha'];
  51. $page = $this->GetPage($link, "lang=english", $post, $link);
  52. } else {
  53. $form = cut_str($this->page, '<Form method="POST" action=\'\'>', "</Form>");
  54. if (!preg_match_all('@<input type="hidden" name="([^"]+)" value="([^"]+)?">@', $form, $one) || !preg_match_all('@<input type="submit" name="(\w+_free)" value="([^"]+)" >@', $form, $two)) html_error("Error: Post Data 1 [FREE] not found!");
  55. $match = array_merge(array_combine($one[1], $one[2]), array_combine($two[1], $two[2]));
  56. $post = array();
  57. foreach ($match as $key => $value) {
  58. $post[$key] = $value;
  59. }
  60. $page = $this->GetPage($link, "lang=english", $post, $link);
  61. }
  62. if (strpos($page, "Type the two words:")) {
  63. $form = cut_str($page, '<Form name="F1" method="POST"', '</Form>');
  64. is_present($form, 'Password', 'This file is password protected!');
  65. if (!preg_match('@(\d+)<\/span> seconds@', $form, $wait)) html_error("Error: Timer not found!");
  66. $this->CountDown($wait[1]);
  67. if (!preg_match_all('@<input type="hidden" name="([^"]+)" value="([^"]+)?">@', $form, $match)) html_error("Error: Post Data 2 [FREE] not found!");
  68. if (!preg_match('@\/api\/challenge\?k=([^"]+)">@', $form, $cap)) html_error("Error: Captcha Key found!");
  69.  
  70. $ch = cut_str($this->GetPage("http://www.google.com/recaptcha/api/challenge?k=$cap[1]"), "challenge : '", "'");
  71. $capt = $this->GetPage("http://www.google.com/recaptcha/api/image?c=" . $ch);
  72. $capt_img = substr($capt, strpos($capt, "\r\n\r\n") + 4);
  73. $imgfile = DOWNLOAD_DIR . "fiberupload_captcha.jpg";
  74.  
  75. if (file_exists($imgfile)) unlink($imgfile);
  76. if (empty($capt_img) || !write_file($imgfile, $capt_img)) html_error("Error getting CAPTCHA image.", 0);
  77. // Captcha img downloaded
  78. $data = array_merge($this->DefaultParamArr($link), array_combine($match[1], $match[2]));
  79. $data['challenge'] = $ch;
  80. $this->EnterCaptcha($imgfile, $data, 20);
  81. exit();
  82. }
  83. is_present($page, cut_str($page, '<div class="err">', '<br>'));
  84. if (!preg_match('@http:\/\/[\d.]+(:\d+)?\/[^|\r|\n|"]+@', $page, $dl)) html_error("Error: Download Link [FREE] not found!");
  85. $dlink = trim($dl[0]);
  86. $filename = basename(parse_url($dlink, PHP_URL_PATH));
  87. $this->RedirectDownload($dlink, $filename, 0, 0, $link);
  88. exit();
  89. }
  90.  
  91. private function Premium($link) {
  92.  
  93. $cookie = $this->login();
  94. $page = $this->GetPage($link, $cookie, 0, $link);
  95. if (!preg_match('/http:\/\/[\w.]+(:\d+)?\/d\/[^\r\n]+/', $page, $dl)) {
  96. $form = cut_str($page, '<Form name="F1" method="POST"', '</Form>');
  97. is_present($form, 'Password', 'This file is password protected!');
  98. if (!preg_match_all('%<input type="hidden" name="([^"]+)" value="([^"]+)?">%', $form, $ck)) html_error('Error [Post Data PREMIUM not found!]');
  99. $match = array_combine($ck[1], $ck[2]);
  100. $post = array();
  101. foreach ($match as $k => $v) {
  102. $post[$k] = $v;
  103. }
  104. $page = $this->GetPage($link, $cookie, $post, $link);
  105. if (!preg_match('/http:\/\/[\w.]+(:\d+)?\/d\/[^\r\n"]+/', $page, $dl)) html_error('Error [Download Link PREMIUM not found!]');
  106. }
  107. $dlink = trim($dl[0]);
  108. $filename = basename(parse_url($dlink, PHP_URL_PATH));
  109. $this->RedirectDownload($dlink, $filename, $cookie, 0, $link);
  110. }
  111.  
  112. private function login() {
  113. global $premium_acc;
  114.  
  115. $user = ($_REQUEST["premium_user"] ? trim($_REQUEST["premium_user"]) : $premium_acc ["fiberupload_com"] ["user"]);
  116. $pass = ($_REQUEST["premium_pass"] ? trim($_REQUEST["premium_pass"]) : $premium_acc ["fiberupload_com"] ["pass"]);
  117. if (empty($user) || empty($pass)) html_error("Login failed, $user [user] or $pass [password] is empty!");
  118.  
  119. $url = 'http://fiberupload.com/';
  120. $post['op'] = 'login';
  121. $post['redirect'] = $url;
  122. $post['login'] = $user;
  123. $post['password'] = $pass;
  124. $page = $this->GetPage($url, 'lang=english', $post, $url."login.html");
  125. is_present($page, cut_str($page, "<b class='err'>", "</b>"));
  126. $cookie = GetCookies($page).'; lang=english';
  127.  
  128. //check account
  129. $page = $this->GetPage($url."?op=my_account", $cookie, 0, $url);
  130. is_notpresent($page, '<TD>Username:</TD>', 'Invalid account!');
  131. is_notpresent($page, '<TD>Premium account expire:</TD>', 'Account not premium???');
  132.  
  133. return $cookie;
  134. }
  135. }
  136.  
  137. /*
  138. * FiberUpload.com Download Plugin Only for Prenium Member
  139. * Written by Titeuf 19-03-2012
  140. *
  141. * Instructions :
  142. * Add this to your account.php:
  143. * $premium_acc["fiberupload_com"] = array('user' => 'username', 'pass' => 'yourpass');
  144. */
  145. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement