Advertisement
Titeuf

RL Plugin DL cloudcache.cc member Prenium

Mar 17th, 2012
147
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.76 KB | None | 0 0
  1. Instructions :
  2. 1 - Upload to your ftp in:
  3. host/download/
  4.  
  5. 2 - Edit and Add this to your account.php:
  6. $premium_acc ["cloudcache_cc"] = array ('user' => 'username', 'pass' => 'yourpass');
  7.  
  8. 3 - Enjoy
  9.  
  10. ------------------------------------------------------------------------------------
  11.  
  12. <?php
  13. if (!defined('RAPIDLEECH')) {
  14. require_once ('index.html');
  15. exit();
  16. }
  17.  
  18. class cloudcache_cc extends DownloadClass {
  19.  
  20. public function Download($link) {
  21. global $premium_acc;
  22.  
  23. if (!$_REQUEST['step']) {
  24. $this->page = $this->GetPage($link, "lang=english");
  25. is_present($this->page, "The file you were looking for could not be found, sorry for any inconvenience.");
  26. $this->cookie = "lang=english";
  27. }
  28. if ($_REQUEST['premium_acc'] == 'on' && (($_REQUEST['premium_user'] && $_REQUEST['premium_pass'])||($premium_acc['cloudcache_cc']['user'] && $premium_acc['cloudcache_cc']['pass']))) {
  29. return $this->Premium($link);
  30. } elseif ($_REQUEST['step'] == 'passpre') {
  31. return $this->Premium($link, 1);
  32. } else {
  33. html_error('This plugin only support premium account!');
  34. }
  35. }
  36.  
  37. private function Premium($link, $password = 0) {
  38. if ($password == 1) {
  39. $post['op'] = $_POST['op'];
  40. $post['id'] = $_POST['id'];
  41. $post['rand'] = $_POST['rand'];
  42. $post['referer'] = $_POST['referer'];
  43. $post['method_free'] = '';
  44. $post['method_premium'] = $_POST['method_premium'];
  45. $post['password'] = $_POST['password'];
  46. $post['down_direct'] = $_POST['down_direct'];
  47. $cookie = decrypt(urldecode($_POST['cookie']));
  48. $link = urldecode($_POST['link']);
  49. $page = $this->GetPage($link, $cookie, $post, $link);
  50. } else {
  51. $cookie = $this->login();
  52. $page = $this->GetPage($link, $cookie);
  53. }
  54. if (!preg_match('@http:\/\/[\d.]+\/files\/[^\r\n"]+@', $page, $dl)) {
  55. $form = cut_str($page, '<Form name="F1" method="POST"', '</Form>');
  56. if (!preg_match_all('%<input type="hidden" name="([^"]+)" value="([^"]+)?">%', $form, $match)) html_error('Error [Post Data PREMIUM not found!]');
  57. $match = array_combine($match[1], $match[2]);
  58. if (stripos($form, 'Password:')) {
  59. if (stripos($page, 'Wrong password')) echo ("<center><font color='red'><b>Wrong Password File Entered!</b></font></center>");
  60. $data = array_merge($this->DefaultParamArr($link, encrypt($cookie)), $match);
  61. $data['step'] = 'passpre';
  62. $this->EnterPassword($data);
  63. exit();
  64. }
  65. $post = array();
  66. foreach ($match as $k => $v) {
  67. $post[$k] = $v;
  68. }
  69. $page = $this->GetPage($link, $cookie, $post, $link);
  70. if (!preg_match('@http:\/\/[\d.]+\/files\/[^"]+@', $page, $dl)) html_error('Error [Download Link PREMIUM not found!]');
  71. }
  72. $dlink = trim($dl[0]);
  73. $filename = basename(parse_url($dlink, PHP_URL_PATH));
  74. $this->RedirectDownload($dlink, $filename, $cookie, 0, $link);
  75. }
  76.  
  77. private function login() {
  78. global $premium_acc;
  79.  
  80. $user = ($_REQUEST["premium_user"] ? trim($_REQUEST["premium_user"]) : $premium_acc ["cloudcache_cc"] ["user"]);
  81. $pass = ($_REQUEST["premium_pass"] ? trim($_REQUEST["premium_pass"]) : $premium_acc ["cloudcache_cc"] ["pass"]);
  82. if (empty($user) || empty($pass)) html_error("Login failed, username or password is empty!");
  83.  
  84. $posturl = 'http://www.cloudcache.cc/';
  85. $post['op'] = 'login';
  86. $post['redirect'] = $posturl;
  87. $post['login'] = $user;
  88. $post['password'] = $pass;
  89. $post['x'] = rand(11,64);
  90. $post['y']= rand(11, 23);
  91. $check = $this->GetPage($posturl, $this->cookie, $post, $posturl."login.html");
  92. is_present($check, 'Incorrect Login or Password');
  93. $cookie = $this->cookie ."; " . GetCookies($check);
  94.  
  95. //check account
  96. $check = $this->GetPage($posturl."?op=my_account", $cookie, 0, $posturl);
  97. is_notpresent($check, '<TD>Username:</TD>', 'Invalid Account!');
  98. is_notpresent($check, '<TD>Premium account expire:</TD>', 'Account Type : FREE');
  99.  
  100. return $cookie;
  101. }
  102.  
  103. private function EnterPassword($inputs) {
  104. global $PHP_SELF;
  105. if (!is_array($inputs)) {
  106. html_error("Error parsing password data.");
  107. }
  108. echo "\n" . '<center><form action="' . $PHP_SELF . '" method="post" >' . "\n";
  109. foreach ($inputs as $name => $input) {
  110. echo "<input type='hidden' name='$name' id='$name' value='$input' />\n";
  111. }
  112. echo '<h4>Enter password here: <input type="text" name="password" id="filepass" size="13" /> <input type="submit" onclick="return check()" value="Submit" /></h4>' . "\n";
  113. echo "<script type='text/javascript'>\nfunction check() {\nvar pass=document.getElementById('filepass');\nif (pass.value == '') { window.alert('You didn\'t enter the password'); return false; }\nelse { return true; }\n}\n</script>\n";
  114. echo "\n</form></center>\n</body>\n</html>";
  115. exit();
  116. }
  117. }
  118.  
  119. /*
  120. * Clodcache.cc Download Plugin Only for Prenium Member
  121. * Written by Titeuf 17-03-2012
  122. * thank you to Ruud v.Tony for help
  123. * Instructions :
  124. * Add this to your account.php:
  125. * $premium_acc["cloudcache_cc"] = array('user' => 'username', 'pass' => 'yourpass');
  126. */
  127. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement