Permalink
Browse files

.

  • Loading branch information...
giaythuytinh176 committed Jun 18, 2015
1 parent fdddf2e commit 4ad645cf031ff4cab2958981ce644bfaf64e9a19
Showing with 61 additions and 15 deletions.
  1. +41 −0 hosts/nitroflare_com.php
  2. +3 −3 hosts/turbobit_net.php
  3. +1 −1 index.php
  4. +16 −11 proccess.php
@@ -0,0 +1,41 @@
<?php
class dl_nitroflare_com extends Download {
public function Login($user, $pass){
$dt = $this->lib->curl("https://nitroflare.com/login", "", "");
$Cookies = $this->lib->GetCookies($dt);
$data = $this->lib->curl("https://nitroflare.com/login", $Cookies, "email={$user}&password={$pass}&login=&token=".$this->lib->cut_str($dt, 'name="token" value="', '" />'));
$cookie = $Cookies.$this->lib->GetCookies($data);
return $cookie;
}
public function Leech($url) {
$url = str_replace(array("https://", "http://www.", "https://www."), "http://", $url);
$data = $this->lib->curl($url, $this->lib->cookie, "");
if (stristr($data, "File doesn't exist")) $this->error("dead", true, false, 2);
if (!$this->isredirect($data)) {
$this->save($this->lib->GetCookies($data));
return trim($this->lib->cut_str($data, 'id="download" href="', '">Click'));
}
else {
$this->save($this->lib->GetCookies($data));
return trim($this->redirect);
}
return false;
}
}
/*
* Open Source Project
* Vinaget by ..::[H]::..
* Version: 2.7.0
* nitroflare Download Plugin by giaythuytinh176 [17.05.2015]
* Downloader Class By [FZ]
*/
?>
@@ -1,7 +1,7 @@
<?php
class dl_turbobit_net extends Download {
/*
public function CheckAcc($cookie) {
$data = $this->lib->curl("http://turbobit.net", "user_lang=en;".$cookie, "");
if (stristr($data, '<u>Turbo Access</u> to')) {
@@ -12,9 +12,9 @@ public function CheckAcc($cookie) {
else if(stristr($data, '<u>Turbo Access</u> denied.')) return array(false, "accfree");
else return array(false, "accinvalid");
}
*/
public function Login($user, $pass){
$data = $this->lib->curl("http://turbobit.net/user/login", "user_lang=en", "user[login]={$user}&user[pass]={$pass}&user[memory]=1&user[submit]=Login");
$data = $this->lib->curl("http://turbobit.net/user/login", "user_lang=en", "user[login]=".urlencode($user)."&user[pass]=".urlencode($pass)."&user[memory]=1&user[submit]=Login");
$cookie = "user_lang=en;".$this->lib->GetCookies($data);
return $cookie;
}
@@ -24,7 +24,7 @@
require_once('class.php');
$obj = new stream_get();
$obj->using = $using;
$obj->current_version = 93;
$obj->current_version = 94;
$obj->msg = false;
if (!empty($_COOKIE['msg'])) $obj->msg = htmlspecialchars($_COOKIE['msg']);
setcookie('msg', '');
@@ -36,10 +36,10 @@
case 'cookie':
if (!empty($_POST['type']) && !empty($_POST['cookie'])) {
$obj->save_cookies($_POST['type'], $_POST['cookie']);
$msg = $_POST['type'] . 'Cookie Added!';
$msg = $_POST['type'] . ' Cookie Added!';
} elseif (!empty($_GET['del'])) {
$obj->save_cookies($_GET['del'], '');
$msg = $_GET['del'] . 'Cookie Deleted!';
$msg = $_GET['del'] . ' Cookie Deleted!';
}
break;
@@ -51,17 +51,22 @@
$obj->acc[$_POST['type']]['direct'] = false;
}
$account = explode("\n", $_POST['account']);
$maxacc = count($account);
if (($maxacc == 2 && $account[1] == '') || $maxacc == 1) {
$_POST['account'] = $account[0];
for ($i=0; $i < $maxacc; $i++) {
$account[$i] = str_replace(array("\r", "\n", "\t", "\s", " "), "", trim($account[$i]));
if (empty($account[$i])) unset($account[$i]);
}
$account = array_unique($account);
$account = array_values($account);
//$account = array_filter(explode("\n", preg_replace("/(^[\r\n]*|[\r\n]+)[\s\t]*[\r\n]+/", "\n", $_POST['account'])));
$maxacc = count($account);
for ($i=0; $i < $maxacc; $i++) {
$_POST['account'] = $account[$i];
$obj->save_account($_POST['type'], $_POST['account']);
}
else {
for ($i=0; $i < $maxacc; $i++) {
$_POST['account'] = $account[$i];
$obj->save_account($_POST['type'], $_POST['account']);
}
}
$msg = count($account). ' Account '.$_POST['type'].' Added!';
} elseif (isset($_GET['del']) && !empty($_GET['host'])) {
$acc = $obj->acc[$_GET['host']]['accounts'];
@@ -71,7 +76,7 @@
$obj->acc[$_GET['host']]['accounts'][] = $val;
}
$obj->save_json($obj->fileaccount, $obj->acc);
$msg = $_GET['host'] . 'Account Deleted!';
$msg = $_GET['host'] . ' Account Deleted!';
}
break;

0 comments on commit 4ad645c

Please sign in to comment.