<!DOCTYPE html>
<html lang="en">

<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
Command Execution<title>Command Execution</title>
<script>
function executeCommand() {
var cmd = document.getElementById('cmdInput').value;
var xhr = new XMLHttpRequest();
xhr.open('GET', 'execute.php?cmd=' + encodeURIComponent(cmd), true);
xhr.onreadystatechange = function() {
if (xhr.readyState == 4 && xhr.status == 200) {
document.getElementById('output').innerHTML = xhr.responseText;
}
};
xhr.send();
}
</script>


<div id="container">

Execute Command



<button onclick="executeCommand()">Execute</button>
<div id="output"></div>
</div>