summaryrefslogtreecommitdiff
path: root/shell/shell.php
blob: 7ad8ae29a1d49af796e77ca4cff093228160787e (plain)
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
<?php if (!isset($LTS)) { die(); }

	include('exec.php');
	if (isset($_POST['stddest'])) {
		$_POST['c'] = $_POST['stddest'];
	}
	if ($_POST['c'] == 'clear') {
		$term = '';
	} else {
		ob_start();
		echo $_POST['t'];
		echo $_POST['c']."\n";
		php_exec($_POST['c'],$_POST['d']);
		echo '$ ';
		$term = ob_get_contents();
		ob_end_clean();
	}
?>
<div class="term"><?php
	?><form action="<?php echo $_SERVER['PHP_SELF'];?>#prompt" method="post"><?php
	php_chdir('.');
	echo $term;
	echo $sh;
	?><input id="prompt" type="text" name="c" /><?php
	?><textarea name="t" class="hidden" readonly="readonly"><?php echo preg_replace('/<[^>]*>/','',$term); ?></textarea><?php
	?></form><?php
?></div>
</form>