Advertisement
Th3-822

[rapidleech][u] uploading.com_member.php

Jul 14th, 2012
265
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 7.60 KB | None | 0 0
  1. <?php
  2. ######## Account Info ########
  3. $upload_acc['uploading_com']['user'] = ''; //Set your email
  4. $upload_acc['uploading_com']['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['uploading_com']['user'] && $upload_acc['uploading_com']['pass']) {
  12.     $_REQUEST['up_login'] = $upload_acc['uploading_com']['user'];
  13.     $_REQUEST['up_pass'] = $upload_acc['uploading_com']['pass'];
  14.     $_REQUEST['action'] = 'FORM';
  15.     echo "<b><center>Using Default Login.</center></b>\n";
  16. }
  17.  
  18. if (!empty($_REQUEST['action']) && $_REQUEST['action'] == 'FORM') $continue_up = true;
  19. else {
  20.     echo "<table border='0' style='width:270px;' cellspacing='0' align='center'>
  21.     <form method='POST'>
  22.     <input type='hidden' name='action' value='FORM' />
  23.     <tr><td style='white-space:nowrap;'>&nbsp;Email*</td><td>&nbsp;<input type='text' name='up_login' value='' style='width:160px;' /></td></tr>
  24.     <tr><td style='white-space:nowrap;'>&nbsp;Password*</td><td>&nbsp;<input type='password' name='up_pass' value='' style='width:160px;' /></td></tr>\n";
  25.     echo "<tr><td colspan='2' align='center'><br /><input type='submit' value='Upload' /></td></tr>\n";
  26.     echo "<tr><td colspan='2' align='center'><small>*You can set it as default in <b>".basename(__FILE__)."</b></small></td></tr>\n";
  27.     echo "</table>\n</form>\n";
  28. }
  29.  
  30. if ($continue_up) {
  31.     $not_done = false;
  32.     $referer = 'http://uploading.com/';
  33.     $captcha = (isset($_REQUEST['step']) && $_REQUEST['step'] == 'captcha') ? true : false;
  34.  
  35.     // Login
  36.     echo "<table style='width:600px;margin:auto;'>\n<tr><td align='center'>\n<div id='login' width='100%' align='center'>Login to uploading.com</div>\n";
  37.  
  38.     $cookie = array();
  39.     if (!empty($_REQUEST['up_login']) && !empty($_REQUEST['up_pass'])) {
  40.         if ($captcha && empty($_POST['recaptcha_response_field'])) html_error("You didn't enter the image verification code.");
  41.         $page = geturl('uploading.com', 80, '/', '', $cookie, 0, 0, $_GET['proxy'], $pauth);is_page($page);
  42.         $cookie = GetCookiesArr($page, $cookie);
  43.         if (empty($cookie['SID'])) html_error('Login Error: SID cookie not found.');
  44.  
  45.         $post = array();
  46.         $post['email'] = $_REQUEST['up_login'];
  47.         $post['password'] = $_REQUEST['up_pass'];
  48.         $post['remember'] = 'on';
  49.         if ($captcha) {
  50.             $post['recaptcha_challenge_field'] = $_POST['recaptcha_challenge_field'];
  51.             $post['recaptcha_response_field'] = $_POST['recaptcha_response_field'];
  52.         }
  53.  
  54.         $ajax_req = geturl('uploading.com', 80, '/general/login_form/?ajax', $referer."\r\nX-Requested-With: XMLHttpRequest", $cookie, $post, 0, $_GET['proxy'], $pauth);is_page($ajax_req);
  55.         $json = Get_Reply($ajax_req);
  56.         if (!empty($json['error'])) html_error('Login Error... MSG: ' . $json['error']);
  57.         if (!empty($json['answer']) && isset($json['answer']['captcha']) && $json['answer']['captcha'] == true) {
  58.             $data = array('action' => 'FORM', 'step' => 'captcha');
  59.             if (!preg_match('@build_recaptcha\s*\([^,|\)]+,\s*[\'|\"](\w+)[\'|\"]\s*\)@i', $page, $pid)) html_error('Error: Login captcha data not found.');
  60.             Show_reCaptcha($pid[1], $data, ($upload_acc['uploading_com']['user'] && $upload_acc['uploading_com']['pass']));
  61.             exit;
  62.         }
  63.         $cookie = GetCookiesArr($ajax_req, $cookie);
  64.         if (empty($cookie['u']) || empty($cookie['remembered_user'])) html_error('Login Error: Login cookies not found.'); // Yes.... u=1 is needed. :D
  65.     } else html_error("Login Failed: Email or Password are empty. Please check login data.", 0);
  66.  
  67.     // Retrive upload ID
  68.     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";
  69.  
  70.     $page = geturl('uploading.com', 80, '/', $referer, $cookie, 0, 0, $_GET['proxy'], $pauth);is_page($page);
  71.     if (!preg_match('@upload_url[\s|\t]*:[\s|\t|\r|\n]*[\'|\"](https?://([^\|\'|\"|\r|\n|\s|\t]+\.)?uploading\.com/[^\'|\"|\r|\n|\s|\t]+)@i', $page, $up)) html_error('Error: Cannot find upload server.', 0);
  72.  
  73.     $post = array('name' => urlencode($lname), 'size' => getSize($lfile));
  74.     $page = geturl('uploading.com', 80, '/files/generate/?ajax', $referer."\r\nX-Requested-With: XMLHttpRequest", $cookie, $post, 0, $_GET['proxy'], $pauth);is_page($page);
  75.     $json = Get_Reply($page);
  76.     if (empty($json['file']['file_id'])) html_error('Upload id not found.');
  77.     if (empty($json['file']['link'])) html_error('Download link not found. Upload aborted.');
  78.  
  79.     $post = array();
  80.     $post['Filename'] = $lname;
  81.     $post['folder_id'] = 0;
  82.     $post['file'] = $json['file']['file_id'];
  83.     $post['SID'] = $cookie['SID'];
  84.     $post['Upload'] = 'Submit Query';
  85.  
  86.     $up_url = $up[1];
  87.  
  88.     // Uploading
  89.     echo "<script type='text/javascript'>document.getElementById('info').style.display='none';</script>\n";
  90.  
  91.     $url = parse_url($up_url);
  92.     $upfiles = upfile($url['host'], 80, $url['path'].($url['query'] ? '?'.$url['query'] : ''), $referer, $cookie, $post, $lfile, $lname, 'file', '', $_GET['proxy'], $pauth, 'Shockwave Flash');
  93.  
  94.     // Upload Finished
  95.     echo "<script type='text/javascript'>document.getElementById('progressblock').style.display='none';</script>\n";
  96.  
  97.     is_page($upfiles);
  98.  
  99.     $download_link = $json['file']['link'];
  100. }
  101.  
  102. function Get_Reply($page) {
  103.     if (!function_exists('json_decode')) html_error('Error: Please enable JSON in php.');
  104.     $json = substr($page, strpos($page, "\r\n\r\n") + 4);
  105.     $json = substr($json, strpos($json, '{'));$json = substr($json, 0, strrpos($json, '}') + 1);
  106.     $rply = json_decode($json, true);
  107.     if (!$rply || (is_array($rply) && count($rply) == 0)) html_error('Error getting json data.');
  108.     return $rply;
  109. }
  110.  
  111. // Edited For upload.php usage.
  112. function Show_reCaptcha($pid, $inputs, $default_login) {
  113.     if (!is_array($inputs)) html_error("Error parsing captcha data.");
  114.  
  115.     // Themes: 'red', 'white', 'blackglass', 'clean'
  116.     echo "<script language='JavaScript'>var RecaptchaOptions={theme:'white', lang:'en'};</script>\n";
  117.     echo "\n<center><form name='dl' method='post' ><br />\n";
  118.     foreach ($inputs as $name => $input) echo "<input type='hidden' name='$name' id='$name' value='$input' />\n";
  119.     if (!$default_login) echo "\t<table border='0' style='width:270px;' cellspacing='0' align='center'>\n\t\t<tr><td style='white-space:nowrap;'>&nbsp;Email</td><td>&nbsp;<input type='text' id='up_login' name='up_login' value='".htmlentities($_REQUEST['up_login'])."' style='width:160px;' /></td></tr>\n\t\t<tr><td style='white-space:nowrap;'>&nbsp;Password</td><td>&nbsp;<input type='password' id='up_password' name='up_pass' value='' style='width:160px;' /></td></tr>\n\t</table><br /><br />";
  120.     echo "<script type='text/javascript' src='http://www.google.com/recaptcha/api/challenge?k=$pid'></script>";
  121.     echo "<noscript><iframe src='http://www.google.com/recaptcha/api/noscript?k=$pid' height='300' width='500' frameborder='0'></iframe><br />";
  122.     echo "<textarea name='recaptcha_challenge_field' rows='3' cols='40'></textarea><input type='hidden' name='recaptcha_response_field' value='manual_challenge' /></noscript><br />";
  123.     echo "<input type='submit' name='submit' onclick='javascript:return checks();' value='Enter Captcha' />\n";
  124.     echo "<script type='text/javascript'>/*<![CDATA[*/\n\tfunction checks() {\n\t\tif ($('#recaptcha_response_field').val() == '') {\n\t\t\twindow.alert('You didn\'t enter the image verification code.');\n\t\t\treturn false;\n\t\t} " . ($default_login ? '' : "else if ($('#up_login').val() == '' || $('#up_password').val() == '') {\n\t\t\twindow.alert('Please fill login fields.');\n\t\t\treturn false;\n\t\t} ") . "else return true;\n\t}\n/*]]>*/</script>\n";
  125.     echo "</form></center>\n</body>\n</html>";
  126.     exit;
  127. }
  128.  
  129. //[14-7-2012] Written by Th3-822.
  130.  
  131. ?>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement