Advertisement
Th3-822

[rapidleech][u] 1fichier.com.php

Mar 18th, 2015
733
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 5.02 KB | None | 0 0
  1. <?php
  2. ######## Account Info ########
  3. $upload_acc['1fichier_com']['user'] = ''; //Set your login
  4. $upload_acc['1fichier_com']['pass'] = ''; //Set your password
  5. ########################
  6.  
  7. $_GET['proxy'] = isset($_GET['proxy']) ? $_GET['proxy'] : '';
  8. $not_done = true;
  9.  
  10. if ($upload_acc['1fichier_com']['user'] && $upload_acc['1fichier_com']['pass']) {
  11.     $default_acc = true;
  12.     $_REQUEST['up_login'] = $upload_acc['1fichier_com']['user'];
  13.     $_REQUEST['up_pass'] = $upload_acc['1fichier_com']['pass'];
  14.     $_REQUEST['action'] = 'FORM';
  15.     echo "<b><center>Using Default Login.</center></b>\n";
  16. } else $default_acc = false;
  17.  
  18. if (empty($_REQUEST['action']) || $_REQUEST['action'] != 'FORM') {
  19.     echo "<table border='0' style='width:270px;' cellspacing='0' align='center'>
  20.     <form method='POST'>
  21.     <input type='hidden' name='action' value='FORM' />
  22.     <tr><td style='white-space:nowrap;'>&nbsp;EMail*</td><td>&nbsp;<input type='text' name='up_login' value='' style='width:160px;' /></td></tr>
  23.     <tr><td style='white-space:nowrap;'>&nbsp;Password*</td><td>&nbsp;<input type='password' name='up_pass' value='' style='width:160px;' /></td></tr>\n";
  24.     echo "<tr><td colspan='2' align='center'><br /><input type='submit' value='Upload' /></td></tr>\n";
  25.     echo "<tr><td colspan='2' align='center'><small>*You can set it as default in <b>".basename(__FILE__)."</b></small></td></tr>\n";
  26.     echo "</table>\n</form>\n";
  27. } else {
  28.     $login = $not_done = false;
  29.     $domain = '1fichier.com';
  30.     $referer = "https://$domain/";
  31.  
  32.     // Login
  33.     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";
  34.  
  35.     $cookie = array('LG' => 'en');
  36.     if (!empty($_REQUEST['up_login']) && !empty($_REQUEST['up_pass'])) {
  37.         if (!empty($_REQUEST['A_encrypted'])) {
  38.             $_REQUEST['up_login'] = decrypt(urldecode($_REQUEST['up_login']));
  39.             $_REQUEST['up_pass'] = decrypt(urldecode($_REQUEST['up_pass']));
  40.             unset($_REQUEST['A_encrypted']);
  41.         }
  42.  
  43.         $post = array();
  44.         $post['mail'] = urlencode($_REQUEST['up_login']);
  45.         $post['pass'] = urlencode($_REQUEST['up_pass']);
  46.         $post['lt'] = 'on';
  47.         $post['restrict'] = 'on';
  48.         $post['valider'] = 'Send';
  49.  
  50.         $page = geturl($domain, 443, '/login.pl', $referer, $cookie, $post, 0, 0, 0, 0, 'https');is_page($page);
  51.         $cookie = GetCookiesArr($page, $cookie);
  52.  
  53.         is_present($page, 'Invalid email address');
  54.         is_present($page, 'Invalid username or password', 'Login Failed: Email/Password incorrect.');
  55.  
  56.         $page = geturl($domain, 443, '/', $referer.'login.pl', $cookie, 0, 0, 0, 0, 0, 'https');is_page($page);
  57.         is_notpresent($page, 'logout.pl">Logout', 'Login Error.');
  58.  
  59.         $login = true;
  60.     } else {
  61.         echo "<b><center>Login not found or empty, using non member upload.</center></b>\n";
  62.         $login = false;
  63.     }
  64.  
  65.     // Retrive upload ID
  66.     echo "<script type='text/javascript'>document.getElementById('login').style.display='none';</script>\n<div id='info' width='100%' align='center'>Retrieving upload ID</div>\n";
  67.  
  68.     if (!$login) {
  69.         $page = geturl($domain, 443, '/', $referer, $cookie, 0, 0, 0, 0, 0, 'https');is_page($page);
  70.         $cookie = GetCookiesArr($page, $cookie);
  71.     }
  72.  
  73.     if (!preg_match('@action="((https?://(?:[\w-]+\.)*1fichier\.com)?(/)?upload\.cgi\?id=(?:[^\"\'\s<>]+))"@i', $page, $up)) html_error('Error: Upload url not found.');
  74.  
  75.     $post = array();
  76.     $post['domain'] = '0';
  77.     $post['message'] = $post['mails'] = $post['user'] = $post['dpass'] = $post['mail'] = '';
  78.     if ($login) $post['did'] = '0';
  79.     $post['submit'] = 'Send';
  80.  
  81.     $up_url = (empty($up[2]) ? "https://$domain".(empty($up[3]) ? '/' : '').$up[1] : $up[1]);
  82.  
  83.     // Uploading
  84.     echo "<script type='text/javascript'>document.getElementById('info').style.display='none';</script>\n";
  85.  
  86.     $url = parse_url($up_url);
  87.     $upfiles = upfile($url['host'], defport($url), $url['path'].(!empty($url['query']) ? '?'.$url['query'] : ''), $referer, $cookie, $post, $lfile, $lname, 'file[]', '', 0, 0, 0, $url['scheme']);
  88.  
  89.     // Upload Finished
  90.     echo "<script type='text/javascript'>document.getElementById('progressblock').style.display='none';</script>\n";
  91.  
  92.     is_page($upfiles);
  93.  
  94.     if (!preg_match('@\nLocation: ((https?://(?:[\w-]+\.)*1fichier\.com)?/end\.pl\?\w?id=(?:[^\"\'\s<>]+))@i', $upfiles, $end_url)) html_error('Error: Post Upload url not found.');
  95.  
  96.     $end_url = parse_url(empty($end_url[2]) ? (empty($up[2]) ? "https://$domain" : $up[2]) . $end_url[1] : $end_url[1]);
  97.  
  98.     $page = geturl($end_url['host'], defport($end_url), $end_url['path'].(!empty($end_url['query']) ? '?'.$end_url['query'] : ''), $up_url, $cookie, 0, 0, 0, 0, 0, $end_url['scheme']);is_page($page);
  99.  
  100.     if (preg_match('@https?://(?:\w+\.)*1fichier\.com/remove/([\w\-]+)/[^\s<>\"\']+@i', $page, $lnk)) {
  101.         $download_link = $referer . '?' . $lnk[1];
  102.         $delete_link = $lnk[0];
  103.     } else if (preg_match('@https://(?:\w+\.)*1fichier\.com/\?\w+(?="|<)@i', $page, $lnk)) {
  104.         $download_link = $lnk[0];
  105.     } else html_error('Download link not found.');
  106. }
  107.  
  108. //[18-3-2015]  Written by Th3-822.
  109. //[25-6-2018] Fixed download link regexp for Member uploads & Fixed upload url regexp. - Th3-822
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement