Advertisement
l33tb0mb3r

myandrive_net.php

Jul 7th, 2018
371
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 2.01 KB | None | 0 0
  1. <?php
  2. // Myandrive / Gdrive Downloader Plugin
  3. //[8-07-2018]  Written by l33tb0mb3r(MHU | MDY_l33ts)
  4. // Change "yourmail@gmail.com" & "password" to your crediential that used to signup in myandrive.net
  5.  
  6.  
  7. if (!defined('RAPIDLEECH')) {
  8.     require_once('index.html');
  9.     exit;
  10. }
  11. class myandrive_net extends DownloadClass {
  12.     public $link;
  13.     private $cookie, $fid, $dlink;
  14.     public function Download($link) {
  15.  
  16.         $cookie = 'PHPSESSID='.md5(microtime(true));
  17.         // Signin
  18.         $this->Signin($cookie);
  19.  
  20.  
  21.         if(!preg_match('/\/file\/(\w+)/', $link, $fid)) html_error('URL not valid!');
  22.  
  23.         $ch = curl_init();
  24.         curl_setopt($ch, CURLOPT_URL,"https://myandrive.net/post");
  25.         curl_setopt($ch, CURLOPT_COOKIE, $cookie);
  26.         curl_setopt($ch, CURLOPT_POST, 1);
  27.         curl_setopt($ch, CURLOPT_POSTFIELDS,
  28.             http_build_query(array('fileid' => $fid[1], 'key' => 'download')));
  29.         curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  30.         $result = curl_exec ($ch);
  31.         curl_close ($ch);
  32.  
  33.         if($result === false) html_error('Curl error: '.curl_error($ch));
  34.         $result=json_decode($result,true);
  35.         $dlink = $result['redirect'];
  36.         $fname = urldecode(basename(parse_url($dlink, PHP_URL_PATH)));
  37.  
  38.         if(empty($result['redirect'])) html_error(json_encode($result));
  39.  
  40.  
  41.         return $this->RedirectDownload($dlink,$fname);
  42.     }
  43.  
  44.     private function Signin($cookie) {
  45.         $ch = curl_init();
  46.         curl_setopt($ch, CURLOPT_URL,"https://myandrive.net/post");
  47.         curl_setopt($ch, CURLOPT_COOKIE, $cookie);
  48.         curl_setopt($ch, CURLOPT_POST, 1);
  49.         curl_setopt($ch, CURLOPT_POSTFIELDS,
  50.                  http_build_query(array('email' => 'yourmail@gmail.com', 'password' => 'password', 'key' => 'signin')));
  51.         curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
  52.         $result = curl_exec ($ch);
  53.         curl_close ($ch);
  54.         if($result === false) html_error('Signin Error'.curl_error($ch));
  55.  
  56.     }
  57.  
  58.  
  59.  
  60. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement