Advertisement
Th3-822

[rapidleech][u] filehosting.org

Dec 15th, 2015
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 4.54 KB | None | 0 0
  1. <?php
  2. ######## Account Info ########
  3. $upload_acc['filehosting_org']['user'] = ''; //Set your Email
  4. ########################
  5.  
  6. $_GET['proxy'] = isset($_GET['proxy']) ? $_GET['proxy'] : '';
  7. $not_done = true;
  8.  
  9. if ($upload_acc['filehosting_org']['user']) {
  10.     $default_acc = true;
  11.     $_REQUEST['up_email'] = $upload_acc['filehosting_org']['user'];
  12.     $_REQUEST['action'] = 'FORM';
  13.     echo "<b><center>Using Default Email.</center></b>\n";
  14. } else $default_acc = false;
  15.  
  16. if (empty($_REQUEST['action']) || $_REQUEST['action'] != 'FORM') {
  17.     echo "<table border='0' style='width:270px;' cellspacing='0' align='center'>
  18.     <form method='POST'>
  19.     <input type='hidden' name='action' value='FORM' />
  20.     <tr><td style='white-space:nowrap;'>&nbsp;Email*</td><td>&nbsp;<input type='text' name='up_email' value='' style='width:160px;' /></td></tr>\n";
  21.     echo "<tr><td colspan='2' align='center'><br /><input type='submit' value='Upload' /></td></tr>\n";
  22.     echo "<tr><td colspan='2' align='center'><small>*You can set it as default in <b>".basename(__FILE__)."</b></small></td></tr>\n";
  23.     echo "</table>\n</form>\n";
  24. } else {
  25.     $login = $not_done = false;
  26.     $domain = 'www.filehosting.org';
  27.     $referer = "http://$domain/";
  28.  
  29.     // Login
  30.     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";
  31.  
  32.     $cookie = array('language' => 'en');
  33.     if (!empty($_REQUEST['up_email'])) {
  34.         $uploader_email = trim($_REQUEST['up_email']);
  35.  
  36.         if (!preg_match('/^[\w\.\-]+@([a-zA-Z\d\-]+\.){1,3}[a-zA-Z\d]{2,4}$/', $uploader_email)) html_error('Invalid email address.');
  37.  
  38.         $login = true;
  39.     } else html_error('Login Failed: Email or Password are empty. Please check login data.');
  40.  
  41.     // Retrive upload ID
  42.     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";
  43.  
  44.     $page = geturl($domain, 80, '/', $referer, $cookie, 0, 0, $_GET['proxy'], $pauth);is_page($page);
  45.     $cookie = GetCookiesArr($page, $cookie);
  46.  
  47.     if (!preg_match('@<form\s+(?:[^<>]+\s+)?action="(https?://(?:[\w\-]+\.)*filehosting\.org(/[^\"\s<>]*)?)"@i', $page, $up_url)) {
  48.         textarea($page);
  49.         html_error('Upload Server Not Found.');
  50.     } else $up_url = $up_url[1] . (empty($up_url[2]) ? '/' : '');
  51.  
  52.     $post = array();
  53.     $post['uploader_email'] = $uploader_email;
  54.     $post['accept_tos'] = '1';
  55.     $post['submit'] = 'Upload now';
  56.  
  57.     // Uploading
  58.     echo "<script type='text/javascript'>document.getElementById('info').style.display='none';</script>\n";
  59.     $url = parse_url($up_url);
  60.     $upfiles = upfile($url['host'], defport($url), $url['path'].(!empty($url['query']) ? '?'.$url['query'] : ''), $referer, $cookie, $post, $lfile, $lname, 'upload_file', '', $_GET['proxy'], $pauth, 0, $url['scheme']);
  61.  
  62.     // Upload Finished
  63.     echo "<script type='text/javascript'>document.getElementById('progressblock').style.display='none';</script>\n";
  64.     is_page($upfiles);
  65.  
  66.     if (!preg_match('@(?><form(?:\s[^\>]*)?\>)(?>.*?</form>)@is', $upfiles, $form) || !preg_match('@^<form\s+(?:[^<>]+\s+)?action=\'(https?://(?:[\w\-]+\.)*filehosting\.org(/[^\"\'\s<>]*)?)\'@i', $form[0], $form_url)) {
  67.         textarea($upfiles);
  68.         html_error('Post-Upload Form Not Found');
  69.     }
  70.  
  71.     $form = $form[0];
  72.     $form_url = $form_url[1] . (empty($form_url[2]) ? '/' : '');
  73.  
  74.     preg_match_all("@<input\s*[^>]*\stype='hidden'[^>]*\sname='(\w+)'[^>]*\svalue='([^']*)'@i", $form, $inputs);
  75.     $post = array_map('urlencode', array_map('html_entity_decode', array_combine($inputs[1], $inputs[2])));
  76.  
  77.     $cookie = GetCookiesArr($upfiles, $cookie);
  78.     $url = parse_url($form_url);
  79.     $page = geturl($url['host'], defport($url), $url['path'].(!empty($url['query']) ? '?'.$url['query'] : ''), $up_url, $cookie, $post, 0, $_GET['proxy'], $pauth, 0, $url['scheme']);is_page($page);
  80.     $cookie = GetCookiesArr($page, $cookie);
  81.  
  82.     if (preg_match('@\nLocation: (https?://(?:[\w\-]+\.)*filehosting\.org)?(/[^\s]*)@i', $page, $redir)) {
  83.         $redir = (empty($redir[1]) ? $url['scheme'] . '://' . $url['host'] : $redir[1]) . $redir[2];
  84.         $url = parse_url($redir);
  85.         $page = geturl($url['host'], defport($url), $url['path'].(!empty($url['query']) ? '?'.$url['query'] : ''), $form_url, $cookie, 0, 0, $_GET['proxy'], $pauth, 0, $url['scheme']);is_page($page);
  86.     }
  87.  
  88.     if (stripos($page, 'A link to the file and a download link were sent to your email address') === false) {
  89.         textarea($page);
  90.         html_error('Unknown Post-Upload Error.');
  91.     }
  92.  
  93.     $download_link = 'Check Your Email: "' . $uploader_email . '"';
  94. }
  95.  
  96. //[15-12-2015]  Written by Th3-822.
  97.  
  98. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement