-
Notifications
You must be signed in to change notification settings - Fork 6
Expand file tree
/
Copy pathexec.php
More file actions
38 lines (27 loc) · 662 Bytes
/
Copy pathexec.php
File metadata and controls
38 lines (27 loc) · 662 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
35
36
37
38
<?php
require 'library/MainFunction.php';
echo '<link href="//cdn.bootcss.com/bootstrap/3.3.5/css/bootstrap.min.css" rel="stylesheet">';
echo '<link rel="stylesheet" href="assets/style.css">';
echo '<div class="contentBox">';
set_time_limit(0);
$c = _GET('command', 'unknow');
if ($c == 'unknow') {
echo '';
exit;
}
$handle = popen($c, "r");
if (ob_get_level() == 0) {
ob_start();
}
while (!feof($handle)) {
$buffer = fgets($handle);
$buffer = trim(htmlspecialchars($buffer));
echo $buffer . "<br />";
echo str_pad('', 4096);
ob_flush();
flush();
sleep(0.001);
}
pclose($handle);
ob_end_flush();
echo '</div>';