-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathexecute.php
More file actions
34 lines (28 loc) · 775 Bytes
/
execute.php
File metadata and controls
34 lines (28 loc) · 775 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
<?php
include("header.php");
if($_SESSION['flag']=="allowed")
{
$x = $_POST['exe'];
$command = `sudo $x`;
echo '
<div class="page-header">
<h1>Command Shell<small> execute commands in sh-3.00#</small></h1>
</div>
<center>
<div class="container">
<form action="execute.php" method="post">
<div class="input-group">
<input type="text" class="form-control" placeholder="Enter Command " name="exe">
<span class="input-group-btn">
<button class="btn btn-default" type="submit">Execute!</button>
</span> </form>
</div>
</div></center>
<br><br>';
echo '<label class="alert alert-primary"><pre>'.$command.'</pre></label>';
echo '
</body>
</html>';
}
else
header("location:index.php");