<?
####### Account Info. ###########
$igetfile_login = ""; //Set your login
$igetfile_pass = ""; //Set your password
##############################
$not_done=true;
$continue_up=false;
if ($igetfile_login & $igetfile_pass){
$_REQUEST['login'] = $igetfile_login;
$_REQUEST['password'] = $igetfile_pass;
$_REQUEST['action'] = "FORM";
echo "<b><center>Using your given Login Details</center></b>\n";
}
if ($_REQUEST['action'] == "FORM")
$continue_up=true;
else{
?>
<table border=0 style="width:270px;" cellspacing=0 align=center>
<form method=post>
<input type=hidden name=action value='FORM' />
<tr><td nowrap> Login*<td> <input type=text name=login value='' style="width:160px;" /> </tr>
<tr><td nowrap> Password*<td> <input type=password name=password value='' style="width:160px;" /> </tr>
<tr><td colspan=2 align=center><input type=submit value='Upload' /></tr>
</table>
</form>
<?php
}
if ($continue_up)
{
$not_done=false;
?>
<table width=600 align=center>
</td></tr>
<tr><td align=center>
<div id=login width=100% align=center>Login to igetfile.com</div>
<?php
$post['op'] = "login" ;
$post['redirect'] = "http://igetfile.com/" ;
$post['login'] = $_REQUEST['login'];
$post['password'] = $_REQUEST['password'];
$page = geturl("igetfile.com", 80, "/login.html", 0, 0, $post, 0, $_GET["proxy"], $pauth);
is_page($page);
is_notpresent($page, 'HTTP/1.1 302 Moved', 'Error logging in - are your logins correct? First');
preg_match_all('/Set-Cookie: (.*);/U',$page,$temp);
$cookie = $temp[1];
$cookies = implode(';',$cookie);
$xfss=cut_str($cookies,'xfss=',' ');
$page = geturl("igetfile.com", 80, "/?op=my_files", "http://igetfile.com/login.html", $cookies, 0, 0, "");
is_page($page);
is_notpresent($page, 'HTTP/1.1 200 OK', 'Error logging in - are your logins correct?Second');
?>
<script>document.getElementById('login').style.display='none';</script>
<div id=info width=100% align=center>Retrive upload ID</div>
<?php
$page = geturl("igetfile.com", 80, "/", 'http://igetfile.com/', $cookies, 0, 0, $_GET["proxy"]);
if(!preg_match('#action="([^"]+)"#', $page, $up))html_error('Cannot get url action upload.', 0);
if(!preg_match('#name="upload_type"[\r|\n|\s]+value="([^"]+)"#', $page, $utype))html_error('Cannot get upload type.', 0);
if(!preg_match('#name="sess_id"[\r|\n|\s]+value="([^"]+)"#', $page, $sid))html_error('Cannot get session id.', 0);
if(!preg_match('#name="srv_tmp_url"[\r|\n|\s]+value="([^"]+)"#', $page, $tmp))html_error('Cannot get tmp url.', 0);
$uid = GenerateHexa(12);
$n = mt_rand(0,50);
$url = parse_url($up[1].$uid.'&js_on=1&utype=reg&upload_type='.$utype[1]);
$post = array();
$post["upload_type"] = $utype[1];
$post["sess_id"] = $sid[1];
$post["srv_tmp_url"] = $tmp[1];
$post["link_rcpt"] = '';
$post["link_pass"] = '';
$post['tos'] = '1';
$upfiles = upfile($url["host"], $url["port"] ? $url["port"] : 80, $url["path"] . ($url["query"] ? "?" . $url["query"] : ""), "http://igetfile.com/", $cookies, $post, $lfile, $lname, 'file_'.$n);
?>
<script>document.getElementById('progressblock').style.display='none';</script>
<?php
is_page($upfiles);
preg_match_all("#>([^><]+)<#", $upfiles, $dl);
if($dl[1][1] != 'OK')html_error('Erro in upload');
$post['fn'] = $dl[1][0];
$post['st'] = 'OK';
$post['op'] = 'upload_result';
$page = geturl("igetfile.com", 80, "/", 0, $cookie, $post, 0, $_GET["proxy"]);
if(!empty($dl[1][0]))
$download_link = 'http://www.igetfile.com/'.$dl[1][0].'/'.$lname.'.html';
else
html_error ("Didn't find download link!");
if(preg_match("#killcode=([^=<]+)<#", $page, $del))
$delete_link = $download_link.'?killcode='.$del[1];
else
html_error ("Didn't find delete link!");
}
function GenerateHexa($n, $l=0){
$ext = "0123456789";
$hex = "0123456789abcdef";
$let = str_split($hex,1);
$contbase = strlen($hex);
$comple = '';
$nn = $n+22;
for($i=0; $i < $nn; $i++){
$rand .= $ext{mt_rand() % strlen($ext)};
}
$base = $rand;
for ($i = $l; $i < $n; $i++) {
$base = bcdiv($base,$contbase,0);
$uid = $let[bcmod($base,$contbase)].$uid;
}
return $uid;
}
// [13-May-2012] Written by bistarito
?>