Th3-822

[rapidleech][u] filefactory.com_member.php

Sep 15th, 2013 (edited)
659
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.75 KB | None | 0 0
  1. <?php
  2. ######## Account Info ########
  3. $upload_acc['filefactory_com']['user'] = ''; //Set your email
  4. $upload_acc['filefactory_com']['pass'] = ''; //Set your password
  5. ########################
  6.  
  7. $_GET['proxy'] = isset($_GET['proxy']) ? $_GET['proxy'] : '';
  8. $not_done = true;
  9.  
  10. if (!empty($upload_acc['filefactory_com']['user']) && !empty($upload_acc['filefactory_com']['pass'])) {
  11.     $default_acc = true;
  12.     $_REQUEST['up_login'] = $upload_acc['filefactory_com']['user'];
  13.     $_REQUEST['up_pass'] = $upload_acc['filefactory_com']['pass'];
  14.     $_REQUEST['action'] = '_T8_';
  15.     echo "<b><center>Using Default Login.</center></b>\n";
  16. } else $default_acc = false;
  17.  
  18. if (empty($_REQUEST['action']) || $_REQUEST['action'] != '_T8_') {
  19.     echo "<table border='0' style='width:270px;' cellspacing='0' align='center'>
  20.     <form method='POST'>
  21.     <input type='hidden' name='action' value='_T8_' />
  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 "</form>\n</table>\n";
  27. } else {
  28.     $login = $not_done = false;
  29.     $domain = 'www.filefactory.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('ff_locale' => 'en_US.utf8');
  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['loginEmail'] = urlencode($_REQUEST['up_login']);
  45.         $post['loginPassword'] = urlencode($_REQUEST['up_pass']);
  46.         $post['Submit'] = 'Sign+In';
  47.         $page = geturl($domain, 443, '/member/signin.php', $referer.'member/signin.php', $cookie, $post, 0, $_GET['proxy'], $pauth, 0, 'https');is_page($page);
  48.  
  49.         is_present($page, 'The Email Address submitted was invalid', 'Login Failed: Invalid email address.');
  50.         is_present($page, 'The email address or password you have entered is incorrect.', 'Login Failed: The Email/Password you have entered is incorrect.');
  51.  
  52.         $cookie = GetCookiesArr($page, $cookie);
  53.         if (empty($cookie['auth'])) html_error('Login Failed, auth cookie not found.');
  54.  
  55.         // Check account messages
  56.         $page = geturl($domain, 443, '/account/', $referer.'member/signin.php', $cookie, 0, 0, $_GET['proxy'], $pauth, 0, 'https');is_page($page);
  57.         is_present($page, "\nLocation: /member/settos.php", 'TOS have changed and need to be approved at the site.');
  58.         is_present($page, "\nLocation: /member/setpwd.php", 'Your password has expired, please change it.');
  59.  
  60.         $login = true;
  61.     } else html_error('Login failed: User/Password empty.');
  62.  
  63.     // Retrieve upload ID
  64.     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";
  65.  
  66.     $post = array();
  67.     $post['cookie'] = rawurldecode($cookie['auth']);
  68.  
  69.     $up_loc = 'https://upload.filefactory.com/upload';
  70.     $up_loc .= '-beta.php'; // Old Url
  71.  
  72.     // Uploading
  73.     echo "<script type='text/javascript'>document.getElementById('info').style.display='none';</script>\n";
  74.  
  75.     $url = parse_url($up_loc);
  76.     $upfiles = upfile($url['host'], defport($url), $url['path'] . (!empty($url['query']) ? '?' . $url['query'] : ''), $referer.'upload/', 0, $post, $lfile, $lname, 'Filedata', '', $_GET['proxy'], $pauth, 0, $url['scheme']);
  77.  
  78.     // Upload Finished
  79.     echo "<script type='text/javascript'>document.getElementById('progressblock').style.display='none';</script>";
  80.  
  81.     is_page($upfiles);
  82.  
  83.     if (!preg_match('@\s(\w+)\s*$@i', $upfiles, $uid)) html_error('Upload ID not found.');
  84.     $page = geturl($domain, 443, '/upload/results.php?files='.$uid[1], $referer.'upload/', $cookie, 0, 0, $_GET['proxy'], $pauth, 0, 'https');is_page($page);
  85.  
  86.     if (preg_match('@(?<=/)file/\w+(/[^\r\n\"\'<>\s\t]+)?@i', $page, $dl)) {
  87.         $download_link = $referer.$dl[0];
  88.     } else html_error("Download link not found. (ID: {$uid[1]})");
  89. }
  90.  
  91. //[17-6-2011]  Written by Th3-822.
  92. //[15-9-2013]  Rewritten and fixed for new FF site & Removed anon user support. - Th3-822
  93. //[24-10-2013] Added a error at login. - Th3-822
  94. //[02-12-2016] Fixed login error msgs & revised plugin. - Th3-822
  95. //[30-5-2021] Switched to HTTPS. - Th3-822
Add Comment
Please, Sign In to add comment