Skip to content

Commit

Permalink
[FEATURE] Small fix in configs/setup.php for secretkey options (my ba…
Browse files Browse the repository at this point in the history
…d, sorry mate!)

[PLUGIN] Add new dev-host.org, cyberlocker.ch, update zippyshare.com (Th3-822), filesmonster.com, nowvideo.eu, download plugin
  • Loading branch information
ruudvtony committed Mar 19, 2013
1 parent 36c3a6f commit 493cf87
Show file tree
Hide file tree
Showing 8 changed files with 313 additions and 119 deletions.
4 changes: 3 additions & 1 deletion configs/accounts.php
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
//$premium_acc["depositfiles_com"] = array('user' => 'your username', 'pass' => 'your password');
//$premium_acc["crocko_com"] = array('user' => 'your username', 'pass' => 'your password');
//$premium_acc["hotfile_com"] = array('user' => 'your username', 'pass' => 'your password');
//$premium_acc["ifile_it"] = array('user' => 'your username', 'pass' => 'your password');
//$premium_acc["filecloud_io"] = array('user' => 'your username', 'pass' => 'your password');
//$premium_acc["uploading_com"] = array('user' => 'your username', 'pass' => 'your password');
//$premium_acc["ugotfile_com"] = array('user' => 'your username', 'pass' => 'your password');
//$premium_acc["freakshare_com"] = array('user' => 'your username', 'pass' => 'your password');
Expand Down Expand Up @@ -54,6 +54,8 @@
//$premium_acc ["necroupload_com"] = array('user' => 'your username', 'pass' => 'your password');
//$premium_acc ["filemates_com"] = array('user' => 'your username', 'pass' => 'your password');
//$premium_acc ["luckyshare_net"] = array('user' => 'your username', 'pass' => 'your password');
//$premium_acc ["cyberlocker_ch"] = array('user' => 'your username', 'pass' => 'your password');
//$premium_acc ["nowvideo_eu"] = array('user' => 'your username', 'pass' => 'your password');

###Premium cookie configuration, dont use this if you have already set another premium account config
//$premium_acc["hotfile_com"] = array('cookie' => 'your premium cookie');
Expand Down
2 changes: 1 addition & 1 deletion configs/setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ function array_trim(&$v) { $v = trim($v); }
$opt = (strpos($opt, "\r\n") === false ? str_replace(array("\r", "\n"), "\r\n", $opt) : $opt);
$opt = "<?php\r\n if (!defined('RAPIDLEECH')) { require_once('index.html'); exit; }\r\n\r\n\$options = ".
$opt.
"; \r\n\r\n\$secretkey = \$options['secretkey'];\r\n\r\nrequire_once('site_checker.php');\r\nrequire_once('accounts.php');\r\n?>";
"; \r\n\r\nrequire_once('site_checker.php');\r\nrequire_once('accounts.php');\r\n\r\n\$secretkey = \$options['secretkey'];\r\n?>";
if (!@write_file(CONFIG_DIR."config.php", $opt, 1)) { echo '<div class="div_error">It was not possible to write the configuration<br />Set permissions of "configs" folder to 0777 and try again</div>'; }
else {
if (is_file(CONFIG_DIR.'config_old.php')) { if (@!unlink(CONFIG_DIR.'config_old.php') && is_file(CONFIG_DIR.'config_old.php')) { '<div class="div_message">It was not possible to delete the old configuration.<br />Manually delete "configs/config_old.php"</div><br />'; } }
Expand Down
103 changes: 103 additions & 0 deletions hosts/download/cyberlocker_ch.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,103 @@
<?php
if (!defined('RAPIDLEECH')) {
require_once 'index.html';
exit;
}

class cyberlocker_ch extends DownloadClass {

public function Download($link) {
global $premium_acc;

if (!$_REQUEST['step']) {
$this->cookie = array('lang' => 'english');
$this->page = $this->GetPage($link, $this->cookie);
is_present($this->page, 'HTTP/1.1 502 Bad Gateway', 'Unknown Error from cyberlocker.ch');
is_present($this->page, 'The file you were looking for could not be found, sorry for any inconvenience.');
}
$this->link = $link;
if ($_REQUEST['premium_acc'] == 'on' && (($_REQUEST['premium_user'] && $_REQUEST['premium_pass']) || ($premium_acc['cyberlocker_ch']['user'] && $premium_acc['cyberlocker_ch']['pass']))) {
return $this->Premium();
} else {
return $this->Free();
}
}

private function Free() {
$form = cut_str($this->page, '<Form method="POST" action=\'\'>', '</Form>');
if (!preg_match_all('/type="hidden" name="([^"]+)" value="([^"]+)?"/', $form, $one) || !preg_match_all('/type="submit" name="(\w+_free)" value="([^"]+)"/', $form, $two)) html_error('Error[Form Post Data 1 FREE not found!]');
$match = array_merge(array_combine($one[1], $one[2]), array_combine($two[1], $two[2]));
$post = array();
foreach ($match as $key => $value) {
$post[$key] = $value;
}
$page = $this->GetPage($this->link, $this->cookie, $post, $this->link);
unset($post);
$form = cut_str($page, '<Form name="F1" method="POST" action="">', '</Form>');
$form = str_replace('<input type="hidden" name="op" value="register_save">', '', $form);
if (!preg_match_all('/type="(hidden|text|password)" name="([^"]+)" value="([^"]+)?"/', $form, $match)) html_error('Error[Post Data 2 - FREE not found!]');
$match = array_combine($match[2], $match[3]);
$post = array();
foreach ($match as $key => $value) {
$post[$key] = $value;
}
$page = $this->GetPage($this->link, $this->cookie, $post, $this->link);
if (!preg_match('/Location: (https?:\/\/[^\r\n]+)/i', $page, $dl)) html_error('Error[Download Link FREE not found!]');
$dlink = trim($dl[1]);
$filename = basename(parse_url($dlink, PHP_URL_PATH));
$this->RedirectDownload($dlink, $filename, $this->cookie, 0, $this->link);
}

private function Premium() {

$cookie = $this->login();
$page = $this->GetPage($this->link, $cookie);
if (!preg_match('/Location: (https?:\/\/[^\r\n]+)/i', $page, $dl)) {
$form = cut_str($page, '<Form name="F1" method="POST" action="">', '</Form>');
if (!preg_match_all('/type="hidden" name="([^"]+)" value="([^"]+)?"/', $form, $match)) html_error('Error[Post Data - PREMIUM not found!]');
$match = array_combine($match[1], $match[2]);
$post = array();
foreach ($match as $key => $value) {
$post[$key] = $value;
}
$page = $this->GetPage($this->link, $cookie, $post, $this->link);
if (!preg_match('/Location: (https?:\/\/[^\r\n]+)/i', $page, $dl)) html_error('Error[Download Link PREMIUM not found!]');
}
$dlink = trim($dl[1]);
$filename = basename(parse_url($dlink, PHP_URL_PATH));
$this->RedirectDownload($dlink, $filename, $cookie);
}

private function login() {
global $premium_acc;

$user = ($_REQUEST["premium_user"] ? trim($_REQUEST["premium_user"]) : $premium_acc ["cyberlocker_ch"] ["user"]);
$pass = ($_REQUEST["premium_pass"] ? trim($_REQUEST["premium_pass"]) : $premium_acc ["cyberlocker_ch"] ["pass"]);
if (empty($user) || empty($pass)) html_error("Login failed, $user [user] or $pass [password] is empty!");

$posturl = 'http://cyberlocker.ch/';
$post['op'] = 'login';
$post['redirect'] = '';
$post['login'] = $user;
$post['password'] = $pass;
$page = $this->GetPage($posturl, $this->cookie, $post, $posturl);
is_present($page, 'Incorrect Login or Password');
$cookie = GetCookiesArr($page, $this->cookie);

//check account
$page = $this->GetPage($posturl . '?op=my_account', $cookie);
is_notpresent($page, '>Premium account expire:<', 'Error[Account isn\'t premium!]');

return $cookie;
}

public function CheckBack($header) {
is_present($header, 'HTTP/1.1 502 Bad Gateway', 'Unknown Error from Cyberlocker.ch');
}

}

/*
* Written by Tony Fauzi Wihana/Ruud v.Tony 05/03/2013
*/
?>
26 changes: 26 additions & 0 deletions hosts/download/d_h_st.php
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
<?php
if (!defined('RAPIDLEECH')) {
require_once ('index.html');
exit();
}

class d_h_st extends DownloadClass {

public function Download($link) {

$link = preg_replace('/\/((www\.)?dev-host\.org)\//', '/d-h.st/', $link);
$page = $this->GetPage($link);
is_present($page, 'The file you were looking for could not be found, sorry for any inconvenience.');
if (!preg_match("/href='(https?:\/\/[^\r\n\s\t']+)'\">Download/", $page, $dl)) html_error('Error[FREE - Download link not found!]');
$dlink = trim($dl[1]);
$filename = basename(parse_url($dlink, PHP_URL_PATH));
$this->RedirectDownload($dlink, $filename, 0, 0, $link);
}

}

/*
* Dev-host.org free download plugin by Ruud v.Tony 04-10-2011
* Updated as they change their domain by Tony Fauzi Wihana/Ruud v.Tony 15/03/2013
*/
?>
222 changes: 119 additions & 103 deletions hosts/download/filesmonster_com.php
Original file line number Diff line number Diff line change
@@ -1,121 +1,137 @@
<?php
if (!defined('RAPIDLEECH')) {
require_once("index.html");
exit;
require_once("index.html");
exit;
}

class filesmonster_com extends DownloadClass {

public function Download($link) {
global $premium_acc;
if ($_REQUEST['premium_acc'] == 'on' && (($_REQUEST['premium_user'] && $_REQUEST['premium_pass']) || ($premium_acc['filesmonster_com']['user'] && $premium_acc['filesmonster_com']['pass']))) {
$this->Premium($link);
} elseif ($_POST['step'] == '1') {
$this->DownloadFree($link);
} else {
$this->Retrieve($link);
}
}
public function Download($link) {
global $premium_acc;

private function Retrieve($link) {
$page = $this->GetPage($link);
is_present($page, "File was deleted");
is_present($page, "You need Premium membership to download files larger than 1.0 GB.");
//check the file size
$flsize = cut_str($page, 'File size:</td>', '</tr>');
preg_match('/(\d+)\.([0-9]) MB/', $flsize, $match);
if (($match[0]) > 100) {
html_error("You need to split the file first directly from filesmonster, well it's a risk of free download, sorry!");
} else {
$freeform = cut_str($page, "<form id='slowdownload'", "</form>");
if (preg_match('#method="post" action="(.*)">#', $freeform, $fl)) {
$link = $fl[1];
}
$page = $this->GetPage($link);
$id = cut_str($page, "reserve_ticket('","')");
$match = cut_str($page, "action: '","'");
$page = $this->GetPage("http://filesmonster.com".$id);
$dlcode = cut_str($page, '"dlcode":"','"');
$link = "http://filesmonster.com".$match.$dlcode;
$page = $this->GetPage($link);
if (preg_match('/Next free download will be available in (\d+) min/', $page, $msg)) {
html_error($msg[0]);
}
if (stristr($page, "Enter Captcha code below")) {
$k = cut_str($page, 'recaptcha.net/challenge?k=', '"');
$page = $this->GetPage("http://www.google.com/recaptcha/api/challenge?k=" . $k);
$ch = cut_str($page, "challenge : '", "'");
$img = "http://www.google.com/recaptcha/api/image?c=".$ch;
$page = $this->GetPage($img);
$capt_img = substr($page, strpos($page, "\r\n\r\n") + 4);
$imgfile = DOWNLOAD_DIR."filesmonster.jpg";
if (file_exists($imgfile)) {
unlink($imgfile);
}
write_file($imgfile, $capt_img);
if (!$_REQUEST['step']) {
$this->cookie = array('yab_mylang' => 'en');
$this->page = $this->GetPage($link, $this->cookie);
is_present($this->page, 'File not found');
$this->cookie = GetCookiesArr($this->page, $this->cookie);
}
$this->link = $link;
if ($_REQUEST['premium_acc'] == 'on' && (($_REQUEST['premium_user'] && $_REQUEST['premium_pass']) || ($premium_acc['filesmonster_com']['user'] && $premium_acc['filesmonster_com']['pass']))) {
return $this->Premium();
} else {
return $this->Free();
}
}

$data = $this->DefaultParamArr($link);
$data['step'] = "1";
$data['recaptcha_challenge_field'] = $ch;
$this->EnterCaptcha($imgfile, $data, 20);
exit();
}
}
}
private function Free() {
if ($_REQUEST['step'] == '1') {
$this->link = urldecode($_POST['link']);
$this->cookie = urldecode($_POST['cookie']);

private function DownloadFree($link) {
$post = array();
$post['recaptcha_challenge_field'] = $_POST['recaptcha_challenge_field'];
$post['recaptcha_response_field'] = $_POST['captcha'];
$page = $this->GetPage($link, 0, $post, $link);
if (stristr($page, "Please wait")) {
preg_match("%<span id='sec'>(\d+)</span>%", $page, $wait);
$this->CountDown($wait[1]);
}
$tlink = cut_str($page, "get_link('","')");
$tlink = "http://filesmonster.com".$tlink;
$page = $this->GetPage($tlink, 0, 0, $link);
$dlink = cut_str($page, '"url":"','"');
if (!$dlink) html_error("Error, Free Download link not found");
$dlink = str_replace("\/", "/", $dlink);
$Url = parse_url($dlink);
$FileName = basename($Url['path']);
$this->RedirectDownload($dlink, $FileName, 0, 0, $link);
exit();
}
$post = array();
$post['recaptcha_challenge_field'] = $_POST['recaptcha_challenge_field'];
$post['recaptcha_response_field'] = $_POST['recaptcha_response_field'];
$page = $this->GetPage($this->link, $this->cookie, $post);
} else {
is_present($this->page, "You need Premium membership to download files larger than 1.0 GB.");
//check the file size
$flsize = cut_str($this->page, 'File size:</td>', '</tr>');
preg_match('/(\d+\.\d+) MB/', $flsize, $match);
if (round($match[0]) > 100) html_error("Error[You need to split the file first directly from filesmonster!]");
$freeform = cut_str($this->page, "<form id='slowdownload'", "</form>");
if (!preg_match('/action="([^\r\n\s\t"]+)"/', $freeform, $fl)) html_error('Error[Free link 1 not found!]');
$page = $this->GetPage('http://filesmonster.com' . $fl[1], $this->cookie, array(), $this->link);
$this->cookie = GetCookiesArr($page, $this->cookie);
$rfturl = cut_str($page, "rftUrl = '", "'");
$step2url = cut_str($page, "step2UrlTemplate = '", "'");
$page = $this->GetPage('http://filesmonster.com' . $rfturl, $this->cookie, 0, 'http://filesmonster.com' . $fl[1]);
$this->cookie = GetCookiesArr($page, $this->cookie);
$step2url = str_replace('!!!', cut_str($page, '"dlcode":"', '"'), $step2url);
$this->link = "http://filesmonster.com" . $step2url;
$page = $this->GetPage($this->link, $this->cookie, array(), 'http://filesmonster.com' . $rfturl);
}
if (preg_match('/Next free download will be available in (\d+) min/', $page, $msg)) html_error($msg[0]);
if (stripos($page, "Enter Captcha code below")) {
if (stripos($page, cut_str($page, '<p class="error">', '</p>'))) echo "<center><font color='red'><b>Wrong captcha text or captcha expired</b></font></center>";
if (!preg_match('/\/challenge\?k=([^"]+)"/', $page, $c)) html_error('Error[Captcha Data not found!]');

private function Premium($link) {
global $premium_acc;
$data = $this->DefaultParamArr($this->link, $this->cookie);
$data['step'] = "1";
$this->Show_reCaptcha($c[1], $data);
exit();
}
if (!preg_match("/<span id='sec'>(\d+)<\/span>/", $page, $w)) html_error('Error[Timer not found!]');
$this->CountDown($w[1]);
if (!preg_match("/get_link\('([^\r\n\s\t']+)'\)/", $page, $get_link)) html_error('Error[Free Link 2 not found!]');
$page = $this->GetPage('http://filesmonster.com' . $get_link[1], $this->cookie, 0, $this->link);
$dlink = cut_str($page, '"url":"', '"');
if (!$dlink) html_error("Error, Free Download link not found");
$dlink = str_replace("\/", "/", $dlink);
$FileName = basename(parse_url($dlink, PHP_URL_PATH));
$this->RedirectDownload($dlink, $FileName, $this->cookie, 0, $this->link);
}

$post = array();
$post['act'] = "login";
$post['user'] = $_REQUEST["premium_user"] ? trim($_REQUEST["premium_user"]) : $premium_acc ["filesmonster_com"] ["user"];
$post['pass'] = $_REQUEST["premium_pass"] ? trim($_REQUEST["premium_pass"]) : $premium_acc ["filesmonster_com"] ["pass"];
$post['login'] = "Login";
$page = $this->GetPage("http://filesmonster.com/login.php", 0, $post, "http://filesmonster.com/");
is_present($page, 'Username/Password can not be found in our database!', 'Username/password invalid');
$cookie = GetCookiesArr($page);
private function Premium() {

$cookie = $this->login();
$page = $this->GetPage($this->link, $cookie);
is_notpresent($page, '<span class="em lightblack">Premium</span>', 'Error[Account isn\'t Premium!]');
is_present($page, cut_str($page, '<div id="error">', '<br>'));
if (!preg_match('%<a href="(https?:\/\/[^\r\n\s\t"]+)"><span class="huge_button_green_left">%', $page, $rd)) html_error('Error[Redirect link PREMIUM 1 not found!]');
$page = $this->GetPage($rd[1], $cookie, 0, $this->link);
if (!preg_match('/get_link\("([^\r\n\s\t"]+)"\)/', $page, $rdd)) html_error('Error[Redirect link PREMIUM 2 not found!]');
$page = $this->GetPage('http://filesmonster.com' . $rdd[1], $cookie, 0, $rd[1]);
$dlink = cut_str($page, 'url":"', '"');
if (!$dlink) html_error("Error, Premium Download link not found");
$dlink = str_replace('\/', '/', $dlink);
$FileName = basename(parse_url($dlink, PHP_URL_PATH));
$this->RedirectDownload($dlink, $FileName, $cookie);
}

private function login() {
global $premium_acc;

$user = ($_REQUEST["premium_user"] ? trim($_REQUEST["premium_user"]) : $premium_acc ["filesmonster_com"] ["user"]);
$pass = ($_REQUEST["premium_pass"] ? trim($_REQUEST["premium_pass"]) : $premium_acc ["filesmonster_com"] ["pass"]);
if (empty($user) || empty($pass)) html_error("Login failed, username or password is empty!");

$posturl = 'http://filesmonster.com/';
$post = array();
$post['act'] = "login";
$post['user'] = $user;
$post['pass'] = $pass;
$post['login'] = "Login";
$page = $this->GetPage($posturl . 'login.php', $this->cookie, $post, $posturl);
is_present($page, 'Username/Password can not be found in our database!');
$cookie = GetCookiesArr($page, $this->cookie);

return $cookie;
}

private function Show_reCaptcha($pid, $inputs) {
global $PHP_SELF;
if (!is_array($inputs)) {
html_error("Error parsing captcha data.");
}
// Themes: 'red', 'white', 'blackglass', 'clean'
echo "<script language='JavaScript'>var RecaptchaOptions={theme:'white', lang:'en'};</script>\n";
echo "\n<center><form name='dl' action='$PHP_SELF' method='post' ><br />\n";
foreach ($inputs as $name => $input) {
echo "<input type='hidden' name='$name' id='$name' value='$input' />\n";
}
echo "<script type='text/javascript' src='http://www.google.com/recaptcha/api/challenge?k=$pid'></script>";
echo "<noscript><iframe src='http://www.google.com/recaptcha/api/noscript?k=$pid' height='300' width='500' frameborder='0'></iframe><br />";
echo "<textarea name='recaptcha_challenge_field' rows='3' cols='40'></textarea><input type='hidden' name='recaptcha_response_field' value='manual_challenge' /></noscript><br />";
echo "<input type='submit' name='submit' onclick='javascript:return checkc();' value='Enter Captcha' />\n";
echo "<script type='text/javascript'>/*<![CDATA[*/\nfunction checkc(){\nvar capt=document.getElementById('recaptcha_response_field');\nif (capt.value == '') { window.alert('You didn\'t enter the image verification code.'); return false; }\nelse { return true; }\n}\n/*]]>*/</script>\n";
echo "</form></center>\n</body>\n</html>";
exit;
}

$page = $this->GetPage($link, $cookie);
if (preg_match('%<a href="(.+)"><span class="huge_button_green_left">%', $page, $match)) {
$tlink = trim($match[1]);
}
$page = $this->GetPage($tlink, $cookie, 0, $link);
if (preg_match('#\/dl\/gpl\/[^"]+#', $page, $temp)) {
$prelink = 'http://filesmonster.com'.$temp[0];
}
$page = $this->GetPage($prelink, $cookie, 0, $tlink);
$dlink = cut_str($page, 'url":"', '"');
if (!$dlink) html_error("Error, Premium Download link not found");
$dlink = str_replace('\/', '/', $dlink);
$Url = parse_url($dlink);
$FileName = basename($Url['path']);
$this->RedirectDownload($dlink, $FileName, $cookie);
exit();
}
}

//filesmonster free download plugin by Ruud v.Tony 23-06-2011
//updated 11-07-2011 by Ruud v.Tony for checking link
//updated 30-08-2011 by Ruud v.Tony to support premium
//fixed 06-03-2013 by Tony Fauzi Wihana/Ruud v.Tony
?>
Loading

0 comments on commit 493cf87

Please sign in to comment.