| \n Login to $domain \n";
$cookie = array('lang' => 'en');
if (!empty($_REQUEST['up_login']) && !empty($_REQUEST['up_pass'])) {
$post = array();
$post['u'] = urlencode($_REQUEST['up_login']);
$post['p'] = urlencode($_REQUEST['up_pass']);
$page = geturl($domain, 80, '/index.php?page=login&start', $referer, $cookie, $post, 0, $_GET['proxy'], $pauth);is_page($page);
is_present($page, 'username or password is incorrect', 'Login Failed: User/Password incorrect.');
$cookie = GetCookiesArr($page);
if (empty($cookie['secret_code'])) html_error('Login Failed: Session cookie not found.');
$cookie['lang'] = 'en';
$login = true;
} else {
echo "Retrive upload ID \n";
$page = geturl($domain, 80, '/', $referer, $cookie, 0, 0, $_GET['proxy'], $pauth);is_page($page);
$cookie = GetCookiesArr($page, $cookie);
if (!preg_match('@action="(https?://(?:[\w-]+\.)*upfile\.mobi(?::\d+)?/upload[^\'\"\s]+)"@i', $page, $upUrl)) html_error('Upload URL not found.');
$_REQUEST['T8'] = array_map('trim', $_REQUEST['T8']);
$post = array();
$post['folder_id'] = 0;
if (!empty($_REQUEST['T8']['passw'])) $post['pass'] = $_REQUEST['T8']['passw'];
$post['info'] = !empty($_REQUEST['T8']['descr']) ? $_REQUEST['T8']['descr'] : 'Uploaded with Rapidleech.';
$post['agree'] = 'yes';
$up_url = $upUrl[1];
// Uploading
echo "\n";
$url = parse_url($up_url);
$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']);
// Upload Finished
echo "\n";
is_page($upfiles);
if (preg_match('@\?page=upload_error&n=(\d+)@i', $upfiles, $err)) {
switch ($err[1]) {
case 2:
$err = 'Filename is too long.';
break;
case 3:
$err = '"Upload is temporarily disabled due to technical works"';
break;
case 7:
$err = '"You need a verified account to upload archive"';
break;
case 8:
$err = '"As a guest you can only upload video, audio and pictures"';
break;
default:
$err = "*Unknown error: {$err[1]}*";
break;
}
html_error('Upload Error: ' . htmlspecialchars($err));
}
if (!preg_match('@[\?&]id=([\w\-]+)@i', $upfiles, $fid)) html_error('Download link not Found.');
$download_link = $referer.$fid[1];
if (preg_match('@[\?&]password=([\dA-Fa-f]{32})@i', $upfiles, $fpsw)) $access_pass = $download_link.'.'.$fpsw[1]; // Testing this var.
if (preg_match('@[\?&]code=(\w+)@i', $upfiles, $fdel)) $delete_link = $referer."?page=delete&f={$fid[1]}&s=".$fdel[1];
}
//[05-7-2013] Written by Th3-822.
//[26-1-2015] Fixed. - Th3-822
//[22-8-2016] Fixed Link Regexp. - Th3-822
?> |