Advertisement
Th3-822

[rapidleech][u] upfile.mobi.php

Jul 5th, 2013
1,760
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.53 KB | None | 0 0
  1. <?php
  2. ######## Account Info ########
  3. $upload_acc['upfile_mobi']['user'] = ''; //Set your username
  4. $upload_acc['upfile_mobi']['pass'] = ''; //Set your password
  5. ########################
  6.  
  7. $_GET['proxy'] = isset($_GET['proxy']) ? $_GET['proxy'] : '';
  8. $not_done = true;
  9. $continue_up = false;
  10.  
  11. if ($upload_acc['upfile_mobi']['user'] && $upload_acc['upfile_mobi']['pass']) {
  12.     $default_acc = true;
  13.     $_REQUEST['up_login'] = $upload_acc['upfile_mobi']['user'];
  14.     $_REQUEST['up_pass'] = $upload_acc['upfile_mobi']['pass'];
  15.     $_REQUEST['action'] = 'FORM';
  16.     echo "<b><center>Using Default Login.</center></b>\n";
  17.     // Upload settings
  18.     $_REQUEST['T8']['passw'] = '';
  19.     $_REQUEST['T8']['descr'] = '';
  20. } else $default_acc = false;
  21.  
  22. if (!empty($_REQUEST['action']) && $_REQUEST['action'] == 'FORM') $continue_up = true;
  23. else {
  24.     echo "<table border='0' style='width:270px;' cellspacing='0' align='center'>
  25.     <form method='POST'>
  26.     <input type='hidden' name='action' value='FORM' />
  27.     <tr><td style='white-space:nowrap;'>&nbsp;Username*</td><td>&nbsp;<input type='text' name='up_login' value='' style='width:160px;' /></td></tr>
  28.     <tr><td style='white-space:nowrap;'>&nbsp;Password*</td><td>&nbsp;<input type='password' name='up_pass' value='' style='width:160px;' /></td></tr>\n";
  29.     echo "<tr><td colspan='2' align='center'><br />Upload options<br /><br /></td></tr>
  30.     <tr><td style='white-space:nowrap;'>File Password:</td><td>&nbsp;<input type='text' name='T8[passw]' value='' style='width:160px;' /></td></tr>
  31.     <tr><td style='white-space:nowrap;'>Description:</td><td>&nbsp;<input type='text' name='T8[descr]' value='Uploaded with Rapidleech.' style='width:160px;' /></td></tr>\n";
  32.     echo "<tr><td colspan='2' align='center'><br /><input type='submit' value='Upload' /></td></tr>\n";
  33.     echo "<tr><td colspan='2' align='center'><small>*You can set it as default in <b>".basename(__FILE__)."</b></small></td></tr>\n";
  34.     echo "</table>\n</form>\n";
  35. }
  36.  
  37. if ($continue_up) {
  38.     $not_done = false;
  39.     $domain = 'upfile.mobi';
  40.     $referer = "http://$domain/";
  41.  
  42.     // Login
  43.     echo "<table style='width:600px;margin:auto;'>\n<tr><td align='center'>\n<div id='login' width='100%' align='center'>Login to $domain</div>\n";
  44.  
  45.     $cookie = array('lang' => 'en');
  46.     if (!empty($_REQUEST['up_login']) && !empty($_REQUEST['up_pass'])) {
  47.         $post = array();
  48.         $post['u'] = urlencode($_REQUEST['up_login']);
  49.         $post['p'] = urlencode($_REQUEST['up_pass']);
  50.  
  51.         $page = geturl($domain, 80, '/index.php?page=login&start', $referer, $cookie, $post, 0, $_GET['proxy'], $pauth);is_page($page);
  52.         is_present($page, 'username or password is incorrect', 'Login Failed: User/Password incorrect.');
  53.         $cookie = GetCookiesArr($page);
  54.         if (empty($cookie['secret_code'])) html_error('Login Failed: Session cookie not found.');
  55.         $cookie['lang'] = 'en';
  56.         $login = true;
  57.     } else {
  58.         echo "<b><center>Login not found or empty, using non member upload.</center></b>\n";
  59.         $login = false;
  60.  
  61.         //if (!preg_match('@\.(png|jpe?g|gif|bmp|t(iff?|ga|cx)|avi|mp[2-4]|m4a|mk(a|v)|divx|wm(a|v)|mov|3gp|flv|rmvb|web(m|p)|ts|h264|aac|flac|ogg|wav|aiff?|amr)$@i', $lname)) html_error('Non members can only upload video, audio and pictures.');
  62.     }
  63.  
  64.     // Retrive upload ID
  65.     echo "<script type='text/javascript'>document.getElementById('login').style.display='none';</script>\n<div id='info' width='100%' align='center'>Retrive upload ID</div>\n";
  66.  
  67.     $page = geturl($domain, 80, '/', $referer, $cookie, 0, 0, $_GET['proxy'], $pauth);is_page($page);
  68.     $cookie = GetCookiesArr($page, $cookie);
  69.  
  70.     if (!preg_match('@action="(https?://(?:[\w-]+\.)*upfile\.mobi(?::\d+)?/upload[^\'\"\s]+)"@i', $page, $upUrl)) html_error('Upload URL not found.');
  71.  
  72.     $_REQUEST['T8'] = array_map('trim', $_REQUEST['T8']);
  73.     $post = array();
  74.     $post['folder_id'] = 0;
  75.     if (!empty($_REQUEST['T8']['passw'])) $post['pass'] = $_REQUEST['T8']['passw'];
  76.     $post['info'] = !empty($_REQUEST['T8']['descr']) ? $_REQUEST['T8']['descr'] : 'Uploaded with Rapidleech.';
  77.     $post['agree'] = 'yes';
  78.  
  79.     $up_url = $upUrl[1];
  80.  
  81.     // Uploading
  82.     echo "<script type='text/javascript'>document.getElementById('info').style.display='none';</script>\n";
  83.  
  84.     $url = parse_url($up_url);
  85.     $upfiles = upfile($url['host'], defport($url), $url['path'].(!empty($url['query']) ? '?'.$url['query'] : ''), $referer, $cookie, $post, $lfile, $lname, 'file', '', $_GET['proxy'], $pauth, 0, $url['scheme']);
  86.  
  87.     // Upload Finished
  88.     echo "<script type='text/javascript'>document.getElementById('progressblock').style.display='none';</script>\n";
  89.  
  90.     is_page($upfiles);
  91.  
  92.     if (preg_match('@\?page=upload_error&n=(\d+)@i', $upfiles, $err)) {
  93.         switch ($err[1]) {
  94.             case 2:
  95.                 $err = 'Filename is too long.';
  96.                 break;
  97.             case 3:
  98.                 $err = '"Upload is temporarily disabled due to technical works"';
  99.                 break;
  100.             case 7:
  101.                 $err = '"You need a verified account to upload archive"';
  102.                 break;
  103.             case 8:
  104.                 $err = '"As a guest you can only upload video, audio and pictures"';
  105.                 break;
  106.             default:
  107.                 $err = "*Unknown error: {$err[1]}*";
  108.                 break;
  109.         }
  110.         html_error('Upload Error: ' . htmlspecialchars($err));
  111.     }
  112.  
  113.     if (!preg_match('@[\?&]id=([\w\-]+)@i', $upfiles, $fid)) html_error('Download link not Found.');
  114.     $download_link = $referer.$fid[1];
  115.     if (preg_match('@[\?&]password=([\dA-Fa-f]{32})@i', $upfiles, $fpsw)) $access_pass = $download_link.'.'.$fpsw[1]; // Testing this var.
  116.     if (preg_match('@[\?&]code=(\w+)@i', $upfiles, $fdel)) $delete_link = $referer."?page=delete&f={$fid[1]}&s=".$fdel[1];
  117. }
  118.  
  119. //[05-7-2013] Written by Th3-822.
  120. //[26-1-2015] Fixed. - Th3-822
  121. //[22-8-2016] Fixed Link Regexp. - Th3-822
  122.  
  123. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement